Any way to click&drag-select features and change their styling in AGOL?

1034
4
08-04-2014 11:11 AM
BryanChastain
New Contributor III

Looking for an easy way for users to be able to select features interactively by rectangle (e.g. the Select tool in Desktop) and then have some way to modify the styling (say, change the color) of the selected features. The changes would need to be saved too, so can't just do browser-side styling only.

Here's an example of the scenario I'm thinking of:
Adam and Bob are discussing some parcels. To clarify the discussion, Adam makes a map on AGOL containing a layer of parcel features. He makes the parcels he's referring to show up as blue and sends Bob a link. Bob sees the blue parcels but has a few changes to make, so selects a few additional parcels and changes their color to red. Adam is able to see Bob's changes.

What's the easiest way to do this without having to use Desktop? Assume a parcels (or something like it) feature service (or KML, geoJSON, etc) has already been created.

4 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Bryan,

One way to accomplish this is using attributes and a unique symbology renderer.  For example, you could create a field called 'Selected' and have three possible values: Adam, Bob, None.  With ArcGIS Online you can easily symbolize the feature using this field.  Blue for Adam, red for Bob, and then an additional color for the other parcels.  Adam or Bob could select the parcel(s) of interest and change the attribute for the 'Selected' field.

0 Kudos
BryanChastain
New Contributor III

OK, so I publish a feature service with the symbology set up as you defined to AGOL, make sure it's shared and add it to a map. How would a user be able to click & drag to select the features they want and then change their "Selected" field?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

You won't be able to by clicking & dragging.  The user will need to select the feature, click Edit in the pop-up, and then change the 'Selected' field.  If you have a domain set up for this field, there will be an easy to use drop down with the three field choices (i.e. Adam, Bob, None).

If you're still looking to do this using a click & drag, I would recommend signing up for the Web AppBuilder Beta Program‌.  This application allows you to easily create web apps and further add customizations with knowledge of Esri's ArcGIS API for JavaScript.

0 Kudos
BryanChastain
New Contributor III

Yeah I'm in the AppBuilder beta already. I was just hoping something like this already existed to save me the work of writing it.

0 Kudos