Skip to content

Commit

Permalink
example(entwine3d): add grand Lyon dataSet
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Feb 11, 2025
1 parent bd16768 commit c68c159
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions examples/entwine_3d_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div id="description">Specify the URL of a Entwine Point Tree to load:
<input type="text" id="ept_url" />
<button onclick="readEPTURL()">Load</button>
<p>If your dataset is not displaying at the right location,
check that it has been converted in <code>EPSG:4978</code>.</p>
<button onclick="loadGrandLyon()">Load the Grand Lyon
dataset</button>
<div id="share"></div>
</div>
<div id="viewerDiv">
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c68c159

Please sign in to comment.