Can One Toggle Layer Symbology On and Off?

1349
4
12-12-2019 12:59 PM
Mark_Hotz
Occasional Contributor II

I was given a spreadsheet of railway data and the data is all broken down by each railway company.  The request asks that they be able to turn/toggle on and off each railway.

The problem is that there are 522 railway companies in this North American data set (many of which are probably not even active), a sample TOC of which is listed below.

I have symbolized the data using the Unique Values option.  The data is point data and the rail values are symbolized by Standard Carrier Alpha Code.

Is there a way to configure ArcGIS Pro so that I would be able to physically turn on and off each point symbol in the TOC?  Or is the only way to achieve this is to create 522 separate feature classes, add them to the TOC in APRX file, and then group them to achieve this?

The data for North America looks like this:

Currently, my TOC appears as per this segment: 

Thanks

0 Kudos
4 Replies
MarkBockenhauer
Esri Regular Contributor

You could use 522 layers with definition query for each railroad.  All features can remain in the same feature class.  Still 522 layers though.

Right click on the layer - click properties - Definition Query

0 Kudos
Mark_Hotz
Occasional Contributor II

Thanks Mark:

I'm surmising that I have to do the Definition Query for each railroad?  I might just go back to the requester and tell them that it cannot be done this way LOL.  I mean, I can do it, but there are over 34,000 records in this feature class, and running a Definition Query 522 times would in essence mean that I'm copying that feature class 522 times...it might be a tad bit slow when it reaches Portal :-).

Not to worry though...your suggestion still does help.  If this is the only way it can be done then I might just show them how to query what they need in Portal instead :-).

0 Kudos
KoryKramer
Esri Community Moderator

Well, not 522 layers since Pro can handle multiple definition queries on a single layer!

Filter features with definition queries—ArcGIS Pro | Documentation  It would mean setting up all the def queries, but once that is done, the "toggle" part would be choosing what to display from the layer's Data > Definition Query group drop-down.  I've posted some demo's of this around GeoNet in the past; the quickest one I could find is in this video of Ideas that went into ArcGIS Pro 2.3. Ideas in ArcGIS Pro 2.3 - YouTube at 7min 56 seconds.  

Here was the idea: https://community.esri.com/ideas/2358 

Maybe that helps?

0 Kudos
Mark_Hotz
Occasional Contributor II

Kory:

Thanks for the feedback...most appreciated.  I will take a look at your suggestions and video today.  This data layer is eventually going to be published to our Portal (from ArcGIS Pro) so I wasn't sure how much this many layers would slow that server down.  However, your suggestions might just offer a viable alternative so there's definitely an advantage to learn what you are suggesting for sure.

Thanks again.