select features and update FC geometry

120
3
03-27-2020 12:21 PM
jaykapalczynski
Frequent Contributor

When the user views the map they will see all the counties assigned to them selected within the main County FC

they can select new counties from this main County FC which will add them to the current selected set

they can also select already selected features to Un-select them from the current selected set

Basically they are redefining the counties that are assigned to them

I then need to dissolve this newly defined selection set.

Looking for examples for my step 1 above for now...thoughts?  Examples?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Jay,

   There are a number of way to reach this goal depending on your desired workflow.

One way is to have a UI with two buttons one for add and one for subtract. The add button would query the FC for the map click to get the ObjectId of the clicked county. When you start the app you would be the ObjectIds of the users counties and add then to and array. Now that the user has clicked the map to add a county and you have that new OID (ObjectId) you push that to that array and use that in the FCs select method. Similar for the subtract button you would find the clicked OID and splice the array to remove that OID and then use that array of OIDs to update the FCs select method. This is one option using button. Or you can get more complicated and use shift+click and ctrl+click to add and remove.

0 Kudos
jaykapalczynski
Frequent Contributor

so the shift+click and ctrl+click would replace the UI buttons?  But with a bunch more code?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Jay,

  Not a bunch but a little more and less user intuitive without instruction.

0 Kudos