MapViewCameraChangedEvent does not always fire when extent is changed

121
1
2 weeks ago
AzharIbrahim
New Contributor III

I need a way to reliably get the new extent for a scene or view in order to use it in my addin. The MapViewCameraChangedEvent does not always fire when the extent is changed via the navigation control (when planar navigation is active it never fires). And when it does, the extent I get when querying the MapView.Active.Extent is different from when I pan using the mouse. What can I use instead? How can I ensure when I get the center of the extent, that it is actually the center of the extent in the active view?

 

ETA (currently using 3.0.3)

0 Kudos
1 Reply
CharlesMacleod
Esri Regular Contributor

From the development team - there is not a fullproof workaround unfortunately - however they suggest that MapView.LookAtCamera and it’s x, y, z values might be your best option. They r looking at this for 3.4.

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic20825.html

0 Kudos