Hi,
I try to use the drag marker feature but so far no luck with the event that we should expect when the marker is dragged then released. From a broader point of view could you explain how the events chain works? For instance
on the view side:
.OnClientClick("_OnClientClick")
.OnClientDrawEnd("_OnClientDrawEnd")
.OnClientBaseOverlayChanged("_OnClientBaseOverlayChanged")
.OnClientExtentChanged("_OnClientExtentChanged")
.OnClientTrackShapeFinished("_OnClientTrackShapeFinished")
.Render();
now if we have "OnClientClick" for the "SimpleMarkerOverlay" what is the effect of
having "OnClientClick" at the map level?
now if we have "OnClientClick" for the "SimpleMarkerOverlay" and "markerOverlay.OnClientMarkerDragged = "_ClientOnClientMarkerDragged";"
for the "SimpleMarkerOverlay" how this will work?
last but no least, it looks like that when a marker has been created and display on the map then the click on marker need two clicks???
the marker drag event as I state before does not work as well.
thanks.
jm.
here is the code in the controller.
SimpleMarkerOverlay markerOverlay = map.CustomOverlays["SimpleMarkerOverlay"] as SimpleMarkerOverlay; markerOverlay.DragMode = MarkerDragMode.Drag; markerOverlay.OnClientMarkerDragged = "_ClientOnClientMarkerDragged"; markerOverlay.Markers.Clear(); markerOverlay.Markers.Add(NewMarkerProperties(_locationPointShape));
<c> </c>
here is the code in the view:
overlays
.SimpleMarkerOverlay("SimpleMarkerOverlay")
.Id("SimpleMarkerOverlay")
.Name("SimpleMarkerOverlay")
.IsVisible(true)
.IsVisibleInOverlaySwitcher(false)
.IsBaseOverlay(false)
.DragMode(MarkerDragMode.Drag)
.OnClientClick("_OnClientClickOnMarker");
here is the code in the script:
function _ClientOnClientMarkerDragged(location) {
ClientMarkerDragged(location);
}