Skip to content

dde-platform/dde-earth

Repository files navigation

dde-earth

Plugin based DDE(deep-time-digital-earth) earth sdk

✨ Introduction

With just one line of code, you can save a lot of packaging work for cesium in your project and immediately have the following incredible features:

  • Lightweight (core package gzip compressed to only 3.9kb)
  • Supports rapid expansion of earth capabilities through plugins
  • Supports TypeScript
  • Supports multiple languages
  • Layer management
  • Terrain management
  • Built-in event subscription (layer addition, layer removal, layer rendering, language switch, terrain switch…)
  • Layer operations (zoom, render)

In addition, the official provides a wealth of plugins to choose from:

  • Mouse event subscription
  • Layer order swap
  • Basic layer loading (tms, wmts, wms, arcgis)
  • GeoJson loading and rendering
  • Mapbox vector tile loading and rendering
  • NetCDF loading and rendering
  • TIFF loading and rendering
  • Navigation tools

And more.

📖 Quick Start

import { TIFFLayerLoader } from "@dde-earth/plugin-tiff-loader";
import { Earth } from "dde-earth";

const earth = new Earth("container");

// Use plugin, load tiff
earth.usePlugin(new TIFFLayerLoader());

earth.addLayer({
  url: "./tiff.tiff",
  method: "tiff",
  renderOptions: {
    single: {
      colorScale: "rainbow",
    },
  },
});

In this example, after initializing the earth in one line of code, by adding the TIFFLayerLoader plugin, the earth has the ability to load tiff.

The complete TypeScript mechanism makes dde-earth have intelligent code hints. Developers will find that they have a tiff type layer when they call the addLayer method.


View full documentation and examples on doc.dde-earth.com.

License

MIT License