Custom (Animated) Icon PDF Print E-mail
Written by Mike Reumer   
Sunday, 09 October 2011 00:00

It's possible to change the default icon on a map.

{mosmap icon='<url image>'|iconwidth='60'|iconheight='52'|
iconanchorx='58'|iconanchory='52'|iconinfoanchorx='34'|iconinfoanchory='1' |iconshadow='<url shadow image>'|
iconshadowwidth='60'|iconshadowheight='52'|
iconimagemap='1,15, 15,15, 31,1, 37,1, 59,51, 56,50, 46,27, 34,30, 29,43, 10,42, 1,15'|
tooltip='Tooltip'|text='Custom Icon'}

icon icon shadow

Even an animated icon (.gif) works:

icon

For a icon wizard goto Google Map Custom Icon Maker.

The parameters have the following meaning:

  • imageurl - url to the image for the icon. Can be a jpg, png or (animated) gif.
  • iconwidth - width of an icon
  • iconheight - height of an icon
  • iconshadow - url to the image for the shadow of the icon. Can be jpg, png or (animated) gif.
  • iconshadowwidth - width of the shadow
  • iconshadowheight - height of the shadow
  • iconanchorx - the x coordinate within the icon for the point that is used for the location.
  • iconanchory - the y coordinate within the icon for the point that is used for the location.
  • iconimagemap - define the clickable region of the icon as a poly for series of X,Y points. The final coordinate closes the poly by connecting to the first coordinate.
You need to specifiy iconwidth and iconheight together and same for inconshadowwidth/height and iconanchorx and iconanchory. You can set the default in the configuration of the plugin.
Last Updated on Friday, 22 February 2013 08:17
 

Advertisement