Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarfonts committed Jul 8, 2024
0 parents commit 3e256c8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Binary file added image.tiff
Binary file not shown.
45 changes: 45 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Maplibre COG Protocol Example</title>
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css">
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<script src="dist/cogProtocol.js"></script>
<style>
html, body, #map {
margin:0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
let map = new maplibregl.Map({
container: 'map',
style: 'https://geoserveis.icgc.cat/contextmaps/icgc_orto_hibrida.json',
center: [0.501427, 41.656126],
zoom: 16,
hash: true
});

maplibregl.addProtocol('cog', cogProtocol);

map.on('load', () => {
map.addSource('imageSource', {
type: 'raster',
url: 'cog:///kriging-cog.tif#color:BrewerSpectral9,1.7084054885838,1.7919403772937',
});

map.addLayer({
source: 'imageSource',
id: 'imageLayer',
type: 'raster'
});
});

</script>
</body>
</html>
Binary file added kriging-cog.tif
Binary file not shown.

0 comments on commit 3e256c8

Please sign in to comment.