views:

1406

answers:

2

Hi! I've a custom google map with different points:

Markers[0] = new Array(new GMarker(new GLatLng(45.0, 9.0)), "Location1", "<strong>Address Line</strong><br/>Some information");
Markers[1] = new Array(new GMarker(new GLatLng(45.0, 12.0)), "Location2", "<strong>Address Line</strong><br/>Some information");

etc.

Simply I want to change the color of the markers from the default red. I.E. the 2nd blue.

How to do this?

A: 

You can put a new marker with the desired color over the original marker. This technique, with an example, is explained here: http://esa.ilmari.googlepages.com/hellocolorswitch.htm

Konamiman
Sorry.. I'm not understanding very well... Starting from the code which I posted I have to define the icon {icon:turqIcon}. But how?
A: 

Use the setImage method on the marker.

Marker[1].setImage('blue-icon.png');

http://gmaps-samples.googlecode.com/svn/trunk/whackamarker/whackamarker.htm

rball