Google Static Maps Problem

William Prothero waprothero at gmail.com
Fri Jun 30 21:39:55 EDT 2017


Whoops! Spoke too soon. It puts a box on the map, which is centered on the box, but the map bounds are outside of the box I specified.

Still looking.
Bill

> On Jun 30, 2017, at 6:12 PM, William Prothero via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Jonathon and hh:
> Ok, it looks like I’ve made some progress, Googling around in the static maps api. I found that it is possible to directly set the lat lon bounds of the map I get. That’s even better than letting Google decide how much of the map to display and working backwards to get the corners. If I use the path= parameter and don’t specify zoom and center, I get exactly the map with the specified lat/lon bounds. Whoopee!
> 
> I’m testing it more.
> Bill P
> 
>> On Jun 30, 2017, at 6:02 PM, Jonathan Lynch via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Hi Bill,
>> 
>> I am looking at your stack now. I don't see any place where you use JavaScript to get get the bounds from the Google maps API.
>> 
>> I think you would have to do it that way to get a reliable result.
>> 
>> That won't give you corners, exactly, but it will give you a minimum bounding rectangle that contains your map.
>> 
>> Sent from my iPhone
>> 
>>> On Jun 30, 2017, at 8:02 PM, jonathandlynch at gmail.com wrote:
>>> 
>>> Bill,
>>> 
>>> The bounds will only give you the corners of the image if you are facing exactly North, south, east, or west,
>>> 
>>> I am sorry I have not had a chance to check out your stack - will do so shortly 
>>> 
>>> Sent from my iPhone
>>> 
>>>> On Jun 30, 2017, at 7:56 PM, William Prothero via use-livecode <use-livecode at lists.runrev.com> wrote:
>>>> 
>>>> Hermann:
>>>> I got your stack. It pretty much is where I am at now. However, it doesn’t solve my problem. If you notice the “geocode” call output, nothing changes when the zoom level changes. This isn’t much help when trying to find the lat/lon values of the corners of the image. That’s what I need. Neither the “bounds” parameters nor the “viewport” parameters change with zoom level. So, it doesn’t help when trying to get the corner lat/lons, which change with zoom level.
>>>> 
>>>> Best,
>>>> Bill
>>>> 
>>>>> On Jun 30, 2017, at 8:32 AM, hh via use-livecode <use-livecode at lists.runrev.com> wrote:
>>>>> 
>>>>> You may use the technique of a stack I made in April 2017 on base of
>>>>> a discussion started by you in the list:
>>>>> http://lists.runrev.com/pipermail/use-livecode/2017-April/236632.html
>>>>> 
>>>>> I posted it just now here (Raspi stacks collection #100)
>>>>> http://forums.livecode.com/viewtopic.php?p=155414#p155414
>>>>> 
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at 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 at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list