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

1.2.3 • 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

Usage

import { Viewer, Resource } from "cesium";
import { MartiniTerrainProvider } from "@zjugis/cesium-martini";

const cesiumViewer = new Viewer("cesiumContainer");

const terrainLayer = new MartiniTerrainProvider({
  url: new Resource({
    url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}@2x.webp',
    queryParameters: {
      access_token: 'pk.eyJ1Ijoic3ZjLW9rdGEtbWFwYm94LXN0YWZmLWFjY2VzcyIsImEiOiJjbG5sMnFlZ28wb2d5MnFtb2xnMG90OW96In0.IE8Vqs0NTzCY0WqPzV9kcw'
    },
  }),
  requestVertexNormals: true,
});

cesiumViewer.scene.terrainProvider = terrainLayer;

Installation

This package is listed on NPM as @zjugis/cesium-martini. It can be installed using the command

npm install --save @zjugis/cesium-martini

Demo

online Demo

Launch the app in the demo folder, and then visit http://localhost:5173/

Cesium-Martini

pnpm install
pnpm dev

Credit

https://github.com/davenquinn/cesium-martini

Readme

Keywords

Package Sidebar

Install

npm i @zjugis/cesium-martini

Weekly Downloads

1

Version

1.2.3

License

MIT

Unpacked Size

279 kB

Total Files

8

Last publish

Collaborators

  • joeqhf