@aliothor/cesium-martini
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Cesium-Martini

This is a fork from cesium-martini, click to view details.

This module can create cesium terrain through raster tile service.

Cesium-Martini

安装

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;

Package Sidebar

Install

npm i @aliothor/cesium-martini

Weekly Downloads

10

Version

1.0.6

License

MIT

Unpacked Size

86.2 kB

Total Files

11

Last publish

Collaborators

  • pluto957