Select to view content in your preferred language

Layer not visible after using the MoveLayer method of map

1612
10
08-05-2012 11:27 PM
Labels (1)
martindevos
Deactivated User
After using the MoveLayer method on a map, the moved layer is not displayed anymore.  And there is no Refresh method.
You can make it reappear by zooming or panning or toggling the visibility of it.  Is there no cleaner solution to this problem ?
0 Kudos
10 Replies
DenisO_Connor
Emerging Contributor
This happens when layers are added to the Map in code.

To fix - read the Extent pre Move and reset post Move - e.g
Dim myEnvelope As New ESRI.ArcGIS.Client.Geometry.Envelope
myEnvelope = myMap.Extent
myMap.Layers.Move(3, 2)
myMap.Extent = myEnvelope
0 Kudos