Skip to content

Commit

Permalink
refactor(entwine): supp confing.crs
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Oct 11, 2024
1 parent 77f961e commit c6f7928
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion examples/entwine_3d_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@

eptLayer = new itowns.EntwinePointTileLayer('Entwine Point Tile', {
source: eptSource,
crs: view.referenceCrs,
});

itowns.View.prototype.addLayer.call(view, eptLayer).then(onLayerReady);
Expand Down
1 change: 0 additions & 1 deletion examples/entwine_simple_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@

const config = {
source: eptSource,
crs: view.referenceCrs,
...options,
}
eptLayer = new itowns.EntwinePointTileLayer('Entwine Point Tile', config);
Expand Down
6 changes: 0 additions & 6 deletions src/Layer/EntwinePointTileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,15 @@ class EntwinePointTileLayer extends PointCloudLayer {
* contains three elements `name, protocol, extent`, these elements will be
* available using `layer.name` or something else depending on the property
* name. See the list of properties to know which one can be specified.
* @param {string} [config.crs=ESPG:4326] - The CRS of the {@link View} this
* layer will be attached to. This is used to determine the extent of this
* layer. Default to `EPSG:4326`.
* @param {number} [config.skip=1] - Read one point from every `skip` points
* - see {@link LASParser}.
*/
constructor(id, config) {
super(id, config);
this.isEntwinePointTileLayer = true;
this.scale = new THREE.Vector3(1, 1, 1);

const resolve = this.addInitializationStep();
this.whenReady = this.source.whenReady.then(() => {
if (this.crs !== config.crs) { console.warn('layer.crs is different from View.crs'); }

// NOTE: this spacing is kinda arbitrary here, we take the width and
// length (height can be ignored), and we divide by the specified
// span in ept.json. This needs improvements.
Expand Down

0 comments on commit c6f7928

Please sign in to comment.