This project is read-only.

Prevent InfoWindow from opening?

Feb 21, 2010 at 9:22 AM
Edited Feb 21, 2010 at 9:23 AM


I'm looking for a way to prevent the InfoWindow to open when clicked on a marker.
Somehow it is always openend when clicked on a marker.

In the pageload I have added an click event:
gmDest.MarkerEvents.Click +=new EventHandler<GoogleLocationEventArgs>(Marker_Click);

Each and every marker I have created have the 'Clickable' property set to true.
I want the Marker_Click event to fire (which it does) but I don't want the InfoWindow to be openend automatically.
How can I prevent this?
Setting the Clickable property to false is no option, because my click event isn't fired then.






Feb 21, 2010 at 12:57 PM


Why not setting the OpenInfoBehaviour to DoubleClick?
Then the info window won't be opened on a single click.
You can do that using the MarkerStyle inner property of the GoogleMap control.
For example:

<artem:GoogleMap ID="GoogleMap1" runat="server" Latitude="42.1229" Longitude="24.7879"
    EnableScrollWheelZoom="true" >
    <MarkerStyle OpenInfoBehaviour="DoubleClick" />
        <artem:GoogleMarker Address="Plovdiv Bulgaria" Text="This is a <b>real</b> simple info window test.">
                <a href=''>Visit online sample website.</a>



Feb 21, 2010 at 5:34 PM
Edited Feb 21, 2010 at 5:43 PM

Hi Velio,

Thanks for your prompt answer!
Yes, that is an good alternative. But is there no way to prevent the InfoWindow from opening at all?



Feb 22, 2010 at 10:28 AM


I have downloaded the sources for version 4.2.
In the zip file, the solution indicates version 4.1 (GoogleMapControl 4.1.sln).

Is this correct since all previous solutions have the proper version number in the solution name?