Last active
September 11, 2015 21:58
-
-
Save filipkral/730b1b75b53facad03d9 to your computer and use it in GitHub Desktop.
Minimal Leaflet Map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Minimal Leaflet</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" /> | |
<style> | |
#map{ | |
width: 150px; | |
height:250px; | |
} | |
</style> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.js"></script> | |
<script src="//cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js"></script> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
var makeOverviewMap = function(id, options){ | |
var map = L.map(id, { | |
dragging: false, | |
touchZoom: false, | |
scrollWheelZoom: false, | |
doubleClickZoom: false, | |
boxZoom: false, | |
tap: false, | |
keyboard: false, | |
zoomControl: false, | |
attributionControl: false | |
}) | |
.setView([55.5, -4.3], 4); | |
L.esri.basemapLayer('Gray').addTo(map); | |
L.marker([51.5, -0.09]).addTo(map); | |
return map; | |
} | |
makeOverviewMap('map'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Minimal Leaflet</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" /> | |
<style> | |
#map{ | |
width: 300px; | |
height:500px; | |
} | |
</style> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.js"></script> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
var map = L.map('map').setView([55.505, -4.3], 5); | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { | |
attribution: '© <a href="http://osm.org/copyright">OSM</a>' | |
}).addTo(map); | |
L.marker([51.5, -0.09]).addTo(map) | |
//.bindPopup('A pretty CSS3 popup.<br> Easily customizable.') | |
//.openPopup() | |
; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment