Mark:
Yes, you’ve done it all. It was intended just to demo the display of a Google 
Static Map and show how to get the corners of the image so the lat/lon of the 
mouse position could be calculated. To do that, I had to rely oh Hermann’s 
expertise with Javascript to convert a posted solution to LCS. I spent time 
carefully checking that the corners calculation agreed with the box plotted by 
the maps api. The map image is also slightly stretched horizontally (to fit my 
own project map size) and I had to do some tweaking to the corners code to make 
that work.

The links to the Google API get the programmer to the web site that tells how 
to display streets, display a map of a particular city or other feature, add 
symbols, etc. For those who need to do that, this should help. It’s pretty 
trivial to change the URL params, so I felt I could leave that to the user. 
Actually, the entire thing is pretty trivial, but it did take me quite a bit of 
time, thrashing through the details because I’d never worked with the Google 
maps api, so perhaps others might find it useful.

My project will continue and plot data on a captured image, scroll the map, 
etc. I hadn’t planned on including that part in the demo, but could, if 
requested.

Best,
Bill P

> On Jul 6, 2017, at 9:40 PM, Mark Wieder via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> On 07/06/2017 07:53 PM, William Prothero via use-livecode wrote:
>> Mark:
>> Hmmmm…. I checked it out and the problem is with LC 9.0 (dp7). The openstack 
>> script is in the first card in the main stack. It has the script to start 
>> using the various substacks that are needed. If I open it in LC9, this code 
>> somehow gets disabled and doesn’t show in the IDE editor. So, the substacks 
>> never get “used.” I tried opening a virgin version in LC 8.1.5(RC3) and it 
>> worked as expected. So, I guess this is a bug in the latest LC9 release.
>> I don’t know about the difficulty entering the APIKey. It works for me in 
>> LC8.1.5. lI’m on Mac, latest OS.
>> The link to get the latest (fixed) download is:
>> http://earthlearningsolutions.org/google-static-maps-demo/ 
>> <http://earthlearningsolutions.org/google-static-maps-demo/>
>> You need to get this newest version, because I had tested it in LC9 and 
>> saved it, so the openstack script was deleted somehow.
>> I’ll be very interested to see if you have more troubles.
> 
> Thanks. That fixed all those problems (LC9dp6). No idea what was going on 
> with the text field.
> 
> So I can load a map, and I can use the slider to zoom. I can type input 
> parameters into the centering fields and the box corners and reload the map 
> to see the changes, and I can see the mouse lat/lon values moving when I move 
> the mouse. Is anything else supposed to happen? Clicking on the map does 
> nothing. I realize the docs say 'The rest is pretty self-explanatory', so 
> maybe I've done it all.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to