Leaflet minimal map

by Pasky Org

HTML

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<div id="map"></div>

CSS

#map { 
     height: 400px;
}

JavaScript

// Create the map
var map = L.map('map', {
		center: [37.388704, -5.994489],
    zoom: 15,
    minZoom: 12,
    maxZoom: 18,
    zoomControl: false,
    
	});

// Set up the OSM layer
L.tileLayer(
    'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', 
    {maxZoom: 18}).addTo(map);

// add a marker in the given location
L.marker([37.388704, -5.994489]).addTo(map);

//add zoom control with your options
var zoomOptions = {
	position:'topright',
	zoomInTitle: 'Acercar',
	zoomOutTitle: 'Alejar'
};

L.control.zoom(zoomOptions).addTo(map);