Map Server Events

Dec 24, 2011 at 12:16 PM

Hi,

I would like to create markers on a map click events. I have the next page code:

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <artem:GoogleMap ID="gmMap" runat="server" MapType="HYBRID" Zoom="8" Latitude="42.1229"
                    Longitude="24.7879" CssClass="map" 
                    onclick="gmMap_Click">
                </artem:GoogleMap>
                <artem:GoogleMarkers ID="gmkMarkers" TargetControlID="gmMap" runat="server" >
                    <Markers>
        
                    </Markers>
                    <MarkerOptions Draggable="true">
                    </MarkerOptions>
                </artem:GoogleMarkers>
            </ContentTemplate>
        </asp:UpdatePanel>
 

and event handler code

      protected void gmMap_Click(object sender, Artem.Google.UI.MouseEventArgs e)
    {
        Marker m = new Marker();
        m.Position = e.Position;
        m.Clickable = false;
        gmkMarkers.Markers.Add(m);
    } 

 

 

 

But I can create only one marker. Map Click event fires only one times. Why?