Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@planet/dynamic-tiles

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet/dynamic-tiles

Support for dynamically colored tiles from Planet Inc. tile servers.

  • 1.1.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
7
Weekly downloads
 
Created
Source

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-tiles

Including 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.html

You will need a valid URL for an endpoint with NumpyTiles.

Keywords

FAQs

Package last updated on 04 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc