Unplanned
Last Updated: 28 May 2021 17:26 by ADMIN
Jochen
Created on: 16 Oct 2015 06:24
Category: Map
Type: Feature Request
2
MapMarker Tag property
Hello,
this is my scenario:

I add the MapMarkers to the markers collection  on Server side.
I bind the marker click event on server side and forward the retrieved values to a hidden input and button:

            // Verbinden des Clicks

            string function = "function(sender) { var title = sender.marker.options.title; " +

                " title = title.substr(0, title.indexOf('-') - 1); document.getElementById('" +

                c_MarkerData.ClientID + "').value = title; document.getElementById('" +

                c_Markerclick.ClientID + "').click(); }";

            c_Mainmap.ClientEvents.OnMarkerClick = function;

Markup:
<div style="display: none; visibility: hidden">

    <asp:HiddenField runat="server" ID="c_MarkerData" />

    <asp:Button runat="server" ID="c_Markerclick" OnClick="c_Markerclick_Click" />

</div>

The title starts with a unique ID of the data entity - i need this id to identify the data row when handling the c_Markerclick_Click event. So i misuse the marker title to forward this.

If the MapMarker would have a Tag attribute or so, i could set that on Server side and retrieve the needed Information in a clean way.

Greetings Jochen
0 comments