Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Last active May 30, 2017 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wboykinm/b768a7c44792d1653a5c7311fcea7154 to your computer and use it in GitHub Desktop.
Save wboykinm/b768a7c44792d1653a5c7311fcea7154 to your computer and use it in GitHub Desktop.
ORI Final, tiled and hosted on S3
license: mit
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>External map layers</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.0.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>
L.mapbox.accessToken = 'pk.eyJ1IjoiZmFyYWRheTIiLCJhIjoiTUVHbDl5OCJ9.buFaqIdaIM3iXr1BOYKpsQ';
var map = L.mapbox.map('map',null,{
maxZoom: 17
})
var oriLayer = L.tileLayer('https://s3.amazonaws.com/kivalina-terrain/{z}/{x}/{y}.png', {
attribution: 'Map tiles by UVM SAL. Data by <a href="https://lta.cr.usgs.gov/ifsar_ori">USGS AMI</a>.'
}).addTo(map);
// MAPSMITH PLUGS IN REFERENCE LAYER URL HERE (AND TWEAKS OPACITY ACCORDINGLY):
var refLayer = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoibGFuZHBsYW5uZXIiLCJhIjoicUtlZGgwYyJ9.UFYz8MD4lI4kIzk9bjGFvg', {opacity: 0.25})
.addTo(map);
map.setView([67.730115, -164.547794], 13);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment