Select to view content in your preferred language

Show/Hide entities resulting from a classification from the legend

516
7
12-16-2022 01:21 AM
JasonBOCQUET
Occasional Contributor III

Hello Community,

I have a question very simple. 

I have a feature layer of line of metro in Paris. I used the name of the line to create a "classification" to have a coloured symbology for each line of metro.

But, now i want to integrate in my map a simple fonctionnality : the possibility to show and hide certain line of metro with a click on a checkbox or watherver. 

Actually, it's impossible from the layers windows to select which line i want to show or hide.

I want to know how it's possible to do something like that :

JasonBOCQUET_0-1671181161788.png

It could be on the legend, or in a "layer controller windows" it doesn't matter.

I just want to allow the users that use the application to show and hide what he want.

It's supposed to be a basic things in GIS, but i don't know why, i didn't find how to do that... 

It might be simple but i need your help to find this feature.

 

Thanks, have a nice day !

 

0 Kudos
7 Replies
Stefan_Thorn
Occasional Contributor II

Hi @JasonBOCQUET ,

It is a bit of work but this will give you that possibility.

  1. Create a group layer in ArcGIS Pro
  2. Copy the layer you now have as many metro lines you have and rename each layer to a metro line
  3. Per layer:
    1. Use definition query to select the right metro line for each layer
    2. Update the symbology of the layer (tip: use the same colour as used on the Paris Metro Map)
  4. when finished, right click on the group layer > Sharing:
    1. > Save as layer file (save your symbology and source) 
    2. > Share as web layer to publish your group layer to AGOL
  5. Add your published hosted feature layer to your map and all the metro lines are added as separate layers.

Succes!

JasonBOCQUET
Occasional Contributor III

Hey Stefan ! Thanks for your reply, i will test this.

 

I have one interrogation : if I didn't have ArcGIS Pro how could i have done ? 

0 Kudos
Stefan_Thorn
Occasional Contributor II

Do you build in AGOL? then it is similar workflow

0 Kudos
JasonBOCQUET
Occasional Contributor III

I have ArcGIS Pro but i told you this question because my coworker have not a arcgis pro licence.

 

In any case, i have not only the lines of metro to integrate, i have like 20 different features to integrate, and i want to have the possibility to choice what i want to see like on the picture i sent in my primary post.

There is no more easiest solution ?

 

Your solution is very good, but it cost much time to prepare all of the data

0 Kudos
RussRoberts
Esri Notable Contributor

You can use Map Viewer and do this. 

1. Duplicate layer 

RussellRoberts1_0-1671200723066.png

 

2. apply the filters to show/hide the values you want from each layer. Easiest way to do this is use Filter > Include & Exclude.

RussellRoberts1_1-1671200832568.png

 

3. On the layer you want to hide from legend  set this toggle to off on the properties panel

RussellRoberts1_2-1671200884528.png

 

JasonBOCQUET
Occasional Contributor III

Hello RussellRoberts,

 

Thanks for your reply. If I have like 20 layers, and for each layers i have more than 10 "class" that i want to make selectable, how can i do that quickly ? 

 

Your solution is very good but it seems to cost much time of manipulation. There is not a easiest way ?

 

I think about free GIS soft like QGIS for example, there is an innate type of display. It's not possible to reproduce this in ARCGOL ?

0 Kudos
RussRoberts
Esri Notable Contributor

The selectable properties like popups, legend props etc are driven per layer not per feature type in the layer. If you wanted to have layers as reference to not be selectable you would need those in a separate layer. 

0 Kudos