this example demonstrates how to call a wms from the mapbox.js library. in this case we are using the national broadband map wms and displaying the low resolution data (techg_50_f2012) fiber footprint for june 2012 on a basemap.
Last active
August 5, 2016 15:51
-
-
Save feomike/6042244 to your computer and use it in GitHub Desktop.
mapbox.js wms 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 name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<script src='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> | |
<body> | |
<div id='map'></div> | |
<script type='text/javascript'> | |
var map = L.mapbox.map('map', 'examples.map-y7l23tes') | |
.setView([37, -99], 5); | |
//http://apps.fcc.gov/geoserver/fcc/techd_50_f2012/wms | |
//techd_50_f2012 | |
//http://apps.fcc.gov/geoserver/fcc/techg_50_f2012/wms | |
//techg_50_f2012 | |
var precipitation = L.tileLayer.wms("http://apps.fcc.gov/geoserver/fcc/techg_50_s2013/wms", { | |
format: 'image/png', | |
transparent: true, | |
layers: 'techg_50_s2013' | |
}).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment