-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting of leaflet layering and maps, with a link from the mapbox to the leaflet.
- Loading branch information
1 parent
afaea76
commit 343ed70
Showing
2 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset='utf-8' /> | ||
<title>Add a WMS source-Leaflet</title> | ||
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | ||
<!-- this form is more secure --> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin="" /> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script> | ||
<!-- <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> --> | ||
<!-- <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> --> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id='map'></div> | ||
<script> | ||
//lat and long swapped in set view. | ||
var map = L.map('map').setView([40.6892, -74.5447], 8); | ||
// var map = L.map('map', crs.L.CRS.EPSG3857); | ||
// var map = L.map('map',{ | ||
// container: 'map', | ||
// style: 'mapbox://styles/mapbox/light-v9', | ||
// zoom: 8, | ||
// center: [-74.5447, 40.6892] | ||
// }); | ||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiZGF2ZWlzbSIsImEiOiJCdjUxT0FzIn0.V9oIk_wUc4uZu7UBblR8mw', { | ||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', | ||
maxZoom: 18, | ||
id: 'mapbox.streets' | ||
}).addTo(map); | ||
var NAExposureIndex = L.tileLayer.wms('https://gis.nemac.org/nfwf?', { | ||
layers: 'NA_ExposureIndex', | ||
format: 'image/png', | ||
transparent: true, | ||
crs: L.CRS.EPSG3857 | ||
}, 'aeroway-taxiway').addTo(map); | ||
//is there a way to do the aeroway-taxiway overlay like in mapbox? | ||
|
||
|
||
// NAExposureIndex.addTo(map); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |