How to make click over all google marker image?

Jul 12, 2009 at 6:30 PM

Hi all.

I have a question and it seems not to easy to resolve.

Add this code to your page :

        GoogleMarker marker1 = new GoogleMarker(42.1229, 24.7879);
        marker1.ImageUrl = "";
        marker1.Clickable = true;
        marker1.Text = "<div><img src=''/></div>";
        marker1.IconSize = new GoogleSize(48, 48);


As you can see, the click area cannot be defined by the marker. Why?

I want to click in a point inside the image marker and open the baloon message. :(


see this approach:

var myIcon = new GIcon();
myIcon.image = 'markers/image.png';
myIcon.printImage = 'markers/printImage.gif';
myIcon.mozPrintImage = 'markers/mozPrintImage.gif';
myIcon.iconSize = new GSize(23,50);
myIcon.shadow = 'markers/shadow.png';
myIcon.transparent = 'markers/transparent.png';
myIcon.shadowSize = new GSize(48,50);
myIcon.printShadow = 'markers/printShadow.gif';
myIcon.iconAnchor = new GPoint(23,50);
myIcon.infoWindowAnchor = new GPoint(12,0);
myIcon.imageMap = [13,0,14,1,15,2,16,3,18,4,20,5,21,6,22,7,22,8,22,9,20,10,17,11,14,12,13,13,13,14,13,15,13,16,14,17,14,18,15,19,15,20,16,21,16,22,16,23,16,24,16,25,16,26,16,27,16,28,16,29,16,30,17,31,17,32,17,33,17,34,17,35,17,36,17,37,17,38,17,39,17,40,17,41,17,42,17,43,17,44,17,45,17,46,17,47,16,48,16,49,0,49,1,48,1,47,1,46,2,45,2,44,2,43,2,42,2,41,2,40,2,39,3,38,3,37,3,36,3,35,3,34,3,33,4,32,4,31,4,30,4,29,4,28,5,27,5,26,5,25,6,24,6,23,6,22,6,21,6,20,6,19,5,18,5,17,5,16,5,15,4,14,4,13,4,12,4,11,5,10,5,9,4,8,4,7,4,6,4,5,4,4,4,3,4,2,4,1,4,0];

See this demo:

There is a way to add the ImageMap method of GoogleMaps API to GoogleMap Marker?  

Thanks to all.


Jul 13, 2009 at 6:07 AM


It is possible to add custom images as marker pin.
Have you check out the SampleWebSite and the page for custom icons sample.
Online can be found at