Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks in advance!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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! –  iamgin Nov 21 '12 at 21:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.