Does anyone know how to get a google static map to display. i’ve been using the sample code file “SimpleImageDownload” to display images on a remote server, but for some reason the google static map doesn’t work. my only guess is that it doesn’t work because the url doesn’t end in a file type suffix. does anyone have any ideas to get around that?
here is an example of the url that i’m trying to display:
http://maps.google.com/maps/api/staticmap?center=37,-122&zoom=5&size=200x200&key=ABQIAAAA8YBiJ7Gpz7yfnFwNv5JWDRS5Tcvw2w9u7J2kruX8KbdoJpfG2BTNSJuFpY6XrxOvgPEZv4csvDe7jg&sensor=true
here’s the code that i’m using(ripped from the SimpleImageDownload file):
local path = system.pathForFile( “map.png”, system.DocumentsDirectory )
myFile = io.open( path, “w+b” )
– Request remote file and save data to
http.request{
url = mapURL,
sink = ltn12.sink.file(myFile),
}
– Display local file
testImage = display.newImage(“map.png”,system.DocumentsDirectory,60,50);
thank you for any suggestions! [import]uid: 2773 topic_id: 421 reply_id: 300421[/import]
[import]uid: 4298 topic_id: 421 reply_id: 789[/import]