Thanks for your help.
I found a link to Python, PHP, and Pascal code to do this. Looks like I have to
stop being lazy and do some math. I’m ok with converting the code to xTalk. I
should be able to figure it out myself. I’ll share when I get something done.
It may be a bit because I’ve
I'll poke around more. Maybe I'll get lucky (boatloads of no in that
phrase) and find a solution.
On Fri, Apr 28, 2017 at 5:55 PM, William Prothero via use-livecode <
> Ok, its a bit more complicated. After my initial high at thinking the
> problem was
Ok, its a bit more complicated. After my initial high at thinking the problem
was solved (rushing to a haircut appointment before looking carefully), I
noticed that the returned data from Mike’s reverse geocoding URL didn’t change
with the zoom level. So apparently, it’s only applied to the
I’m willing. Hermann has been generous with good ideas too.
> On Apr 28, 2017, at 1:45 PM, Mike Bonner via use-livecode
> If you ever get down to the middle of nowhere new mexico, I'll take you up
> on the lunch offer. :) Think others
Thanks so much. This is very helpful. I thought I was in for a huge tussle
getting this to work and now I see that it’s not going to be a huge hassle. I
write geophysical data on a map and Google puts out some nice looking terrain
maps, and now I don’t need to include maps in my app.
If you ever get down to the middle of nowhere new mexico, I'll take you up
on the lunch offer. :) Think others mentioned the same api though, so
there might be lunches all around.
On Fri, Apr 28, 2017 at 2:41 PM, William Prothero via use-livecode <
OMG, I LOVE YOU! Fantastic, this is just what I need. I hope I meet you some
day so I can buy you dinner. Let me know if you get by Santa Barbara, or
> On Apr 28, 2017, at 10:56 AM, Mike Bonner via use-livecode
Have you already seen this nifty utility?
I use the following for getting the geo-location.
put url ("https://maps.googleapis.com/maps/api/geocode/; & \
"json?address=25a+Thistle+Street+SW,+Edinburgh,+UK") into rslt
replace quote with
heres a link to the geocode api information:
https://developers.google.com/maps/documentation/geocoding/intro I'm not
sure my interpretation of the viewport is accurate, but even if you just
use the center point and do the calculations, and ignore the rest of the
data, it should work.
If you do a second call to the geocode api you can get the info you need.
There appear to be 2 location sections. One contains the bounds of the
request, the other contains the bounds of the viewport IE zoom level
Thanks for the openstreetmap link. I'm really liking the Google maps option
since my app is being developed for free distribution to educators and I am not
particularly interested in streets. The satellite or terrain views are what I
Now all I have to do is figure out how to get the
Not to forget related to (static) maps, especially as you can have
them from there also as SVG or 'true' PDF (not embedded PNG only):
For exporting as HTML link or as an "image" (JPG, PNG, SVG, PDF)
Hmm, I must have spoken too soon. This actually works!
put mapURL() into tURL
put URL tURL into x
put x into image "myGMap"
Here is how I get directions in a map:
on mouseUp pMouseBtnNo
put the dgHilitedLine of group "dgSites" into theHilitedLine
put the dgDataOfLine [thehilitedline] of group "dgSites" into
As Mike mentioned, the API call returns image data, so set the filename of an
image to the url. Here’s the script from a working demo:
put urlEncode(fld "address") into tAddress
put urlEncode(fld "city") into tCity
put urlEncode(fld "state") into tState
Since its a static map, its returned in image format (note the png at the
You should be able to: put URL "
into img "myImage" and viola. have the map appear.
Turns out there is a Google Static Map api. I’m trying to use it, but get no
response from my code that indicates an error.
The Static Maps API URL is:
Mail list logo