Ah, I see the problem. Testing on WinTen and IELast, it "helps" me by deciding it wants to download a json.json file and asks which app I want to use from the Microsoft Store. In current versions of Chrome and FireFox, it just returns the correct answer: the json, displayed as the text that it is.
This is drop-dead simple XML-RPC: send an http request for a result, encoding the parameters in the URL, get a result to parse. There's no need to wrap it in an ugly Microsoft COM-plexified Web Service. I'd be much more inclined to use something like wget for windows (http://gnuwin32.sourceforge.net/packages/wget.htm), or similar functionality like Rick Strahl's Client Tools, if you're already using them, and write a quick-and-dirty VFP to assemble the URL (and your API key!) and shell out to the wget command, then slurping in the result with FileToStr and parsing the results.
On Tue, Sep 13, 2016 at 10:18 AM, Dave Crozier DaveC@flexipol.co.uk wrote:
I converted all the examples to run in VFP by generating a html file from VFP using textmerge etc. which was then called by IE and couldn't find any reference to lat/longs anywhere.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Ted Roche Sent: 13 September 2016 14:58 To: profox@leafe.com Subject: Re: Google API for Geocoding ... Again
Well, perhaps I'm missing something; I'll recheck my work. I just registered for an API key and used the Google examples and my new API key to get results that show up in my browser.
Of course, I'm not using IE nor Windows, just Chrome on Linux, but it should work the same, if IE is compatible with this.
On Tue, Sep 13, 2016 at 9:47 AM, Dave Crozier DaveC@flexipol.co.uk wrote:
Tried that Ted but Google never actually return the Lat/Long and the API call is the only way to retrieve it.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Ted Roche Sent: 13 September 2016 14:46 To: profox@leafe.com Subject: Re: Google API for Geocoding ... Again
A hideously-ugly hack that might do the trick would be to automate an IE browser session, feed it the URL, and parse the source result searching first for "location" then for the nearest "lat" and "long" in the resultant source.
On Tue, Sep 13, 2016 at 6:44 AM, Dave Crozier DaveC@flexipol.co.uk wrote:
Fellow Gentlemen, I posted a request about doing geocoding requests to receive back a Lat/Long dataset for various addresses a few weeks ago and now find that Google do in fact provide a Geocoding service:
https://developers.google.com/maps/documentation/geocoding/start
The responses back from the requests are all JSON from a Java Script API run by Google. I have looked over Rick's Westwind site to try and get a start on using this method to get back a JSON response but seem to be getting nowhere fast. Anyone got any ideas on a simple & neat way of retrieving this data back using VFP programmatically? Either that or anyone know a free Geocoding site that would handle up to 100 name and address calls per day ideally by sending a text file and receiving one back which could be automated from the VFP end.
Never even looked at Web services in anger before so it all seems a little baffling and terribly long winded at the moment unless I am missing something obvious.
Note I don't want to have to drop into an intermediate program/language to accomplish this, if possible.
Dave
[excessive quoting removed by server]