Last active
December 27, 2015 02:49
-
-
Save wboykinm/7255168 to your computer and use it in GitHub Desktop.
Reference Overlay Example
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> | |
<head> | |
<meta charset=utf-8 /> | |
<title></title> | |
<script src='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.js'></script> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.ie.css' rel='stylesheet'> | |
<![endif]--> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> | |
<body> | |
<div id='map'></div> | |
<script> | |
var map = L.mapbox.map('map').setView([44.2594312, -72.57705688], 15); | |
// Add a dynamic or external datasource - from WMS in this case | |
var orthoWMS = L.tileLayer.wms("http://maps.vcgi.org/arcgis/services/EGC_services/IMG_VCGI_BW_WM_CACHE/ImageServer/WMSServer", { | |
format: 'img/png', | |
transparent: true, | |
layers: 1, | |
attribution: 'State of Vermont' | |
}).addTo(map); | |
// Place the Mapbox reference layer in the Leaflet topPane | |
var topPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane); | |
var topLayer = new L.mapbox.tileLayer('landplanner.map-m2tg9ziq', { | |
maxZoom: 18 | |
}).addTo(map); | |
topPane.appendChild(topLayer.getContainer()); | |
topLayer.setZIndex(7); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment