Skip to content

Commit

Permalink
fix(example): invert order of the ElevationLayer addition when using 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff authored and mgermerie committed Apr 14, 2023
1 parent 2a4e911 commit c6800c9
Show file tree
Hide file tree
Showing 29 changed files with 28 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/3dtiles_ion.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
new itowns.ElevationLayer(config.id, config),
);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// ---------- ADD 3D TILES MODEL FROM CESIUM ION SERVER : ----------

Expand Down
2 changes: 1 addition & 1 deletion examples/effects_split.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// Slide handling
function splitSliderMove(evt) {
Expand Down
2 changes: 1 addition & 1 deletion examples/effects_stereo.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

/* eslint-disable no-unused-vars */
function updateEyeSep(value) {
Expand Down
2 changes: 1 addition & 1 deletion examples/entwine_3d_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

var eptLayer, eptSource;

Expand Down
2 changes: 1 addition & 1 deletion examples/geoid_geoidLayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/itowns-potree.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
new itowns.ElevationLayer(config.id, config),
);
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/misc_camera_animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
new itowns.ElevationLayer(config.id, config),
);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/misc_camera_traveling.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
let layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);


// ---------- Select camera positions and travel through these positions : ----------
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_clamp_ground.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

function addMeshToScene() {
// creation of the new mesh (a cylinder)
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_collada.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// ThreeLoader can load each format proposed in ThreeJs examples loaders : https://github.com/mrdoob/three.js/tree/dev/examples/js/loaders
var promiseCollada = ThreeLoader.load('Collada', 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/models/collada/building.dae')
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_colorlayer_visibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

itowns.Fetcher.json('./layers/JSONLayers/Ortho.json').then(addColorLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/Cada.json').then(addColorLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

view.addEventListener(itowns.GLOBE_VIEW_EVENTS.GLOBE_INITIALIZED, function _() {
// eslint-disable-next-line no-console
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_custom_controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
new itowns.ElevationLayer(config.id, config),
);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

const customControls = {
// Disable pan movement
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_custom_label.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
config.source = new itowns.WMTSSource(config.source);
view.addLayer(new itowns.ElevationLayer(config.id, config));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
debug.createTileDebugUI(menuGlobe.gui, view);

// Create a custom div which will be displayed as a label
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_georeferenced_images.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

pictureInfos = {
panoramic: {
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins_drag_n_drop.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

DragNDrop.setView(view);
DragNDrop.register('geojson', DragNDrop.JSON, itowns.GeoJsonParser.parse, DragNDrop.COLOR);
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_geojson_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// Add a geometry layer, which will contain the multipolygon to display
var marne = new itowns.FeatureGeometryLayer('Marne', {
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_geojson_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);


// Display the content of two GeoJSON files on terrain with ColorLayer and FileSource.
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_gpx_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer);
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// update the waypoint
var distance, scale, point = new itowns.THREE.Vector3();
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_gpx_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);


const gpxSource = new itowns.FileSource({
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_kml_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// Fetch, Parse and Convert by iTowns
var kmlSource = new itowns.FileSource({
Expand Down
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

var color = new itowns.THREE.Color();
var tile;
Expand Down
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
var layer = new itowns.ElevationLayer(config.id, config);
view.addLayer(layer).then(menuGlobe.addLayerGUI.bind(menuGlobe));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

function isValidData(data) {
if(data.features[0].geometries.length < 1000) {
Expand Down
2 changes: 1 addition & 1 deletion examples/vector_tile_3d_mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);

// ---------- DISPLAY VECTOR TILED MAP DATA AS A ColorLayer : ----------

Expand Down
3 changes: 1 addition & 2 deletions examples/view_3d_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);

itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);


// ---------- ADD SOME WIDGETS : ----------
Expand Down
2 changes: 0 additions & 2 deletions examples/view_3d_mns_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}

itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNS_HIGHRES.json').then(addElevationLayerFromConfig);

// ---------- ADD SOME WIDGETS : ----------
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets_minimap.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/widgets_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/widgets_scale.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down
2 changes: 1 addition & 1 deletion examples/widgets_searchbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
new itowns.ElevationLayer(config.id, config),
).then(debugMenu.addLayerGUI.bind(debugMenu));
}
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig);
itowns.Fetcher.json('layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig);



Expand Down

0 comments on commit c6800c9

Please sign in to comment.