Package Exports
- leaflet.webgl-temperature-map
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (leaflet.webgl-temperature-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Leaflet.WebglTemperatureMap
A simple and fast Leaflet canvas smooth polygons plugin. Uses paperJS under the hood to draw paths on canvas.
Demo
Basic Usage
npm i --save leaflet.webgl-temprature-mapimport L from 'leaflet';
import 'leaflet.webgl-temprature-map';
const map = L.map(); // creates map
const tempMap = L.webGlTemperatureMapLayer().addTo(map);
tempMap.setPoints([
[2630.0850293955414, 7132.896936250415, 64.16567943765965],
[4065.465306828053, 600.8491068712285, 41.28007958055719],
[4559.413280590601, 6877.027363962465, 30.497164030229907]
]);Requirements
- Leaflet ^1.5.0
- Leaflet-geometryutil ^0.9.1
Reference
L.webGlTemperatureMapLayer()
Return Object of class
Methods
- onAdd(map): Sets temperature map to leaflet map.
- setPoints(points: [x, y, value]): Adds array of points to the temperature map and draws it.
- needRedraw(): Redraws the temperature map.
Callbacks
- onDrawLayer({ layer, canvas, bounds, size, zoom, center, ce, ce_b, corner }): Call when layer did redraw.
- onLayerWillUnmount(): Call when layer will unmount.
- onLayerDidMount(): Call when layer did mount.
Changelog
0.0.1 — May 06, 2020
- Initial release.