|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="utf-8"> |
|
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> |
|
<title>ca_irrecoverable_c_total_2018_colored.tif</title> |
|
|
|
|
|
<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; } |
|
body, table, tr, td, th, div, h1, h2, input { font-family: "Calibri", "Trebuchet MS", "Ubuntu", Serif; font-size: 11pt; } |
|
#map { position:absolute; top:0; bottom:0; width:100%; } |
|
.ctl { |
|
padding: 2px 10px 2px 10px; |
|
background: white; |
|
background: rgba(255,255,255,0.9); |
|
box-shadow: 0 0 15px rgba(0,0,0,0.2); |
|
border-radius: 5px; |
|
text-align: right; |
|
} |
|
.title { |
|
font-size: 18pt; |
|
font-weight: bold; |
|
} |
|
.src { |
|
font-size: 10pt; |
|
} |
|
|
|
</style> |
|
|
|
</head> |
|
<body> |
|
|
|
<div id="map"></div> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
var osm = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', minZoom: 1, maxZoom: 10}); |
|
|
|
|
|
var cartodb = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/attribution">CartoDB</a>', minZoom: 1, maxZoom: 10}); |
|
|
|
|
|
var white = L.tileLayer("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEX///+nxBvIAAAAH0lEQVQYGe3BAQ0AAADCIPunfg43YAAAAAAAAAAA5wIhAAAB9aK9BAAAAABJRU5ErkJggg==", {minZoom: 1, maxZoom: 10}); |
|
|
|
|
|
var lyr = L.tileLayer('./{z}/{x}/{y}.png', {tms: 0, opacity: 0.7, attribution: "", minZoom: 1, maxZoom: 10}); |
|
|
|
|
|
var map = L.map('map', { |
|
center: [37.26872680767991, -119.30668824410479], |
|
zoom: 10, |
|
minZoom: 1, |
|
maxZoom: 10, |
|
layers: [osm] |
|
}); |
|
|
|
var basemaps = {"OpenStreetMap": osm, "CartoDB Positron": cartodb, "Without background": white} |
|
var overlaymaps = {"Layer": lyr} |
|
|
|
|
|
var title = L.control(); |
|
title.onAdd = function(map) { |
|
this._div = L.DomUtil.create('div', 'ctl title'); |
|
this.update(); |
|
return this._div; |
|
}; |
|
title.update = function(props) { |
|
this._div.innerHTML = "ca_irrecoverable_c_total_2018_colored.tif"; |
|
}; |
|
title.addTo(map); |
|
|
|
|
|
var src = 'Generated by <a href="https://gdal.org/programs/gdal2tiles.html">GDAL2Tiles</a>, Copyright © 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="https://gdal.org">GDAL</a> & <a href="https://www.osgeo.org/">OSGeo</a> <a href="https://summerofcode.withgoogle.com/">GSoC</a>'; |
|
var title = L.control({position: 'bottomleft'}); |
|
title.onAdd = function(map) { |
|
this._div = L.DomUtil.create('div', 'ctl src'); |
|
this.update(); |
|
return this._div; |
|
}; |
|
title.update = function(props) { |
|
this._div.innerHTML = src; |
|
}; |
|
title.addTo(map); |
|
|
|
|
|
|
|
L.control.layers(basemaps, overlaymaps, {collapsed: false}).addTo(map); |
|
|
|
|
|
map.fitBounds([[32.52951597035759, -114.13170203617946], [42.00793764500224, -124.48167445203012]]); |
|
|
|
</script> |
|
|
|
</body> |
|
</html> |
|
|
|
|