Replies: 1 comment 5 replies
-
If you are loading a single LAS file you want to use the Also, if you are displaying the LAS file on the map you need to position and scale your point cloud correctly. Perhaps using |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am just a beginner with Web and Deck.gl .
I just wonder whether there is a way to load las file on the map.
import React, {useState} from 'react';
import {render} from 'react-dom';
import {StaticMap} from 'react-map-gl';
import DeckGL from '@deck.gl/react';
import {Tile3DLayer} from '@deck.gl/geo-layers';
import {COORDINATE_SYSTEM} from '@deck.gl/core';
import {CesiumIonLoader} from '@loaders.gl/3d-tiles';
import {Tiles3DLoader} from '@loaders.gl/3d-tiles';
import {PointCloudLayer} from '@deck.gl/layers';
import {LASWorkerLoader} from '@loaders.gl/las';
// import {PLYWorkerLoader} from '@loaders.gl/ply';
import {registerLoaders} from '@loaders.gl/core';
// Additional format support can be added here, see
// https://github.com/visgl/loaders.gl/blob/master/docs/api-reference/core/register-loaders.md
registerLoaders(LASWorkerLoader);
// registerLoaders(PLYWorkerLoader);
// Data source: kaarta.com
const LAZ_SAMPLE =
'http://localhost:8080/metuArch.las';
const layers3d = [
new PointCloudLayer({
id: 'laz-point-cloud-layer',
data: LAZ_SAMPLE,
coordinateOrigin: [ 126.97, 37.56],
coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,
getNormal: [0, 1, 0],
getColor: [255, 255, 255],
opacity: 0.5,
pointSize: 0.5
})
];
return (
);
}
export function renderToDOM(container) {
render(, container);
}
Beta Was this translation helpful? Give feedback.
All reactions