Permalink
Browse files

got the one map to show, second map is being rambunctious

  • Loading branch information...
1 parent a3d4b50 commit e99c7bfed66b5936692b1fbdab75f4a5ab934358 @andymboyle committed Oct 12, 2013
Showing with 39 additions and 5 deletions.
  1. +39 −5 index.html
View
@@ -34,6 +34,7 @@
<style>
#map { height: 600px; width: 100%; position: absolute;}
+ #map2 { height: 600px; width: 100%; position: absolute;}
</style>
</head>
@@ -70,9 +71,14 @@
</div>
</div>
</div>
+ <div class="row">
+ <div class="col-lg-8">
+ <div id="map2">
+ </div>
+ </div>
+ </div>
</div> <!-- /container -->
-
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
@@ -89,8 +95,8 @@
scrollWheelZoom: false,
maxZoom: 16,
minZoom: 9,
- maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
- }).setView([41.838299, -87.706953], small ? 9 : 11);
+ //maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
+ }).setView([41.838299, -87.706953], 13);
// add an OpenStreetMap tile layer
L.tileLayer(
@@ -107,10 +113,38 @@
{ maxZoom: 16, minZoom: 8, opacity: 0.5 }).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
-L.marker([51.5, -0.09]).addTo(map)
- .bindPopup('A pretty CSS3 popup. <br> Easily customizable.')
+L.marker([41.838299, -87.706953]).addTo(map)
+ .bindPopup('A pretty popup with information. <br><strong> Easily customizable.</strong>')
+ .openPopup();
+
+// Second map
+ map2 = L.map('map2', {
+ scrollWheelZoom: false,
+ maxZoom: 16,
+ minZoom: 9,
+ //maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
+ }).setView([41.838299, -87.706953], 13);
+
+// add an OpenStreetMap tile layer
+ L.tileLayer(
+ 'http://{s}.tribapps.com/chicago-print/{z}/{x}/{y}.png', {
+ subdomains: ['maps1'],
+ attribution: 'Map data &copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
+ maxZoom: 16,
+ minZoom: 9
+ }).addTo(map2);
+
+ // 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(map2);
+
+// add a marker in the given location, attach some popup content to it and open the popup
+L.marker([41.838299, -87.706953]).addTo(map2)
+ .bindPopup('A pretty popup with information. <br><strong> Easily customizable.</strong>')
.openPopup();
+
</script>
</body>
</html>

0 comments on commit e99c7bf

Please sign in to comment.