Zoom to extent of an entire layer
I'd like to create a Workflow that zooms to the extent of all the features in a map layer - just like using the Zoom To Layer function in ArcGIS.
I do know of the method to query the layer and select the features and then zoom to the extent of the featureSet, but I am hoping there is a bit simpler method to get the same result without going through an unnecessary query step.
0
-
You can use the Get Feature Layer Info activity (also for a mapservice url). The resulting FeatureLayerInfo object has an Extent property. 0 -
Thanks Nico. I added the activity to my workflow and gave it the two required parameters, but I have not been able to figure out how to get at the resulting properties. I've searched for a sample 4.13 workflow using this activity but no luck so far. If you can offer further guidance that would be great. Thanks. 0 -
Define Feature Layer URL as "https://services.arcgisonline.nl/arcgis/rest/services/Postcodes/Postcodepunten/MapServer/0" or something like that.
You can use a Set Map Extent activity and set the extent as featureLayerInfo1.Extent assuming featureLayerInfo1 is your variable name (output of the Get Feature Layer Info activity).0 -
Nico, thanks again. You confirmed that what I was able to piece together had me going in the right direction. But I wasn't able to get the zoom to extent to work until I converted the layer's extent from State Plane to Web Mercator (map projection). Thanks to Geocortex Support for getting on a screen share with me and noticing that important detail. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer