If via the Catalog pane, you drag a feature class from a SQLite source directly onto your map, the extent will automatically zoom appropriately to surround all the features within that feature class, as expected.
If however, you then save that new layer as a .lyrx file and drag that layer onto a map, the extent zooms out to the full extent of the world map. So if your features are specifically in one country, they'd be incredibly small by default and you have to zoom to find them. Even right-clicking the layer and pressing 'Zoom to Layer' zooms to the full world map extent.
My layer was initially setup to source from a geodatabase but I changed it to a new SQLite source. It worked fine with the geodatabase source but now doesn't for SQLite.
I am wondering if it's a bug from ArcGIS Pro or is a SQLite issue? Or is there a way to change the default extent of a layer file (.lyrx)? This isn't very good if giving layer files to clients.
Solved! Go to Solution.
This seems to be an ArcGIS Pro 2.9 bug. If you setup the layer to point to a gdb source, and then change that to a sqlite by editing the Layer Properties, it will zoom to the world extent by default rather than the layer extent. So you have to setup the layer from the sqlite source initially for this to work appropriately.
does the same behaviour exist if you "add" the lyrx versus dragging it? It it behaves properly when you add the lyrx, I suspect that dragging is a just a convenient shortcut and doesn't implement all the processes that may be involved in "add"ing a layer (eg a pre-read of extent if it exists)
Unfortunately adding a layer via the Add Data method still zooms out to a full extent by default.
So I tested the *.lyrx on a fGDB and a SQLite geodatabase using ArcGIS Pro 2.9.2 and when I add the *.lyrx from either geodatabase type, it performs as expected. Zooms to the extent of the layer and not the world. What release of ArcGIS Pro are you using?
I'm using 2.9.2.
Definitely something strange going on. I've had it work before so can rule out it being an Arc Pro issue. Not sure why in this case importing the raw feature class zooms to the correct extent, but a layer file connecting to the same feature class doesn't. Any idea if there's any settings in the layer may be causing that?
I've even re-ran the Recalculate Feature Class tool to be sure, but the feature class itself was not showing a problem in the first place.
The layer used to connect to a GDB and was changed to the SQLite source so I am wondering if just playing with the source settings has messed with things. I have over 20 layers doing the same thing here so it's not just a quick fix to one unfortunately.
Set the map extent—ArcGIS Pro | Documentation
try setting an extent to see if it mitigates the behaviour, particularly if you aren't current with the ArcGIS Pro version
This seems to be an ArcGIS Pro 2.9 bug. If you setup the layer to point to a gdb source, and then change that to a sqlite by editing the Layer Properties, it will zoom to the world extent by default rather than the layer extent. So you have to setup the layer from the sqlite source initially for this to work appropriately.