cesium-mvt-imagery-provider
Usage
const imageryProvider = new MVTImageryProvider({
urlTemplate: "http://localhost:8080/sample_mvt/{z}/{x}/{y}.mvt",
layerName: "layerName",
worker: true,
credit: "cesium.js",
});
const layers = viewer.scene.imageryLayers;
const currentLayer = layers.addImageryProvider(imageryProvider);
currentLayer.alpha = 0.5;
See example directory for more details.
Development
yarn
yarn unlink && yarn build && yarn run link
cd ./example
yarn && yarn dev
- Then example cesium application is started
If you run example, you need to set sample MVT data to ./example/public
.
And you should change layerName
option for MVTImageryProvider
in ./example/src/Imagery.tsx
.
If you want to run this library on your vite project, you can do it like the following.
yarn build
cp ./dist ~/your_project && rm -rf node_modules/.vite
- Restart your project server