Last active
August 29, 2015 13:58
-
-
Save ungoldman/10212142 to your computer and use it in GitHub Desktop.
Bootlet Leafstap 3.0
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Leafstrap</title> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css"> | |
<style> | |
#map { | |
height: 400px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="page-header"> | |
<h1>Bootlet Leafstrap 3.0</h1> | |
</div> | |
<p>Put a map on it!</p> | |
<div id="map"></div> | |
</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script> | |
<script> | |
// create a map in the "map" div, set the view to a given place and zoom | |
var map = L.map('map').setView([45, -122], 13); | |
// add an OpenStreetMap tile layer | |
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { | |
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' | |
}).addTo(map); | |
// add a marker in the given location, attach some popup content to it and open the popup | |
L.marker([45, -122]).addTo(map) | |
.bindPopup(' Wow <br> Such map <br> So leaflet <br> So bootstrap') | |
.openPopup(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment