Skip to content

Instantly share code, notes, and snippets.

@ungoldman
Last active August 29, 2015 13:58
Show Gist options
  • Save ungoldman/10212142 to your computer and use it in GitHub Desktop.
Save ungoldman/10212142 to your computer and use it in GitHub Desktop.
Bootlet Leafstap 3.0
<!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: '&copy; <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('&nbsp;Wow <br> &nbsp;&nbsp;&nbsp;&nbsp;Such map <br> So leaflet <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So bootstrap')
.openPopup();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment