Select to view content in your preferred language

What is FeatureLayer selection for?

797
4
11-09-2010 02:44 PM
DavidElies
Deactivated User
I'm trying to use the FeatureLayer.selectedFeatures to run a query, but I don't know how to get the geometry.  So, my questions are multiple:

What are the selectedFeatures supposed to be used for anyway?

Can I get the geometry from selected features?

Is there a way to get the geometry from multiple polygons?

Thanks so much!
Tags (2)
0 Kudos
4 Replies
DasaPaddock
Esri Regular Contributor
It's usually used in editing scenarios. You first have to select the features using:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#selectFeatures()
0 Kudos
DavidElies
Deactivated User
Thanks for the reply, dpaddock!

Because of the simplicity of selecting, I thought it would be the answer to my dillema, but perhaps it isn't.  Is it possible to get the union of Polygons?  It looks like there is a union function for Extents, but since it returns an Extent, I assume it just returns the bounding box that contains both Extents, (which would include a lot more area than I want).  I was really hoping to use the geometry of disconnected polys in a query.  Is this even possible?
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
DavidElies
Deactivated User
Thanks dpaddock!

I didn't realize that polygons naturally supported multiple disjoint shapes.  I didn't understand what the rings were.  I added each ring from my selected polygons to a "master" polygon and used that as the geometry for the query!  This is exactly what I was looking for.  Thanks so much!
0 Kudos