This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
658da63
commit eca4ce0
Showing
19 changed files
with
66 additions
and
59 deletions.
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>SimpleLonLat</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.1.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">Grid from Field</h1> | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.1.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.4/chroma.min.js"></script> | ||
|
||
|
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField / inFilter</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -24,7 +24,7 @@ <h1 class="title mapTitle">ScalarField Filter</h1> | |
</div> | ||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.0/chroma.min.js"></script> | ||
<script src="https://sigdeletras.github.io/Leaflet.Spain.WMS/src/Leaflet.Spain.WMS.js"></script> | ||
|
@@ -40,7 +40,7 @@ <h1 class="title mapTitle">ScalarField Filter</h1> | |
|
||
/* DEM data from LIDAR - PNOA */ | ||
d3.request("data/castro_dem.tiff").responseType('arraybuffer').get( | ||
function(error, tiffData) { | ||
function (error, tiffData) { | ||
let dem = L.ScalarField.fromGeoTIFF(tiffData.response); | ||
let layerDem = L.canvasLayer.scalarField(dem, { | ||
color: chroma.scale('Spectral').domain([80, 0]) | ||
|
@@ -50,18 +50,18 @@ <h1 class="title mapTitle">ScalarField Filter</h1> | |
|
||
/* dynamic filtering */ | ||
let height = document.getElementById('height'); | ||
height.addEventListener('change', function() { | ||
height.addEventListener('change', function () { | ||
layerDem.setColor('blue'); | ||
let h = height.value; | ||
let f = function(v) { | ||
let f = function (v) { | ||
return v >= 0 && v <= h; | ||
}; | ||
layerDem.setFilter(f); | ||
document.getElementById('meters').innerHTML = '< ' + h + ' m' | ||
}); | ||
|
||
/* popup */ | ||
layerDem.on('click', function(e) { | ||
layerDem.on('click', function (e) { | ||
if (e.value !== null) { | ||
let v = e.value.toFixed(1); | ||
let html = (`<span class="popupText">${v} meters</span>`); | ||
|
@@ -76,4 +76,4 @@ <h1 class="title mapTitle">ScalarField Filter</h1> | |
</script> | ||
</body> | ||
|
||
</html> | ||
</html> |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField / Geotiff</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">ScalarField GeoTIFF</h1> | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.0/chroma.min.js"></script> | ||
|
||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField / Geotiff</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">ScalarField GeoTIFF</h1> | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.0/chroma.min.js"></script> | ||
|
||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField / Geotiff WCS </title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">ScalarField WCS</h1> | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.0/chroma.min.js"></script> | ||
|
||
|
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField / Vector</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">ScalarField > Vector</h1> | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.0/chroma.min.js"></script> | ||
|
||
|
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
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<head> | ||
<title>ScalarField from Geotiff </title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.1.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="examples.css" /> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet"> | ||
|
@@ -16,7 +16,7 @@ <h1 class="title mapTitle">Two different ScalarFields from multiband GeoTIFF</h1 | |
|
||
<!-- CDN --> | ||
<script src="//d3js.org/d3.v4.min.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.1.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="//npmcdn.com/[email protected]/dist/geotiff.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.4/chroma.min.js"></script> | ||
|
||
|
Oops, something went wrong.