Making a Shiny app with synced leaflet views

leaflet.js is a

The leaflet R package by RStudio to allow seamless use of leaflet.js in R codes and Shiny web apps, as I have shown in the PBMS webapp. But how can we help users compare two (or more) maps, especially when they want to zoom in to look at the details.

Two new R pakcages leaflet.mini.charts and manipulateWidget extends the functionality of leaflet to allow syncing of two or more leaflet outputs by simply typing this command:

combineWidgets(mymap1, mymap2, ncol = 2)

| screenshot |

You can run a live demo here: https://moisture-leaflet2min.datalabs.ceh.ac.uk/

You can see the code of a minimal example in the gist here:

Go Top