Arggggh. put Google maps URL weirdness

Bob Sneidar bobs at twft.com
Fri Mar 11 12:51:01 EST 2011


I would imagine you have more than you think in the field. It probably contains a space, a tab or a carriage return, or some other invisible character. Try stepping through your code and looking at the contents of the variables. You will have to put the field contents into a variable to do this properly. Also, I would put the entire url into a variable first, then issue your put url statement with the variable. It's cleaner coding and easier to troubleshoot. 

Bob


On Mar 11, 2011, at 2:55 AM, 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





More information about the use-livecode mailing list