JSFiddle - React, Tailwind, and code Playground

by Albin Larsson

HTML

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<div id="map">

</div>

CSS

#map {
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
}

JavaScript

var map = L.map('map', {attributionControl: false}).setView([51.505, -0.09], 13);

L.control.attribution({prefix: ''}).addTo(map);

L.tileLayer('https://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png', {
  attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors & <a href="http://openstreetmap.se/">OpenStreetMap Sverige</a>',
  maxZoom: 18,
  subdomains: 'abc'
}).addTo(map);