Dizzy B High
unread,Nov 12, 2010, 6:31:02 AM11/12/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
you can use a shape parameter when building the marker which allows you to set up a clickable area for the marker:
is as an object {'type': 'square' or 'circle' } have not used these so i dont know if they take extra params for diameter size etc
you can also use 'poly' if you do the object is slightly diffirent:
var iconshape = { type : 'poly', coord: [0,2,1,2,1,1,18,0,18,1,19,2,20,19,19,19,18,21,14,21,10,26,5,21,1,21,1,20,0,20,0,2]}
where coord is the image map data
///SAMPLE CODE
var iconshape = {
type: 'poly',
coord: [0,2,1,2,1,1,18,0,18,1,19,2,20,19,19,19,18,21,14,21,10,26,5,21,1,21,1,20,0,20,0,2]
}
var iconimage = new google.maps.MarkerImage(
'mymarkerimage.png', // The marker image
new google.maps.Size(32, 37), // The Size of the image
new google.maps.Point(0, 0), // The origin (used if using sprites) can be set to null
new google.maps.Point(13, 29) // The anchor point for the icon
);
var iconshadow = new google.maps.MarkerImage(
' mymarkershadow.png', // The shadow image
new google.maps.Size(42, 18), // The Size
new google.maps.Point(0, 0), // The origin
new google.maps.Point(13, 18) // The anchor
);
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'custom marker',
icon: iconimage,
shadow: iconshadow,
shape: iconshape
});
hope thats of help