Socket
Socket
Sign inDemoInstall

@deck.gl/layers

Package Overview
Dependencies
Maintainers
6
Versions
461
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deck.gl/layers

deck.gl core layers


Version published
Weekly downloads
144K
decreased by-21.16%
Maintainers
6
Weekly downloads
 
Created

What is @deck.gl/layers?

@deck.gl/layers is a versatile library for creating and rendering complex visualizations on top of maps using WebGL. It provides a variety of pre-built layers for different types of data visualization, including scatter plots, heatmaps, and 3D extrusions.

What are @deck.gl/layers's main functionalities?

ScatterplotLayer

The ScatterplotLayer is used to render a collection of points, each with a specified position, size, and color. This is useful for visualizing data points on a map.

const scatterplotLayer = new ScatterplotLayer({
  id: 'scatterplot-layer',
  data: [
    {position: [-122.45, 37.78], size: 100},
    {position: [-122.46, 37.79], size: 200}
  ],
  getPosition: d => d.position,
  getRadius: d => d.size,
  getColor: [255, 0, 0]
});

HeatmapLayer

The HeatmapLayer is used to create a heatmap visualization, where the intensity of the heatmap is determined by the weight of each data point. This is useful for visualizing density or intensity of data points.

const heatmapLayer = new HeatmapLayer({
  id: 'heatmap-layer',
  data: [
    {position: [-122.45, 37.78], weight: 1},
    {position: [-122.46, 37.79], weight: 0.5}
  ],
  getPosition: d => d.position,
  getWeight: d => d.weight
});

GeoJsonLayer

The GeoJsonLayer is used to render GeoJSON data, which can include points, lines, and polygons. This is useful for visualizing geographic features and boundaries.

const geoJsonLayer = new GeoJsonLayer({
  id: 'geojson-layer',
  data: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/bart-stations.json',
  pickable: true,
  stroked: false,
  filled: true,
  extruded: true,
  getFillColor: [160, 160, 180, 200],
  getLineColor: [255, 255, 255],
  getRadius: 100,
  getLineWidth: 1,
  getElevation: 30
});

Other packages similar to @deck.gl/layers

Keywords

FAQs

Package last updated on 11 Oct 2023

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