How to make click over all google marker image?

Jul 12, 2009 at 7: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 = "http://www.sysvision.de/opencms/export/system/modules/com.sysvision.www/resources/img/eclipse.png";
        marker1.Clickable = true;
        marker1.Text = "<div><img src='http://3.bp.blogspot.com/_PcrQ3o9LVRc/R8G0Jw9g9SI/AAAAAAAAAA0/Uhwjt0QcbUY/s400/eclipse.png'/></div>";
        marker1.IconSize = new GoogleSize(48, 48);
       
        GoogleMap1.Markers.Add(marker1);

 

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: http://www.powerhut.co.uk/googlemaps/custom_markers.php

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

Thanks to all.

 

Coordinator
Jul 13, 2009 at 7:07 AM

Hi,

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 http://googlemap.artembg.com/marker/CustomIcons.aspx

Regards