SetMapExtent - receive "required Extent argument was not supplied" error
All,
I am expanding on the Search by Address sample workflow that will search and highlight the street segment the house number would be on if the actual address point is not found. The search works and returns results in the results window. I can click on the results and they zoom to the features.
What we need is for the map to zoom automatically to the features. This has got to be simple but I am new to this (we are evaluating - haven't had training or anything).
It returns this error:
/customer/servlet/servlet.FileDownload?file=00P6000000e88MyEAI
Here are some shots of the workflow. I have a variable streetsegmentExtent that is set to be of type Envelope. However, it is like it is not getting set. From other postings, it seems like I need to initialize the variable as a New Envelope, but not sure where I should do this. I know the featureset has data.
/customer/servlet/servlet.FileDownload?file=00P6000000e88N3EAI
Settings for individual tools...
/customer/servlet/servlet.FileDownload?file=00P6000000e88N8EAI
/customer/servlet/servlet.FileDownload?file=00P6000000e88NDEAY
Any ideas?
Thanks,
Carmen
-
Hi Carmen,
Are you getting Geometry when you generate the FeatureSet of results? A FeatureSet doesn't require geometry, but it won't have an extent if there isn't any Geometry in it.
You should not have to initialize the variable - the GetFeatureSetExtent activity will do that for you.
0 -
For the QueryTask activity, is the argument Return Geometry set to true? (by default it is false)
"If true, each feature in the FeatureSet includes the geometry. Since the geometry makes up a significant portion of the response, only use when you plan to use the geometry of the feature, for example to include them on a map. By default, this is false."
0 -
Thank you Malcolm and Nick for reminding me about the Query Task returngeometry. I had run into the same thing when working with Flex APi (not related to Essentials) a while back so it all made sense.
Solution: I set the returngeometry parameter to True for the QueryTasks and then had to indicate the Out spatial reference (our service was different from the map) and it worked fine.
Interesting trying to apply what I have done with the Flex API to the world of GeoCortex Workflow and Essentials/Silverlight Viewer world. I am not sure if it makes it easier or harder!
Carmen
0
Please sign in to leave a comment.
Comments
3 comments