WeAreFairphone / fprsmap

This is a Leaflet map of the local Fairphoners communities
https://map.fairphone.community
GNU General Public License v3.0
10 stars 7 forks source link

Have URL suffix per layer #6

Closed StefanBrand closed 7 years ago

StefanBrand commented 8 years ago

For each layer specify a URL suffix that can be used to have layers ( #5 ) open by default. Something along the lines of https://newluck77.github.io/fprsmap/?l=tmobile or https://newluck77.github.io/fprsmap/?l=tmobile&l=repair.

Roboe commented 8 years ago

Multiple layer selection URI will look similar to https://newluck77.github.io/fprsmap/?l=tmobile,repair. Keys (l in this case) should not be duplicated.

StefanBrand commented 7 years ago

The problem I'm facing is that I cannot use the location object's property and pass it to the initMap(defaultlayer) function as an object identifier.

StefanBrand commented 7 years ago

@Roboe Try it out (add for example ?l=shops to the URL)! Works great! :D

PS.: Downside is, that also ?shopsmeetupsangels would work... ;)