views:

16

answers:

1

I'd like to populate the infoWindow of an annotation with an image of the location the pin is on dynamically, producing an aerial photo and stuffing it into the infoWindow.

This is what I have now, but it means I have to have an image for each site ready to go in advance, which is a lot of provisioning work for several hundred different buildings.

google.maps.Event.addListener(marker, "click", function(latlng) {
        var myHtml = "<b>" + location.Name + "</b><br /><img src=../Web/Content/image/sites/"+ location.Image + "><br/><br/><br/>";
        map.openInfoWindowHtml(latlng, myHtml);
    });

Instead, I'd like to just use the aerial photo Google already has on file for the X/Y coordinates. Any ideas?

+1  A: 

You're looking for the Google Static Maps API.

SLaks