5

I have a cadastral map similar to this one from an ArcGIS Javascript API example:

Cadastral map

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Nov 18, 2012 at 22:39

1 Answer 1

6

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.

answered Nov 19, 2012 at 15:56
2
  • 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! Commented Nov 21, 2012 at 21:55
  • 1
    data on fiddle was broken. here it is updated with states data jsfiddle.net/J4sfK/36 Commented Sep 15, 2015 at 2:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.