1.1.4 • Published 5 years ago
@planet/dynamic-tiles v1.1.4
Planet Dynamic Tiles
Dynamic tiles are served as numpy tiles. This module has the classes needed to support rendering those tiles inside of OpenLayers.
Developing locally.
After cloning the repository, run build, and use npm link. Example below:
$ npm install
$ npm run build
$ cd dist/
$ npm link
$ cd [to your project]
$ npm link @planet/dynamic-tilesIncluding in a project
import {NumpyLayer, NumpySource} from "@planet/dynamic-tiles/ol"Publishing
Please only publish the dist/ directory.
$ npm publish ./dist/Worker optimisation
The Layer rendering performance can be improved by using WebWorkers. To use it, the NumpyWorker needs imported the project and passed to the NumpyLayer.
Based on using the webpack worker-loader module.
import NumpyWorker from 'worker-loader!@planet/dynamic-tiles/worker';
...
const numpySource = new NumpySource();
numpySource.set('bands', ['r', 'g', 'b', 'a']);
numpySource.set('dtype', 'uint8');
numpySource.set('pixelDepth', 256);
const numpyLayer = new NumpyLayer({
source: numpySource,
workerClass: NumpyWorker,
style: {
name: 'rgb',
},
});Basic use
A small parcel enabled demo application is included.
npm install
cd demo/
npx parcel ./index.htmlYou will need a valid URL for an endpoint with NumpyTiles.
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.1
5 years ago
1.0.0
6 years ago
1.0.0-beta6
6 years ago
1.0.0-beta5
6 years ago
1.0.0-beta4
6 years ago
1.0.0-beta2
6 years ago
1.0.0-beta3
6 years ago
1.0.0-beta1
6 years ago