Google Maps Api v3, custom Cluster icon

You need to use styles parameter when initializing MarkerClusterer object – the code below shows default styles so if you want to recolour one of the icons just change the relevant url to your image… //set style options for marker clusters (these are the default styles) mcOptions = {styles: [{ height: 53, url: “http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png”, width: … Read more

Google Map Api v3 drag event on map

Both Map objects and Marker objects have drag events, although you probably want dragend so that you can do something when a user is done dragging rather than do something while a user is dragging. So you could do something like this: google.maps.event.addListener(map, ‘dragend’, function() { alert(‘map dragged’); } ); google.maps.event.addListener(marker, ‘dragend’, function() { alert(‘marker … Read more

Change marker size in Google maps V3

This answer expounds on John Black’s helpful answer, so I will repeat some of his answer content in my answer. The easiest way to resize a marker seems to be leaving argument 2, 3, and 4 null and scaling the size in argument 5. var pinIcon = new google.maps.MarkerImage( “http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|FFFF00”, null, /* size is determined … Read more

Capture Coordinates in Google Map on User Click

You should add the click listener on marker will give you the position of marker. //Add listener google.maps.event.addListener(marker, “click”, function (event) { var latitude = event.latLng.lat(); var longitude = event.latLng.lng(); console.log( latitude + ‘, ‘ + longitude ); }); //end addListener Edit: You need something like this //Add listener google.maps.event.addListener(marker, “click”, function (event) { var … Read more