Simple access to Google API

Posted by ojfoggin on 03-May-2011 10:53

Hi All,

Just trying something out and I was looking to access the Google Maps API.

I've browsed/searched the website but the newest documents are over 3 years old and refer to the Google API WSDL.  This doesn't exist any more and everything is done by providing parameters through the URL.

i.e.

http://maps.googleapis.com/maps/api/geocode/xml?address=ls1&sensor=false

Will provide an XML containing data for the postcode "LS1".

Or you can get JSON using...

http://maps.googleapis.com/maps/api/geocode/json?address=ls1&sensor=false

I can put this into my web browser to get the resultant file but is there any way to get this file using ABL?

Even if I can just save the output to a file that I can then read from.

Once I can get hold of the data I'll be able to parse it fairly easily, I just can't get hold of it in the first place.

Thanks for any help.

Oliver

All Replies

Posted by egarcia on 03-May-2011 11:32

A way to do this from the ABL is to use TCP/IP sockets.

Solution 20011 in the Solutions database has an example on using 4GL Sockets:

     http://progresscustomersupport-survey.force.com/OpenEdgeKB/articles/Article/20011

The title of the article is "Sample code to access a web site via HTTP with 4GL Sockets".

The example seems to take advantage of the program having a GUI, you may need to handle the response using the read-response-procedure differently.

I hope this helps.

Message was edited by: egarcia
* Updated link.

Posted by rbf on 03-May-2011 13:37

There is an example for using Google Maps from Progress using Ajax in my book "Making Progress With Ajax" on http://www.futureproofsoftware.com.

Posted by ojfoggin on 04-May-2011 02:31

Thanks both,

Will take a look at the socket connections.

Posted by davidmorris on 13-Apr-2012 02:00

I am also trying to interface with the latest Google Geocode API. The link for solution 20011 doesn't seem to work. Is there a new link for this?

Posted by bheavican on 13-Apr-2012 02:06

Thank you for your message. I am currently out of the office, with limited access to email.

I will be returning on Friday PM, 04/12/12.

Brent

Posted by Tung on 24-Mar-2016 10:34

Hi

I asked Progress Support this for a different API and they answered in article 000060873 Is there an HTTP client for OpenEdge ?

Hope that helps others.

Tung

This thread is closed