need to get current view extent and assign it to a variable
I need to assign the current viewer extent (xmin,ymin.xmax.ymax) to a variable and submit those coordinates to a geoprocess or a spatial query. How can I do this in a workflow? I would like an example, if possible.
I am still on 3.6 for a few days.
-
You can use the GetMapExtent activity, which outputs the current map extent as an Esri.ArcGIS.Client.Geometry.Envelope. This can be passed directly to the geometry field of a QueryTask, or if it's stored in a variable called 'extent', get the coordinates by using extent.XMin, extent.YMin, extent.XMax, extent.YMax.
See (http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/apiref/topic575.html) here for more details.
-Victoria
0 -
Vitoria--
Is this activity in Essetials 3.7? because I am in 3.6 and I do not see it.
Jeff
0 -
It is located about halfway through the list of activities under Common Client, between 'External Delay' and 'Prompt'
0 -
Victoria,
I've had a quick play with this activity and cannot get it working! I would like eventually to have it form part of a hard-coded print URL for 'template' type printing from a list of choices on a form... but I can't seem to nut out the getmapextent option!
My workflow at present simply runs the GetMapExtent activity - assigned to a variable 'map_extent' as ESRI.ArcGIS.Client.Geometry.Envelope. From there I use an alert to present to the client the string map_extent.XMax.ToString but this is not showing up? nothing even pops up so I hazard a guess it's not getting past the GetMapExtent part!
Do you have a very simple/quick example of how I can get the coordinates as strings displayed in the client so I know I'm on the right track?
any help appreciated..
cheers
Gareth
0 -
My apologies Jeff and Gareth, while the activity was available in Workflow in Essentials 3.6, the client-side activity wasn't implemented until version 1.4 of the Silverlight Viewer. When you upgrade it will work as described.
-Victoria
0 -
ahah!!
will get the workflow onto our 1.4 server and see how it goes!
thanks Victoria!
0 -
That's better!!! /customer/servlet/servlet.FileDownload?file=00P6000000e87wLEAQ
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
7 kommentarer