Skip to content

Commit 8dbb3d6

Browse files
Desplandisjailln
authored andcommitted
fix(examples): Replace Lyon's deprecated Ortho2009 sources
1 parent 2fbbcc3 commit 8dbb3d6

7 files changed

+46
-27
lines changed

examples/3dtiles_25d.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
// Add a WMS imagery source
3939
var wmsImagerySource = new itowns.WMSSource({
4040
extent: extent,
41-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
42-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
41+
name: 'ortho_latest',
42+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
4343
version: '1.3.0',
4444
crs: 'EPSG:3946',
4545
format: 'image/jpeg',

examples/misc_compare_25d_3d.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@
134134

135135
var wmsImagerySource = new itowns.WMSSource({
136136
extent: extent,
137-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
138-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
137+
name: 'ortho_latest',
138+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
139139
version: '1.3.0',
140140
crs: 'EPSG:3946',
141141
format: 'image/jpeg',

examples/misc_orthographic_camera.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
// add a WMS imagery source
6363
const wmsImagerySource = new itowns.WMSSource({
6464
extent: extent,
65-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
66-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
65+
name: 'ortho_latest',
66+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
6767
version: '1.3.0',
6868
crs: 'EPSG:3946',
6969
format: 'image/jpeg',

examples/source_stream_wfs_25d.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
setupLoadingScreen(viewerDiv, view);
6565

6666
wmsImagerySource = new itowns.WMSSource({
67-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
67+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
6868
networkOptions: { crossOrigin: 'anonymous' },
6969
version: '1.3.0',
70-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
70+
name: 'ortho_latest',
7171
crs: 'EPSG:3946',
7272
extent: extent,
7373
format: 'image/jpeg',

examples/view_25d_map.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
// Add a WMS imagery source
6060
var wmsImagerySource = new itowns.WMSSource({
6161
extent: extent,
62-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
63-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
62+
name: 'ortho_latest',
63+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
6464
version: '1.3.0',
6565
crs: 'EPSG:3946',
6666
format: 'image/jpeg',

examples/view_multi_25d.html

+33-14
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,37 @@
2929
var parent;
3030
var index;
3131
var wms;
32+
var wmsUrl;
3233
var obj;
3334
var offset;
3435
var tileLayer;
3536
var config;
3637

37-
var wmsLayers = [
38-
'fpc_fond_plan_communaut.fpcilot',
39-
'pvo_patrimoine_voirie.pvochausseetrottoir',
40-
'Ortho2009_vue_ensemble_16cm_CC46',
41-
'pos_opposable.poshauvoi',
42-
'MNT2015_Ombrage_2m',
43-
'cad_cadastre.cadilot',
38+
var wmsSources = [
39+
{
40+
name: 'fpc_fond_plan_communaut.fpcilot',
41+
url: 'https://download.data.grandlyon.com/wms/grandlyon',
42+
},
43+
{
44+
name: 'pvo_patrimoine_voirie.pvochausseetrottoir',
45+
url: 'https://download.data.grandlyon.com/wms/grandlyon',
46+
},
47+
{
48+
name: 'ortho_latest',
49+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
50+
},
51+
{
52+
name: 'pos_opposable.poshauvoi',
53+
url: 'https://download.data.grandlyon.com/wms/grandlyon',
54+
},
55+
{
56+
name: 'MNT2015_Ombrage_2m',
57+
url: 'https://download.data.grandlyon.com/wms/grandlyon',
58+
},
59+
{
60+
name: 'cad_cadastre.cadilot',
61+
url: 'https://download.data.grandlyon.com/wms/grandlyon',
62+
},
4463
];
4564

4665
var cubeTransformations = [
@@ -106,8 +125,8 @@
106125
url: 'https://download.data.grandlyon.com/wms/grandlyon',
107126
});
108127

109-
for (index = 0; index < wmsLayers.length; index++) {
110-
wms = wmsLayers[index];
128+
for (index = 0; index < wmsSources.length; index++) {
129+
wms = wmsSources[index];
111130
obj = new itowns.THREE.Object3D();
112131
offset = extent.center().toVector3().negate().applyEuler(cubeTransformations[index].rotation);
113132
offset.add(cubeTransformations[index].position.divide(scale));
@@ -116,24 +135,24 @@
116135
parent.add(obj);
117136
obj.updateMatrixWorld(true);
118137

119-
tileLayer = new itowns.PlanarLayer('planar' + wms + index,
138+
tileLayer = new itowns.PlanarLayer('planar' + wms.name + index,
120139
extent, obj, { disableSkirt: true });
121140

122141
view.addLayer(tileLayer);
123142

124143
var colorSource = new itowns.WMSSource({
125-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
144+
url: wms.url,
126145
version: '1.3.0',
127-
name: wms,
146+
name: wms.name,
128147
crs: 'EPSG:3946',
129148
format: 'image/jpeg',
130149
extent,
131150
});
132-
var colorLayer = new itowns.ColorLayer('wms_imagery' + wms + index, {
151+
var colorLayer = new itowns.ColorLayer('wms_imagery' + wms.name + index, {
133152
source: colorSource,
134153
});
135154
view.addLayer(colorLayer, tileLayer);
136-
var elevationLayer = new itowns.ElevationLayer('wms_elevation' + wms + index, {
155+
var elevationLayer = new itowns.ElevationLayer('wms_elevation' + wms.name + index, {
137156
source: elevationSource,
138157
useColorTextureElevation: true,
139158
colorTextureElevationMinZ: 144,

examples/widgets_3dtiles_style.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
// Add a WMS imagery source
4040
const wmsImagerySource = new itowns.WMSSource({
4141
extent: extent,
42-
name: 'Ortho2009_vue_ensemble_16cm_CC46',
43-
url: 'https://download.data.grandlyon.com/wms/grandlyon',
42+
name: 'ortho_latest',
43+
url: 'https://imagerie.data.grandlyon.com/wms/grandlyon',
4444
version: '1.3.0',
4545
crs: 'EPSG:3946',
4646
format: 'image/jpeg',
@@ -110,7 +110,7 @@
110110
view.domElement.onclick = (event) => {
111111
const intersects = view.pickObjectsAt(event, 0, [$3dTilesLayer]);
112112
const c3DTileFeatureClicked = $3dTilesLayer.getC3DTileFeatureFromIntersectsArray(intersects);
113-
113+
114114
if (c3DTileFeatureClicked) {
115115
const worldBox3 = $3dTilesLayer.computeWorldBox3(c3DTileFeatureClicked);
116116
cube.scale.copy(worldBox3.max.clone().sub(worldBox3.min));

0 commit comments

Comments
 (0)