Select to view content in your preferred language

Automatically Zoom to layer for second added layers

760
3
Jump to solution
10-05-2023 10:17 AM
Labels (1)
MoeinZohary
Emerging Contributor

In ArcGIS Pro, when I add a new layer to an empty project, it automatically zooms to that layer, which is very convenient. However, when I add a second layer to the project, the view remains focused on the first layer, and I need to right-click and manually select 'Zoom to Layer' for the new one.

Is there a way to modify the default behavior so that when I add a new layer, the map view automatically zooms to it, similar to how it behaves when adding the first layer?

Thanks 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

No there isn't and it would be inconvenient to some if it did.

Various options are set in the Project Backstage under options, perhaps mouse wheel scroll pan and zoom might come the closest to what you partially want.


... sort of retired...

View solution in original post

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

No there isn't and it would be inconvenient to some if it did.

Various options are set in the Project Backstage under options, perhaps mouse wheel scroll pan and zoom might come the closest to what you partially want.


... sort of retired...
0 Kudos
MoeinZohary
Emerging Contributor

@DanPatterson Thank you very much for answering. That what I was thinking. Just wanted to be sure.

0 Kudos
MoeinZohary
Emerging Contributor

It is possible to change default behavior using the code. Here you can find some references the first one is ArcPy but the rest are .Net SDK. Hope this would be helpful for anyone who is interested: 

Camera setExtent —ArcGIS Pro 

MapView Class

SetViewingModeAsync Method

ZoomToAsync Method

0 Kudos