diff --git a/examples/entwine_3d_loader.html b/examples/entwine_3d_loader.html
index 923dca6675..9c6414e409 100644
--- a/examples/entwine_3d_loader.html
+++ b/examples/entwine_3d_loader.html
@@ -20,8 +20,8 @@
Specify the URL of a Entwine Point Tree to load:
-
If your dataset is not displaying at the right location,
- check that it has been converted in EPSG:4978
.
+
@@ -71,7 +71,8 @@
}
function readEPTURL() {
- var url = document.getElementById('ept_url').value || new URL(location.href).searchParams.get('ept');
+ const urlParams = new URL(location.href).searchParams
+ var url = document.getElementById('ept_url').value || urlParams.get('ept');
if (url) {
loadEPT(url);
@@ -100,7 +101,13 @@
itowns.View.prototype.addLayer.call(view, eptLayer).then(onLayerReady);
- debug.PointCloudDebug.initTools(view, eptLayer, debugGui);
+ eptLayer.whenReady
+ .then(() => debug.PointCloudDebug.initTools(view, eptLayer, debugGui));
+ }
+
+ function loadGrandLyon() {
+ document.getElementById('ept_url').value = 'https://download.data.grandlyon.com/files/grandlyon/imagerie/mnt2018/lidar/ept/';
+ readEPTURL();
}
readEPTURL();