Permalink
Browse files

added a third map

  • Loading branch information...
1 parent 4cf9fa7 commit 1a93613cb56cc0773b8cdfd8493adfacb650328c @andymboyle committed Oct 12, 2013
Showing with 34 additions and 2 deletions.
  1. +34 −2 index.html
View
@@ -34,7 +34,9 @@
<style>
#map { height: 600px; width: 100%; position: absolute; padding-bottom:20px;}
- #map2 { height: 600px; width: 100%; position: absolute; margin-top:600px}
+ #map2 { height: 600px; width: 100%; position: absolute; margin-top:620px;}
+ #map3 { height: 600px; width: 100%; position: absolute; margin-top:1240px;}
+
</style>
</head>
@@ -71,13 +73,18 @@
</div>
</div>
</div>
- <br>
<div class="row">
<div class="col-lg-12">
<div id="map2">
</div>
</div>
</div>
+ <div class="row">
+ <div class="col-lg-12">
+ <div id="map3">
+ </div>
+ </div>
+ </div>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
@@ -145,6 +152,31 @@
.bindPopup('A pretty popup when it is more zoomed in. <br><strong> Easily customizable.</strong>')
.openPopup();
+// Third map, with open street tiles
+ map3 = L.map('map3', {
+ scrollWheelZoom: false,
+ maxZoom: 16,
+ minZoom: 9,
+ //maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
+ }).setView([40.820779, -96.696556], 15);
+
+// add an OpenStreetMap tile layer
+ L.tileLayer(
+ 'http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+ attribution: 'Map data &copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
+ maxZoom: 16,
+ minZoom: 9
+ }).addTo(map3);
+
+ // City limits mask
+ L.tileLayer(
+ "http://media.apps.chicagotribune.com/maptiles/chicago-mask/{z}/{x}/{y}.png",
+ { maxZoom: 16, minZoom: 8, opacity: 0.5 }).addTo(map3);
+
+// add a marker in the given location, attach some popup content to it and open the popup
+L.marker([40.820779, -96.696556]).addTo(map3)
+ .bindPopup('Different street tiles. <br><strong> Easily customizable.</strong>')
+ .openPopup();
</script>
</body>

0 comments on commit 1a93613

Please sign in to comment.