how do you expand an extent using a factor (like esri js)?
I've been trying to use the ZoomToExtent via the Run Command activity. The extent is too tight and I'd like to expand it. The Esri Js Extent class has an expand method. Is the method available in the in workflow? If so, how? If not, what other options do I have?
-
Hi Brian,
The Set Map Extent activity is what you are looking for. You can play around with decimal values for the Scale input to slightly zoom out from the feature. The other option would be to zoom to the extent, then have another Run Command with a ZoomOut.
Thanks, Stefan
0 -
Thanks Stefan (aka Tom?),
I ended up using the Set Map Extent, then the Run Command>StepZoomOut. I then checked the scale, if the map extent was still too close, I then used the Run Command ZoomToScale. Part of the problem I was running into was I am doing a Show Results (disconnected to the features being zoomed to) at the same time I am zooming to the features. For some reason the above zoom to workflow didn't work until I opened an empty table further upstream. I am guessing there contention when opening a table and zooming at the same time.
Although I've seemed to have found a suitable solution, I am still wondering if it is possible to use the .expand(x.x) method in a workflow?
0 -
Hi Brian,
I've seen the expand method used before; use a Get Feature Set Extent or Get Geometry Extent activity to get an extent from your features or geometries. Then use a Set Map Extent configured like this
Scale:
Geometry: =$getFeatureSetExtent1.extent.expand(2.5)
Features:
0 -
Hi Brian,
Sorry for the confusing post previously; I was signed in through an account used for testing purposes accidentally.
It is not possible to use Esri commands within Workflow; you might be able to use the Run Arcade Script activity; check out this link: https://developers.arcgis.com/arcade/function-reference/geometry_functions/#extent
Thanks, Stefan
0 -
Hi,
I was able to implement Amanda's suggestion successfully but I think this should be a build in functionality especially if zoom factor is defined in the Geocortex Layer. I have raised idea below.
https://communities.geocortex.com/s/ideas#087f2000000bqIbAAI
Thank you
Francesca
0
Please sign in to leave a comment.
Comments
5 comments