Placemark image being stretched on Google Maps API application
Has anyone else experience a custom placemark being vertically stretched and found a solution to it?
Example: http://www.mattpotts.com/so-stretched.png
And this is the code I have:
var blueIcon = new GIcon(G_DEFAULT_ICON); blueIcon.image = "images/beer-24x24.开发者_开发问答png"; var marker = new GMarker(point, {draggable:true, icon:blueIcon})
Sounds like you want to set:
blueIcon.size = new GSize(24, 24);
along with customizing other properties of GIcon. The stretching is occurring because G_DEFAULT_ICON
is a typical Maps pin, and is something like 20x32.
精彩评论