views:

233

answers:

1

I won't use GIcon to change for the marker.Any other ways to change color of marker???

+2  A: 

Nope, if you wan't to customize your marker, you will need to use GIcon.

You can find a whole lot of free markers at the Google Maps Icons Project. The code to use a custom marker is pretty straightforward:

// Create our "tiny" marker icon
var blueIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";

// Set up our GMarkerOptions object
markerOptions = { icon:blueIcon };

// add the markerOptions as the second param to GMarker constructor
map.addOverlay(new GMarker(latlng, markerOptions));
Cannonade
i got it.Must written some code.thx....
DonaldIsFreak