I have a cadastral map similar to this one from an ArcGIS Javascript API example:
What I would like to do is selecting several parcels clicking on them and show the information related in a sidebar or floating panel. For example, I would like to select that big house on the right side and then few more spread on the map. Every time I click on one, I would like the application to show the information associated AND not losing that selection when clicking on a new one. In the end, I should have an array of selected features (or similar) that maybe I can re-use later.
I have tried Feature Layer with Selection example, but it does not fully fit my requirements, because depending on the distance between features, I can't select two of them without selecting many more that I do not need.
Is this possible? Can anyone explain the process?
1 Answer 1
Sounds like you want to select features and not clear the selection graphics layer each time you click a feature. If you're using a FeatureLayer, you would use SELECTION_ADD instead of SELECTION_NEW to add the selected features as you click on them.
-
Yes, exactly what I was looking for! If anyone a part of ADD features, also have to SUBTRACT features, here there is an example I found to do these operations with "click" and "Shift+Click". http://jsfiddle.net/J4sfK/ Pretty useful! Thanks @raykendo!Irene– Irene2012年11月21日 21:55:47 +00:00Commented Nov 21, 2012 at 21:55
-
1data on fiddle was broken. here it is updated with states data jsfiddle.net/J4sfK/36David Wilton– David Wilton2015年09月15日 02:50:36 +00:00Commented Sep 15, 2015 at 2:50
Explore related questions
See similar questions with these tags.