views:

21

answers:

1

I am using google map api in my application. How can I show a thumbnail image in place of red bubble for a perticular address on Map.

A: 

When you create the Marker, you set the icon. i.e.

var marker = new google.maps.Marker({
  map: null,
  position: new google.maps.LatLng(jdata.locationLat, jdata.locationLon),
  visible: true,
  clickable: true,
  title: jQuery.trim(jdata.locationName),
  icon: 'http://www.mysite.com/mythumb.png',
  shadow: 'http://www.mysite.com/markershadow.png'
});

You can set it after initialization as well:

marker.setIcon('http://www.mysite.com/mythumb.png');
marker.setShadow('http://www.mysite.com/markershadow.png');
Fosco
I am using a user control where I am pointing address through javascript like- map.setCenter(new GLatLng(latitude, longitude), parseFloat(document.getElementById(hdnZoom).value)); var point = new GLatLng(latlons[0], latlons[1]); map.addOverlay(new GMarker(point));
topi
You said you're using version 3 but those look like version 2 calls. The option would go in the reference to creating a new marker.
Fosco