1.0.15 • Published 2 years ago

leaflet-gl-canvas v1.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

A plugin for visualizing large amounts of data on a GL-overlay on top of Leaflet

About

This plugin can be used to visualize large amounts of data on top of a Leaflet-map. Supports points, rasterized data, and triangles.

Installation

npm install leaflet-gl-canvas

Usage

// Import leaflet
import 'leaflet/dist/leaflet.css';
import * as L from 'leaflet';

// Import plugin
const { LeafletGlCanvas } = require('leaflet-gl-canvas');

// Create a leaflet-map
const map = L.map('map')
    .setView([50.00, 14.44], 0);

// Currently requires values and a supplied colormap in the format [[r, g, b], [r, g, b], [r, g, b]...]
// R, G and B each being a value between 0 and 1
const data = {
    latitudes: [1.0, 2.0, 3.0],
    longitudes: [-3.0, 2.0, 5.0],
    values: [255, 255, 255],
    colorMap: [...Array(256).keys()].map(item => [item/256, item/256, item/256]),
    type: 'points' // or raster or bounds
}
const leafletGlCanvas = new LeafletGlCanvas(map, data, {
    drawingMode: 'points' // or triangles
})
1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago