Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Leaflet | 766 | 337 | 171 | a month ago | 9 | February 16, 2022 | 291 | other | JavaScript | |
R Interface to Leaflet Maps | ||||||||||
Wind Layer | 397 | 10 | 2 months ago | 15 | April 09, 2021 | 11 | other | TypeScript | ||
:flags: :rocket: wind-layer | a openlayers && maptalks && amap && bmap && leaflet && mapbox-gl extension like windy.com | ||||||||||
Geopackage Js | 264 | 5 | 11 | 6 months ago | 107 | October 10, 2022 | 21 | mit | TypeScript | |
GeoPackage JavaScript Library | ||||||||||
Opengrid | 229 | 4 years ago | 67 | other | JavaScript | |||||
A user-friendly, map-based tool to combine and explore real-time or historical data. | ||||||||||
Kepler | 171 | a month ago | 76 | bsd-2-clause | JavaScript | |||||
The open source geosocial network platform written in NodeJs | ||||||||||
Node Tileserver | 141 | 5 years ago | 25 | JavaScript | ||||||
A lightweight tileserver based on NodeJS for serving bitmap and vector tiles. | ||||||||||
Leaflet.control.layers.tree | 123 | 25 days ago | 9 | March 26, 2021 | 12 | bsd-3-clause | JavaScript | |||
a Tree Layers Control for Leaflet | ||||||||||
Leaflet Headless | 88 | 16 | 14 | 5 years ago | 15 | July 22, 2017 | 8 | JavaScript | ||
Leaflet for node. | ||||||||||
Tessella | 83 | 2 years ago | 12 | June 03, 2020 | 7 | mit | JavaScript | |||
Lightweight Node.js Mapbox Vector Tiles server | ||||||||||
Fluentwebmap | 65 | 10 years ago | 1 | JavaScript | ||||||
This is a Node.JS + MongoDBwith a Leaflet frontend mapping application. It should be all self contained |
Leaflet for node.
Image
implementation and canvas from canvas.
Note that node-canvas needs some dependencies to be installed: for ubuntu: sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
examples/choropleth/
on my machine).Run npm install leaflet-headless
to install the package. Requiring leaflet-headless
will introduce a global L
which just works like in the browser.
For vector layers, make sure to use the canvas renderer if you want to use leaflet-image
:
var L = require('leaflet-headless');
var map = L.map(document.createElement('div')).setView([52, 4], 10);
var marker = L.marker([52, 4]).addTo(map);
var latlngs = [[52, 4], [54, 4], [54, 6], [52, 6], [52, 4]];
var polyline = L.polyline(latlngs).addTo(map);
Because jsdom does not support clientWidth
/clientHeight
, leaflet-headless
defaults to a map size of 1024x1024px. To adjust this size, use L.Map.setSize(width, height)
.
map.setSize(800, 600);
leaflet-headless
adds a convenience function to L.Map
to save the current map to an image using leaflet-image
.
L.Map.saveImage(filename, callback)
: Save image to filename
and call callback
when ready.
map.saveImage('test.png', function (filename) {
console.log('Saved map image to ' + filename);
});
examples/leaflet-image/
, using leaflet-image to output a .png
.examples/choropleth/
, Choropleth tutorial from leafletjs.com using leaflet-image to output a .png
.examples/mapbox-geojson
, use mapbox.js to render a GeoJSON file with simplestyle styling.~/leaflet-headless$ npm install
[...]
~/leaflet-headless$ cd examples/leaflet-image/
~/leaflet-headless/examples/leaflet-image/$ node index.js
Save to image using leaflet-image...
Saved test.png
npm test
This is inspired by rclark/server-side-leaflet.