Prevent InfoWindow from opening?

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

Hi,

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.

 

 

 

 

 

Coordinator
Feb 21, 2010 at 11:57 AM

Hi,

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" />
    <Markers>
        <artem:GoogleMarker Address="Plovdiv Bulgaria" Text="This is a <b>real</b> simple info window test.">
            <InfoWindowTemplate>
                <a href='http://googlemap.artembg.com'>Visit online sample website.</a>
            </InfoWindowTemplate>
        </artem:GoogleMarker>
    </Markers>
</artem:GoogleMap>

Regards,
Velio

 

Feb 21, 2010 at 4:34 PM
Edited Feb 21, 2010 at 4: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?

Egbert

 

Feb 22, 2010 at 9:28 AM

Hi,

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?