maplibre-gl-lidar 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/{LidarLayerAdapter-285f9P65.cjs → LidarLayerAdapter-eh59KEMT.cjs} +18142 -8
- package/dist/LidarLayerAdapter-eh59KEMT.cjs.map +1 -0
- package/dist/{LidarLayerAdapter-D3ctsDUb.js → LidarLayerAdapter-kyyfQw05.js} +18147 -13
- package/dist/LidarLayerAdapter-kyyfQw05.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +2 -2
- package/package.json +1 -1
- package/dist/LidarLayerAdapter-285f9P65.cjs.map +0 -1
- package/dist/LidarLayerAdapter-D3ctsDUb.js.map +0 -1
package/README.md
CHANGED
|
@@ -495,6 +495,32 @@ console.log(`Loaded ${data.pointCount} points`);
|
|
|
495
495
|
|
|
496
496
|
**Note:** LAS 1.2 and 1.4 are loaded using copc.js for optimal performance. LAS 1.0, 1.1, and 1.3 files automatically fall back to @loaders.gl/las.
|
|
497
497
|
|
|
498
|
+
## Framework Integration
|
|
499
|
+
|
|
500
|
+
### Next.js
|
|
501
|
+
|
|
502
|
+
When using maplibre-gl-lidar with Next.js, you need to configure webpack to handle Node.js built-in modules that are referenced (but not executed) in browser code. Add the following to your `next.config.js`:
|
|
503
|
+
|
|
504
|
+
```javascript
|
|
505
|
+
/** @type {import('next').NextConfig} */
|
|
506
|
+
const nextConfig = {
|
|
507
|
+
webpack: (config, { isServer }) => {
|
|
508
|
+
if (!isServer) {
|
|
509
|
+
config.resolve.fallback = {
|
|
510
|
+
...config.resolve.fallback,
|
|
511
|
+
fs: false,
|
|
512
|
+
path: false,
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
return config;
|
|
516
|
+
},
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
module.exports = nextConfig;
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
This configuration tells webpack not to bundle the `fs` and `path` modules for client-side code. These modules are only referenced in environment-guarded code paths that never execute in browsers.
|
|
523
|
+
|
|
498
524
|
## Coordinate Systems
|
|
499
525
|
|
|
500
526
|
Point clouds are automatically transformed to WGS84 (EPSG:4326) for display on the map. The loader reads the WKT coordinate reference system from the file and uses proj4 to transform coordinates. Supported features:
|