I have had to replicate, duplicate, and masticate (it means chew, people) several layers on a web map in order to get them to show up like the clients want them to be shown.
However, now I have a LayerList that is obnoxious with repetitive layers.
Can I remove layers from the LayerList?
And how?
Solved! Go to Solution.
Thank you Robert! New thread here.
Mathias,
This might be a silly question but, how do you get your webmaps JSON? I should say, that I haven't worked a day in my life with JSON.
Use this URL with your webmap ID.
http://www.arcgis.com/sharing/content/items/<your webmapID>/data?f=pjson
Hmm thats rather anoying! I've tried that at least 10 times with the same URL as Mathias provided, and could not get it to Work. Now I tried again with your URL, and it worked! OMG!
Thanks June 🙂
Lars,
You can also use the ArcGIS Online Assistant app to find a webmap's JSON.
Link: ArcGIS Online Assistant
Just log in, Select "I want to", and then select "View an Item's JSON". Then select the map that you want to view.
Chris
How do you do this with a web map on portal? I go to http://gis.adamscounty.org/parcgis/sharing/content/items/f6693fbd7acb403b97de38d1bd0e0fa4/data?f=pjs... but I have no IOT numbers, like your example.
Lindsey,
You'll notice that the answer Mathais provided says to search for the "id" of your layers in the webmap json. So your would be "id": "land_use_4895",
Mathias,
FYI: I think it would be easier to use the layerInfo.title than the id as this is the text that is actually displayed to the user in the Layer List Widget and they would not need to view the webmap json to get the actual layer id.
if(this.config.hide && this.config.exclude.hide(layerInfo.title) >= 0) { return; }
It worked well but I could not find the Layerlist load event to call it every time the widget is activated (made visible).
I would like to implement a checkbox to filter some layers on my LayerList widget.
Could anyone help me with this issue?
You have to add that method yourself. It is not in the Widget.js by default.