Working on maps, it is great to add widget allowing to show one dataset or another, using one layer or another. Leaflet allows to build the control widget directly while doing the map. Every layers you want to create must be added to the same map, all attributed to a “group“. Then, the control widget will allow you to switch from a group to another. The code below should help you understand the concept, and everything is explained more in detail on the amazing Rstudio tutorial.

 


Not what you are looking for ? Make a new search !

[mediatagger]


Leave a Reply

avatar
  Subscribe  
Notify of