JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<script src="http://leaflet.cloudmade.com/dist/leaflet.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="drawmap" style="width: 200px; height: 100px;"></div>
</body>
</html>
JavaScript
function init() {
map = new L.Map('drawmap');
var cloudmade = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
maxZoom: 18
});
map.addLayer(cloudmade);
//map.locateAndSetView(16);
var someCenter = new L.LatLng(53.72924, 33.41808);
map.addEventListener('load', add_necessary_event_listeners);
map.setView(someCenter, 16);
}
function add_necessary_event_listeners() {
alert("I am a very necessary event_listener");
}
$(document).ready(function() {
init();
});