Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

http.request + Google Static Map API

edited October 2012 in Examples Posts: 1,255

I'm probably the last person in the world to figure this out. But just in case, give this a try...


function setup()
    map = nil
    http.request(',-73.998672&zoom=12&size=400x400&sensor=false', didGetImage)

function didGetImage(theImage, status, head)
    map = theImage

function draw()
    background(226, 226, 226, 255)
    if map ~= nil then
        sprite(map, WIDTH/2, HEIGHT/2)

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.


Sign In or Register to comment.