How to make extent of a datasource plugin layer change when “Zoom To Layer” is selected after changes occur to the datasource file.

489
2
Jump to solution
04-20-2022 04:33 PM
StevenCorpus
New Contributor

I have an add-in that uses a datasource plugin. The plugin uses a proprietary file as its source. The add-in uses the proprietary file’s extension to mark it as a custom item in ArcGIS Pro Catalog.

When the item is added to a map as a feature layer, the layer’s extent matches the data in proprietary file.

The add-in also has a mechanism for adding GIS data to the propriety files of existing feature layers that use the datasource plugin. When the propriety file is updated with GIS Data, the attribute table updates as does the features shown for the layer. However, when the updated feature layer is right-clicked and “Zoom To Layer” is selected, the extent remains the same as when the feature layer was added to the map (or when the project was open if the feature layer was added to the map in a previous ArcGIS Pro session).

If I save and re-open the project, Zoom To Layer works correctly on the datasource plugin feature layer that had its source file modified in the previous session.

I have overridden the GetExtent() method of the PluginTableTemplate with the latest extents and that hasn’t fixed the issue.

Is it possible to make extent of a datasource plugin layer change when “Zoom To Layer” is selected after changes occur to the datasource file within an ArcGIS Pro session?

0 Kudos
1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

Hi Steven,

As you probably guessed, we are caching the result of the first call to GetExtent(). There isn't currently a way around this limitation, but we are working to address it in a future release.

--Rich

View solution in original post

0 Kudos
2 Replies
RichRuh
Esri Regular Contributor

Hi Steven,

As you probably guessed, we are caching the result of the first call to GetExtent(). There isn't currently a way around this limitation, but we are working to address it in a future release.

--Rich

0 Kudos
StevenCorpus
New Contributor

Thanks!

0 Kudos