Friday, May 15, 2009

Google Static Map API

Google released APIs for static map sometimes ago.
see this url:http://code.google.com/apis/maps/documentation/staticmaps/#Latlons
I noticed that the the example given in the "A Quick Example " section does not have the correct url.If you use the url given in the example then you will not get the markers in the map.
The correct url is:
http://maps.google.com/staticmap?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mobile\&markers=40.702147,-74.015794,blues|40.711614,-74.012318,greeng|40.718217,-73.998284,redc&key=MAPS_API_KEY&sensor=false

The difference is the "\" before &key. remove that slash(/) and you will get the correct url which will show markers in proper color.

-Abhinaw


No comments:

Post a Comment