JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet-src.js"></script>
<div id="map"></div>
<table id="properties"></table>
<button id="openStuff">Open Stuff</button>
CSS
#map {
height: 400px;
}
JavaScript
var lat = 50.91;
var lng = 1.38;
var zoom = 5;
var map = new L.Map('map');
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib = 'Map data © OpenStreetMap contributors';
var osm = new L.TileLayer(osmUrl, {
minZoom: 3,
maxZoom: 8,
attribution: osmAttrib
});
map.addLayer(osm);
map.setView(new L.LatLng(lat, lng), zoom);
var popup = L.popup()
.setContent('<p>Hello world!<br />This is a nice popup.</p>')
.on('click', onClick);
L.marker([51, 0]).bindPopup(popup).addTo(map);
L.marker([51, 1.5]).bindPopup(popup).addTo(map);
function onClick(event) {
event.target.closePopup();
}