I've got a question, it's concerning, shiny and leaflet, I'm using leafet on shiny, but I'd like to use the baselayer of googleMaps and I've found a leafletJs add-on that do the job by using just a little bit of code, but I was wondering how to translate this into shiny R, the code is this :
In the head section of the HTML page Include the GMaps JS API in your HTML, plus Leaflet:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY" async defer></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
Include the GoogleMutant javascript file:
<script src='https://unpkg.com/leaflet.gridlayer.googlemutant@latest/Leaflet.GoogleMutant.js'></script>
create an instance of L.GridLayer.GoogleMutant on your JS code:
var roads = L.gridLayer.googleMutant({
type: 'terrain' // valid values are 'roadmap', 'satellite', 'terrain' and 'hybrid'}).addTo(map);
The point is, I'm not familiar with Js, so maybe you could help me with this...?
Thanks.