Skip to content

Commit

Permalink
got the one map to show, second map is being rambunctious
Browse files Browse the repository at this point in the history
  • Loading branch information
andymboyle committed Oct 12, 2013
1 parent a3d4b50 commit e99c7bf
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

<style>
#map { height: 600px; width: 100%; position: absolute;}
#map2 { height: 600px; width: 100%; position: absolute;}
</style>
</head>

Expand Down Expand Up @@ -70,9 +71,14 @@ <h1>Leaflet-Tabletop</h1>
</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 -->
Expand All @@ -89,8 +95,8 @@ <h1>Leaflet-Tabletop</h1>
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(
Expand All @@ -107,10 +113,38 @@ <h1>Leaflet-Tabletop</h1>
{ 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.