Skip to content

syzdev/cesium-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

Introduction

Plugins for improving the availability of Cesium.

Documents

cesium-plugins documents

Installation

Using npm:

npm i cesium-plugins
import { PositionPicker } from 'cesium-plugins'

For quick sketches, you can import cesium-plugins directly from jsDelivr CDN.

<script type="module">
  import { PositionPicker } from 'https://cdn.jsdelivr.net/npm/cesium-plugins@1.0.63/index.js'
</script>

The library is also available in UMD format under the namespace CP.

<script src="https://cdn.jsdelivr.net/npm/cesium-plugins@1.0.63/index.umd.js"></script>
<script>
  const picker = new CP.PositionPicker(Cesium, viewer)
</script>

Overview

  • PositionPicker:Plugin for left mouse click to pick up longitude, latitude, and height.

  • Cesium3DTilesLoader:Plugin for loading and configuring 3DTiles.

  • Tooltip:Plugin for creating tooltip that follow mouse movement.

  • exportSceneAsImage:Function used to export the scene as an image.

  • FloodAnalysis:Plugin for simulating flood analysis.

  • RotateAroundPoint:Plugin for camera rotation around a point.

  • WaterMask:Plugin for generating dynamic water surface.

  • HTMLOverlay:Plugin for placing an HTML element on top of the Cesium canvas.

Usage

Make sure that Cesium has been set up and that the viewer has been initialized.

The following uses PositionPicker as an example to describe the basic usage of cesium-plugins.

import { PositionPicker } from 'cesium-plugins'
const picker = new PositionPicker(Cesium, viewer)

picker.pick(({ lon, lat, hgt }) => {
  console.log(lon, lat, hgt)
}, true)

About

Plugins for improving the availability of Cesium.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages