How to get full extent of selected features

2413
2
Jump to solution
10-23-2012 09:36 AM
LisaNelson
New Contributor II
Hello,

I'm probably missing something obvious, but what is the best way to get the full extent of selected features from a layer?

I've used layer.selectFeatures() to get the featureSet, but can't figure out how to get the entire extent of the featureSet except iterating the set and using something like: features.geometry.getExtent()

Any ideas?

Thanks in advance!

Lisa
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
esri.graphicsExtent should do the job.
0 Kudos
LisaNelson
New Contributor II
Thanks!  That did the trick.  Used map.setExtent(esri.graphicsExtent(features)); after layer.selectFeatures()
0 Kudos