Skip to content

Repository files navigation

gplates-cesium-viewer

Shared Cesium 3D globe viewer core for GPlates apps: viewer initialization, WMTS/WMS imagery layer management, the lat/lon graticule overlay, and the scene background/skybox.

Extracted from gplates-app so that other GPlates frontends (e.g. the GPlates Portal web app) can reuse the same globe-rendering engine without pulling in Capacitor/Ionic or any other app-specific plumbing. Persistence (e.g. remembering the user's graticule preference), vector-layer bookkeeping, and animation/UI state are the caller's responsibility -- this package only touches the Cesium Viewer.

Companion package: gplates provides the plate-rotation math this package does not include.

Code Example

import { initCesiumViewer, createCesiumImageryProvider, drawBasemap } from 'gplates-cesium-viewer'

const provider = createCesiumImageryProvider({
  url: 'https://geosrv.earthbyte.org/geoserver/gwc/service/wmts',
  layerName: 'gplates:agegrid',
  style: '',
})

const viewer = initCesiumViewer(provider)

// later, switch basemaps
drawBasemap({
  id: 'geology',
  url: 'https://geosrv.earthbyte.org/geoserver/gwc/service/wmts',
  wmsUrl: 'https://geosrv.earthbyte.org/geoserver/gplates/wms',
  layerName: 'gplates:cgmw_2010_3rd_ed_gplates_clipped_edge_ref',
  style: '',
  title: 'Geology',
  subTitle: 'present day',
  icon: '',
  startTime: 0,
  endTime: 0,
  step: 0,
})

This package is a part of AuScope funded project GPlates.

About

Shared Cesium 3D globe viewer core for GPlates apps (viewer init, imagery layers, graticule, background)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages