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 committed Feb 10, 2023
1 parent f3da85e commit c8b6678
Showing 29 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/3dtiles_ion.html
Original file line number Diff line number Diff line change
@@ -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 : ----------

2 changes: 1 addition & 1 deletion examples/effects_split.html
Original file line number Diff line number Diff line change
@@ -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) {
2 changes: 1 addition & 1 deletion examples/effects_stereo.html
Original file line number Diff line number Diff line change
@@ -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) {
2 changes: 1 addition & 1 deletion examples/entwine_3d_loader.html
Original file line number Diff line number Diff line change
@@ -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;

2 changes: 1 addition & 1 deletion examples/geoid_geoidLayer.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/itowns-potree.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/misc_camera_animation.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/misc_camera_traveling.html
Original file line number Diff line number Diff line change
@@ -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 : ----------
2 changes: 1 addition & 1 deletion examples/misc_clamp_ground.html
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion examples/misc_collada.html
Original file line number Diff line number Diff line change
@@ -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')
2 changes: 1 addition & 1 deletion examples/misc_colorlayer_visibility.html
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion examples/misc_custom_controls.html
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion examples/misc_custom_label.html
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion examples/misc_georeferenced_images.html
Original file line number Diff line number Diff line change
@@ -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: {
2 changes: 1 addition & 1 deletion examples/plugins_drag_n_drop.html
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion examples/source_file_geojson_3d.html
Original file line number Diff line number Diff line change
@@ -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', {
2 changes: 1 addition & 1 deletion examples/source_file_geojson_raster.html
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion examples/source_file_gpx_3d.html
Original file line number Diff line number Diff line change
@@ -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();
2 changes: 1 addition & 1 deletion examples/source_file_gpx_raster.html
Original file line number Diff line number Diff line change
@@ -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({
2 changes: 1 addition & 1 deletion examples/source_file_kml_raster.html
Original file line number Diff line number Diff line change
@@ -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({
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_3d.html
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_raster.html
Original file line number Diff line number Diff line change
@@ -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) {
2 changes: 1 addition & 1 deletion examples/vector_tile_3d_mesh.html
Original file line number Diff line number Diff line change
@@ -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 : ----------

3 changes: 1 addition & 2 deletions examples/view_3d_map.html
Original file line number Diff line number Diff line change
@@ -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 : ----------
3 changes: 1 addition & 2 deletions examples/view_3d_mns_map.html
Original file line number Diff line number Diff line change
@@ -72,9 +72,8 @@
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);
// itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT.json').then(addElevationLayerFromConfig);

// ---------- ADD SOME WIDGETS : ----------

2 changes: 1 addition & 1 deletion examples/widgets_minimap.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/widgets_navigation.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/widgets_scale.html
Original file line number Diff line number Diff line change
@@ -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);



2 changes: 1 addition & 1 deletion examples/widgets_searchbar.html
Original file line number Diff line number Diff line change
@@ -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);



0 comments on commit c8b6678

Please # to comment.