Skip to content

Commit 431161e

Browse files
Merge pull request #101 from geoadmin/feat-PB-2155-better-ol-example
PB-2155: Replaces CodePen exemple with CodeSandbox
2 parents 838692c + f701377 commit 431161e

7 files changed

Lines changed: 28 additions & 19 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
*.zip
3+
.idea
34
.vscode
45
.vite_opt_cache
56

visualize-data/3d-tiles.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,4 @@ example='{
6666

6767
An example of a Cesium application using terrain tiles, 3D buildings and a WMTS layer.
6868

69-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/NPGLwVO?default-tab=js%2Cresult&editable=true&zoom=0.5" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
70-
</iframe>
69+
<iframe src="https://codesandbox.io/embed/73fz8h?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="Terrain, 3D Buildings and WMTS (CesiumJS)" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

visualize-data/terrain-service.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,4 @@ example='{
5555

5656
An example of a Cesium application using terrain tiles, 3D buildings and a WMTS layer.
5757

58-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/NPGLwVO?default-tab=js%2Cresult&editable=true&zoom=0.5" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
59-
</iframe>
58+
<iframe src="https://codesandbox.io/embed/73fz8h?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="Terrain, 3D Buildings and WMTS (CesiumJS)" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

visualize-data/vector-tiles.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,14 @@ example='{
137137

138138
An example using MapLibre to display the Light Base Map:
139139

140-
<iframe height="600" style="width: 100%;" scrolling="no" title="Maplibre Vector Tiles" src="https://codepen.io/geoadmin/embed/XJmPzJo?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
141-
</iframe>
140+
<iframe src="https://codesandbox.io/embed/d5vm45?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="Simple VectorTiles" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
141+
142+
## Example: OpenLayers
143+
144+
Another example that is using OpenLayers' [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) library to display the Light Base Map.
145+
146+
<iframe src="https://codesandbox.io/embed/6twfj8?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="VectorTiles in OpenLayers" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
147+
148+
The same example but using LV95 frame with OpenLayers:
149+
150+
<iframe src="https://codesandbox.io/embed/nlgnwp?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="VectorTiles in OpenLayers in LV95" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

visualize-data/wms.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,10 @@ The output image:
172172

173173
This OpenLayers example shows how the CadastralWebMap appears differently when loaded using a WMTS compared to a tiled WMS.
174174

175-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/ogjMOay?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
176-
</iframe>
175+
<iframe src="https://codesandbox.io/embed/94ph6k?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="CadastralWebMap WMS/WMTS comparison" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
176+
177+
<br />
178+
179+
Another OpenLayers example showing how to load a WMS layer with a gutter (buffer between tiles so that features overlapping them are fully rendered)
180+
181+
<iframe src="https://codesandbox.io/embed/06h77?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="vanilla OpenLayers with a WMS layer" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

visualize-data/wmts.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,10 @@ example='{
159159

160160
This OpenLayers example shows how the CadastralWebMap appears differently when loaded using a WMTS compared to a tiled WMS.
161161

162-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/ogjMOay?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
163-
</iframe>
162+
<iframe src="https://codesandbox.io/embed/94ph6k?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="CadastralWebMap WMS/WMTS comparison" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
164163

165164
<br/>
166165

167-
Using geo.admin.ch WMTS tiles in the new LV95 frame (EPSG:2056).
166+
Using geo.admin.ch WMTS tiles in the LV95 frame (EPSG:2056).
168167

169-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/xbwJoMO?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
170-
</iframe>
168+
<iframe src="https://codesandbox.io/embed/nlvrdk?view=preview&module=%2Fsrc%2Findex.jshidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="WMTS + WMS layer (OpenLayers 10+, EPSG:2056 / LV95)" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

visualize-data/xyz.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,12 @@ The output image:
5454

5555
### OpenLayers
5656

57-
An OpenLayers 10 example showing the Base Map layer as XYZ tiles:
57+
An OpenLayers 10 example showing the Base Map layer as XYZ tiles in LV95:
5858

59-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/GgpXMyg?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
60-
</iframe>
59+
<iframe src="https://codesandbox.io/embed/pzj48q?view=preview&module=%2Fsrc%2Findex.js&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="Simple XYZ in LV95" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
6160

6261
<br/>
6362

64-
An OpenLayers 10 example showing the SWISSIMAGE layer as XYZ tiles:
63+
An OpenLayers 10 example showing the SWISSIMAGE layer as XYZ tiles in WebMercator:
6564

66-
<iframe height="600" style="width: 100%;" scrolling="no" src="https://codepen.io/geoadmin/embed/YPyOxoR?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
67-
</iframe>
65+
<iframe src="https://codesandbox.io/embed/7m23n6?view=preview&hidenavigation=1" style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" title="Simple XYZ in WebMercator" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

0 commit comments

Comments
 (0)