Arggggh. put Google maps URL weirdness

Gerry Orkin gerry.orkin at gmail.com
Fri Mar 11 16:22:21 EST 2011


Bob, it's working here :)

Gerry


-- http://gerryorkin.com

On 12/03/2011, at 5:06 AM, Bob Sneidar <bobs at twft.com> wrote:

> I have this in a button on a card with a field named "Place". 
> 
> on mouseUp pMouseBtnNo
>    breakpoint
>    put url ("http://maps.google.com/maps/api/staticmap?center=" & fld "place" & "&zoom=8&size=512x512&maptype=roadmap&sensor=false") into someimage
>    put someimage into image 1
> end mouseUp
> 
> someimage now contains graphic data alright, but the command "put someimage into image 1" returns this error
> 
> Runtime error    Friday, March 11, 2011 10:05:00 AM
> Error 89:     Chunk: no such object 
>  Why?
> Error 95:     Chunk: can't find object to store into 
> Error 466:     put: can't set destination 
> Error 241:     Handler: error in statement 
> Error at    char 30 of line 6 in handler mouseUp
> Code:    "Image1" (=1)
> How I got here:
>    put someimage into image 1
> 
> 
> Bob
> 
> 
> On Mar 11, 2011, at 4:06 AM, Gerry wrote:
> 
>> That's it! I actually jumped out of bed to try that, and found your message suggesting the same thing!
>> 
>> Phew. Thanks for your response!
>> 
>> Gerry
>> 
>> -- photo site: http://gerryorkin.com
>> 
>> On Friday, 11 March 2011 at 10:05 PM, Alex Tweedly wrote: 
>>> Haven't tried, but I always use parentheses with URL, so try
>>> 
>>> put url ("http://maps.google.com/maps/api/staticmap?center="& fld "place"& "&zoom=8&size=512x512&maptype=roadmap&sensor=false") into someimage
>>> 
>>> 
>>> -- Alex.
>>> 
>>> On 11/03/2011 10:55, Gerry wrote:
>>>> This works:
>>>> 
>>>> put url "http://maps.google.com/maps/api/staticmap?center=canberra&zoom=8&size=512x512&maptype=roadmap&sensor=false" into someimage
>>>> put someimage into image 1
>>>> 
>>>> 
>>>> 
>>>> But when I use the text in a field in building the url it breaks - I get a "bad request 400 error" from the Google server:
>>>> 
>>>> put url "http://maps.google.com/maps/api/staticmap?center="& fld "place"& "&zoom=8&size=512x512&maptype=roadmap&sensor=false" into someimage
>>>> put someimage into image 1
>>>> 
>>>> What am I missing? When I write the string out to the message box and then paste that into the url field in my browser, it works fine.
>>>> 
>>>> Argggh.
>>>> 
>>>> Gerry
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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