ATLChris
ATLChris

Reputation: 3296

Google Maps Static Custom Icon

http://maps.googleapis.com/maps/api/staticmap?center=35.442797,-80.880361&zoom=12&size=512x512&maptype=roadmap&markers=icon:http://*****.com/images/icon-marker.png|35.442797,-80.880361&sensor=false

For some reason, I am not seeing my custom icon. Anyone have any idea why?

Upvotes: 1

Views: 752

Answers (1)

andresf
andresf

Reputation: 2061

Your icon is too large. From the documentation:

The icon parameter must be specified using a URL (which should be URL-encoded). You may use any valid URL of your choosing, or a URL-shortening service such as http://bit.ly or http://tinyurl.com. Most URL-shortening services have the advantage of automatically encoding URLs. Icons are limited to sizes of 4096 pixels (64x64 for square images), and the Static Maps service allows up to five unique custom icons per request. Note that each of these unique icons may be used multiple times within the static map.

Your image is 80x52 (4,160 pixels).

Upvotes: 4

Related Questions