Zoom map over features
Hi everyone!
I'm creating a workflow with Geocortex Workflow Designer the takes some inputs and with a query task get some features.
I get the fratures and than i want to zoom map over these features.
how can i do that?
i've try with set map extent, is that the right way?, SetMapExtent ask as parameters the properrty Extent of an envelope object, to get this envelope may i use get geometry or GetFeatureSetExtent?
i need to run the external command ZoomToEsriFeatureSet?
Can anyone help me please?
thank's for attention
-
One way is to use a Set Map Extent activity. For the "Features" input, just put $query.results... It should be ok.
0 -
Yes, but SetMatExtent require as input an object of type ESRI.ArcGIS.Client.Geometry.Envelope.
How can i get this from a Query task that rpovide a ESRI.ArcGIS.Client.Tasks.Featureset object?
0 -
Hi Fillippo,
This is possible using a featureSet that is output from a query, you will need to include a 'GetFeatureSetExtent' activity after the query and before the SetMapExtent activity with the input as the featureSet output from the query.
N.B. you can include the expand function - .expand in your SetMapExtent activity in order to show a larger area than just the queried feature.
Also, if your queried feature is a point not a polygon or a line you would need to include a cast activity in order to give your point feature an envelope to be zoomed to.
I hope that helps,
Thanks,
Harry
0 -
Thanks @Harry Sturley? .
If someone is like me wondering about how to use .expand.
Check this post and see Amanda's answer.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer