Use Custom Markers with Google Static Map APIs

The Static Maps API supports custom marker icons. Just specify the URL of a PNG, GIF, or JPEG icon in the marker definition, and we'll fetch the icon and add it to your map. We'll cache the icons you specify to maintain performance, and even generate shadows for our icons if we wish:

Just take care of few tip and trick if you plan to use custom map marker to generate your google static map images.

1. marker image have to be max 64x64px in size.

2. If marker image have gradient images or detailed png than set format=png32 so that the returned images doesn’t loss too much quality.

3 if set shadow:false then need to be aware of a little thing: when set shadow:false marker will be centered in the center of the image, while when shadow:true the center in the bottom of your image will be used by google.

i.e.: Sample Demo Url for get Static map image with custome marker icon using Google static map APIs

http://maps.google.com/maps/api/staticmap?center=21.19365498864821,72.8217601776123&size=200x200&zoom=12&maptype=roadmap&markers=icon:%20http://ijiya.com/images/marker-images/image.png|shadow:true|21.19365498864821,72.8217601776123&sensor=false&key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxQGj0PqsCtxKvarsoS-iqLdqZSKfxRdmoPmGl7Y9335WLC365hfg5yrjskd999


 further more detailed google static map api go:
              http://code.google.com/apis/maps/documentation/staticmaps/

Post a Comment

0 Comments