JSFiddle - React, Tailwind, and code Playground
by EMIR MARQUES
HTML
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<div id="map"></div>
CSS
#map {
width:600px;
height:400px;
}
JavaScript
$(function(){
$map = $("#map");
var map = L.map(
$map[0],
{
zoom: 15
}
);
map.fitBounds([[42.897968, -83.25632], [42.897968, -83.25632]]);
map.setView([51.416166666667, 2.82081], 9);
var OpenMapSurfer_Grayscale = L.tileLayer('http://korona.geog.uni-heidelberg.de/tiles/roadsg/x={x}&y={y}&z={z}', {
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
})