Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Dec 8, 2023
1 parent f7e939b commit ce136ba
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions dist/en/main/examples/sea-level.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h5 class="modal-title" id="tag-example-title"></h5>
<p id="shortdesc">Render sea level at different elevations</p>
<div id="docs"><p>
This example uses a <code>ol/source/Raster</code> with
<a href="https://blog.mapbox.com/styling-mapbox-terrain-rgb-c75d1cd71471">Mapbox Terrain-RGB tiles</a>
<a href="https://documentation.maptiler.com/hc/en-us/articles/4405444055313-RGB-Terrain-by-MapTiler">MapTiler Terrain-RGB tiles</a>
to "flood" areas below the elevation shown on the sea level slider.
</p>
</div>
Expand Down Expand Up @@ -187,10 +187,11 @@ <h5 class="source-heading">main.js</h5>

const elevation &#x3D; new XYZ({
// The RGB values in the source collectively represent elevation.
// Interpolation of individual colors would produce incorrect evelations and is disabled.
url: &#x27;https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key&#x3D;&#x27; + key,
// Interpolation of individual colors would produce incorrect elevations and is disabled.
url:
&#x27;https://api.maptiler.com/tiles/terrain-rgb-v2/{z}/{x}/{y}.webp?key&#x3D;&#x27; + key,
tileSize: 512,
maxZoom: 12,
maxZoom: 14,
crossOrigin: &#x27;&#x27;,
interpolate: false,
});
Expand Down
2 changes: 1 addition & 1 deletion dist/en/main/examples/sea-level.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/en/main/examples/sea-level.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions dist/en/main/examples/webgl-sea-level.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h5 class="source-heading">main.js</h5>

// band math operates on normalized values from 0-1
// so we scale by 255 to align with the elevation formula
// from https://cloud.maptiler.com/tiles/terrain-rgb/
// from https://cloud.maptiler.com/tiles/terrain-rgb-v2/
const elevation &#x3D; [
&#x27;+&#x27;,
-10000,
Expand All @@ -206,9 +206,10 @@ <h5 class="source-heading">main.js</h5>
opacity: 0.6,
source: new XYZ({
url:
&#x27;https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key&#x3D;&#x27; + key,
&#x27;https://api.maptiler.com/tiles/terrain-rgb-v2/{z}/{x}/{y}.webp?key&#x3D;&#x27; +
key,
tileSize: 512,
maxZoom: 12,
maxZoom: 14,
}),
style: {
variables: {
Expand Down
2 changes: 1 addition & 1 deletion dist/en/main/examples/webgl-sea-level.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ce136ba

Please sign in to comment.