@aliothor/cesium-martini
v1.0.6
Published
Create cesium terrain through raster tile service
Downloads
4
Readme
Cesium-Martini
This is a fork from cesium-martini, click to view details.
This module can create cesium terrain through raster tile service.
安装
pnpm add @aliothor/cesium-martini
使用示例
import { Viewer, Resource } from "cesium";
import { MartiniTerrainProvider } from "@aliothor/cesium-martini";
const cesiumViewer = new Viewer("cesiumContainer");
const terrainLayer = new MartiniTerrainProvider({
url: new Resource({
url: 'https://a.tiles.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.png',
queryParameters: {
access_token: 'pk.eyJ1IjoibW91cm5lciIsImEiOiJWWnRiWG1VIn0.j6eccFHpE3Q04XPLI7JxbA'
}
}),
})
cesiumViewer.scene.terrainProvider = terrainLayer;