openseadragon-deckgl-overlay
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

OpenSeadragon deck.gl Overlay

An OpenSeadragon plugin that adds deck.gl overlay capability.

Compatible with OpenSeadragon 3.1.0 or greater.

Documentation

For ES Modules

To use, import the openseadragon-deckgl-overlay.js file and create a new instance of DeckGLOverlay.

For example:

import DeckGLOverlay from "openseadragon-deckgl-overlay.js";

const overlay = new DeckGLOverlay(this.viewer, (parent) => new Deck({
    parent,
    views: [new OrthographicView({})],
    controller: false,
    layers: [new ScatterplotLayer({id: "scatterplot", ...})]
}));

For Pure Javascript

To use, include the openseadragon-deckgl-overlay.js file after openseadragon.js on your web page.

To add deck.gl overlay capability to your OpenSeadragon Viewer, call deckGLOverlay(options) on it. The argument options is a same type of Deck constructor options.

For example:

var overlay = this.viewer.deckGLOverlay({
    layers: [new ScatterplotLayer({id: "scatterplot", ...})]
});

If you omit to set options, it will use the default options;

This will return a new object with the following methods:

  • deck(): Gives access to Deck.
  • resize(): If your viewer changes size, you'll need to resize the overlay by calling this method.

See online demo or demo.html for examples of it in use.

Package Sidebar

Install

npm i openseadragon-deckgl-overlay

Weekly Downloads

1

Version

0.2.1

License

BSD-3-Clause

Unpacked Size

7.22 kB

Total Files

4

Last publish

Collaborators

  • ynitto