cmv / cmv-app

CMV - The Configurable Map Viewer - A community supported open source mapping framework built with the Esri JavaScript API and the Dojo Toolkit
https://demo.cmv.io/
MIT License
323 stars 278 forks source link

Save Layer Visibility State in URL Query Params #973

Closed reyemtm closed 3 years ago

reyemtm commented 3 years ago

I'm new to dojo so I'm not sure my code will compile, but I have a working method to save the current operational layers (not basemap) in the window URL query parameters. This means you can send someone a link and it will have the layers turned on that are in the URL query. I'm sure there are bugs to this as it is early days in testing, but if anyone is interested in this and can help with a pull request or can look over the code let me know.

Thanks

reyemtm commented 3 years ago

Are the layer ids forced to be unique across all layers? I am using the ids in this instance.

reyemtm commented 3 years ago

Looks like there is already a community widget for this...I'll have to check that out.