All Projects β†’ justinmanley β†’ leaflet-draw-toolbar

justinmanley / leaflet-draw-toolbar

Licence: other
Leaflet.toolbar for Leaflet.draw. Example: https://justinmanley.github.io/leaflet-draw-toolbar/examples/popup.html.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to leaflet-draw-toolbar

mapus
A map tool with real-time collaboration πŸ—ΊοΈ
Stars: ✭ 2,687 (+4785.45%)
Mutual labels:  drawing, maps, leaflet
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+356.36%)
Mutual labels:  maps, leaflet
Pinpoint
JavaScript library for creating beautifully simple maps in seconds
Stars: ✭ 83 (+50.91%)
Mutual labels:  maps, leaflet
Atlas Of Thrones
An interactive "Game of Thrones" map powered by Leaflet, PostGIS, and Redis.
Stars: ✭ 253 (+360%)
Mutual labels:  maps, leaflet
Ngx.leaflet.component
angular 2+ / leaflet 1.x component collection
Stars: ✭ 46 (-16.36%)
Mutual labels:  maps, leaflet
Leaflet Swoopy
‡️ Swoopy Arrow Plugin for Leaflet
Stars: ✭ 52 (-5.45%)
Mutual labels:  maps, leaflet
Ember Leaflet
πŸ”₯ πŸƒ Easy and declarative mapping for ember
Stars: ✭ 201 (+265.45%)
Mutual labels:  maps, leaflet
coronavirus-map-dashboard
🦠 Coronavirus (COVID-19) Map Dashboard using coronavirus-tracker-api
Stars: ✭ 41 (-25.45%)
Mutual labels:  maps, leaflet
OoT-Interactive-Map
Interactive Map for the world of Zelda: Ocarina of Time
Stars: ✭ 22 (-60%)
Mutual labels:  maps, leaflet
echarty
Minimal R/Shiny Interface to ECharts.js
Stars: ✭ 49 (-10.91%)
Mutual labels:  maps, leaflet
Mapboard
A framework for data-rich web mapping πŸŒŽπŸ“Šβœ¨
Stars: ✭ 29 (-47.27%)
Mutual labels:  maps, leaflet
harp-leaflet
Leaflet plugin for harp.gl
Stars: ✭ 16 (-70.91%)
Mutual labels:  maps, leaflet
Leaflet
πŸƒ JavaScript library for mobile-friendly interactive maps
Stars: ✭ 32,591 (+59156.36%)
Mutual labels:  maps, leaflet
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (+20%)
Mutual labels:  maps, leaflet
Agentmaps
Make social simulations on interactive maps with Javascript! Agent-based modeling for the web.
Stars: ✭ 822 (+1394.55%)
Mutual labels:  maps, leaflet
Leaflet Dvf
Leaflet Data Visualization Framework
Stars: ✭ 678 (+1132.73%)
Mutual labels:  maps, leaflet
Prunecluster
Fast and realtime marker clustering for Leaflet
Stars: ✭ 473 (+760%)
Mutual labels:  maps, leaflet
Django Leaflet
Use Leaflet in your Django projects
Stars: ✭ 563 (+923.64%)
Mutual labels:  maps, leaflet
Leaflet Geoman
πŸ‚πŸ—ΊοΈ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+1878.18%)
Mutual labels:  drawing, leaflet
geofind
Multiplayer Geographical Guessing Game using PostGIS, Nuxt, Leaflet & Colyseus.
Stars: ✭ 31 (-43.64%)
Mutual labels:  maps, leaflet

leaflet-draw-toolbar

This Leaflet plugin provides Leaflet.toolbar-based toolbars for Leaflet.draw. There are two different styles of toolbars: control-style (fixed relative to the window), and popup-style (attached to a latlng on the map). Here's what they look like:

Control-style toolbar Popup-style toolbar
GIF of control-style toolbar GIF of popup-style toolbar
interactive example (control-style) interactive example (popup-style)

Control-style toolbars are like the zoom controls that come with Leaflet. Popup-style toolbars provide a natural way for users to interact with features drawn on the map.

The toolbars in this library are interoperable with the toolbars in Leaflet.draw, so both can be used on the same webpage (see example.

For more information on Leaflet.toolbar, see the API Reference and Building custom toolbars on the wiki.

Usage

Include Leaflet.toolbar and this library: npm install leaflet-toolbar leaflet-draw-toolbar.

You can then include Leaflet.Toolbar in your web application by adding the following HTML tags (paths below are relative to your project's root):

<script src="node_modules/leaflet-toolbar/dist/leaflet.toolbar.js"></script>
<script src="node_modules/leaflet-draw-toolbar/dist/leaflet.draw-toolbar.js"></script>
<link rel="stylesheet" href="node_modules/leaflet-toolbar/dist/leaflet.toolbar.css"/>
<link rel="stylesheet" href="node_modules/leaflet-draw-toolbar/dist/leaflet.draw-toolbar.css"/>

To add a toolbar for drawing on the map with Leaflet.draw:

new L.Toolbar2.DrawToolbar({
    position: 'topleft'
}).addTo(map);

To add a control-style toolbar for editing features drawn on the map with Leaflet.draw:

new L.Toolbar2.EditToolbar.Control({
    position: 'topleft'
}).addTo(map, drawnItems);

Note that drawnItems is the L.Layer containing the items drawn on the map.

To add a popup-style toolbar for editing features drawn on the map with Leaflet.draw:

new L.Toolbar2.EditToolbar.Popup({
    position: 'topleft'
}).addTo(map, drawnItems);

Note that drawnItems is the L.Layer containing the items drawn on the map.

Development

Run grunt. This will launch a PhantomJS headless browser and watch for changes. When you change a file, the JS and CSS will be linted, tested, and rebuilt.

Note: This package is based on Leaflet.draw#354. The icon spritesheet is taken from Leaflet.draw.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].