I’m probably the last person in the world to figure this out. But just in case, give this a try…
displayMode(FULLSCREEN)
function setup()
map = nil
http.request('http://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&sensor=false', didGetImage)
end
function didGetImage(theImage, status, head)
map = theImage
end
function draw()
background(226, 226, 226, 255)
if map ~= nil then
sprite(map, WIDTH/2, HEIGHT/2)
end
end
Pretty spiffy. And if you look at the static maps API, you’ll find there’s a lot you can do with it.
Now, imagine if we had the compass heading and GPS values. We’d be well on our way to our own Codea-based mapping tool.