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