Guys, I have a couple of instances of the SimpleMarkerOverlay used for labels and images. All works well but images and labels are not wrapping across the dateline since MarkerOverlay is missing the WrappingMode property.
I am using a MarkerOverlay to give customers the flexibility of dragging the markers around to desired locations. In InMemoryFeatureLayer of similar will not meet this requirement.
What is the easiest way for me to meet these two requirements:
1. Allow markers to be dragged
2. Markers should be wrapped across the dateline?
Thanks.
Wrapping of marker overlays across the international dateline
Hi Klaus,
Thanks for your post,
for the first problem following code should be helpful:
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay();
markerOverlay.DragMode = MarkerDragMode.Drag;
For the second problem, because markerOverlay is very different from layer(layer could wrapdateline), forexample marker could add event,control and draggable and some other cutomerized attribute, but layer is actually a image. so to deep colone a markeroverlay would be hard, and therefore it would be hard to wrapdateline for markeroverlay compared with layer.
But here are two walkaround.
The first is to set a marker’s position cross the dateline for example “Marker marker = new Marker(-185, -190);”
The second is that if the marker just act a simple role(like just need to be clickable) then using a layer could be able to replace a simplemarkeroverlay.
Hope it helps
Summer