https://github.com/backdrop-contrib/leaflet_widget
A Geofield widget that provides a Leaflet map form item and uses Leaflet.draw for adding and removing geometries.
https://github.com/backdrop-contrib/leaflet_widget
backdropcms geocoding leaflet location mapping user-interface widget
Last synced: 6 months ago
JSON representation
A Geofield widget that provides a Leaflet map form item and uses Leaflet.draw for adding and removing geometries.
- Host: GitHub
- URL: https://github.com/backdrop-contrib/leaflet_widget
- Owner: backdrop-contrib
- License: gpl-2.0
- Created: 2021-04-10T15:06:00.000Z (almost 5 years ago)
- Default Branch: 1.x-1.x
- Last Pushed: 2024-09-06T07:16:47.000Z (over 1 year ago)
- Last Synced: 2025-02-10T13:19:00.758Z (11 months ago)
- Topics: backdropcms, geocoding, leaflet, location, mapping, user-interface, widget
- Language: PHP
- Homepage: https://backdropcms.org/project/leaflet_widget
- Size: 573 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Leaflet Widget
A [Geofield](https://backdropcms.org/project/geofield) widget that provides a
Leaflet map widget using the [Leaflet.draw](https://github.com/Leaflet/Leaflet.draw)
library for adding features.
The library ships with this module, no need for an extra download.
*Leaflet Widget enables you to:*
- Insert markers based on text search widget (off by default)
- Create, edit and delete simple geometries: Point, Polyline, Polygon
- Configure available geometry types per field
- Supports single or multi-value Geofields (cardinality)
- Uses base layers defined by the Leaflet module
- API for additional base layers

## Installation
- Install this module using the official
[Backdrop CMS instructions](https://docs.backdropcms.org/documentation/extend-with-modules)
- Add or configure any Geofield to use the widget for input
## Requires
- Leaflet
- Geofield
## Issues
Bugs and Feature requests should be reported in the
[Issue Queue](https://github.com/backdrop-contrib/leaflet_widget/issues)
## Known Issues
Because of the way Geofield stores values, some types (circle, circlemarker)
are not available. They could get drawn, but they couldn't get saved.
The API of this module has changed compared to Drupal. That was a necessary
step to make it useful.
## Current Maintainers
- [Indigoxela](https://github.com/indigoxela)
## Credits
- "Ported" to Backdrop by Indigoxela
This module is not really a port from the [Drupal version](https://www.drupal.org/project/leaflet_widget),
but rather a complete rewrite to get the Geofield widget working with a recent
Leaflet (JS library) version. To achieve this it was necessary to get rid of the
formerly used Leaflet.widget library.
This module bundles the [Leaflet.draw](https://github.com/Leaflet/Leaflet.draw)
Javascript library by [Leaflet](http://leafletjs.com), which is
[MIT](https://github.com/Leaflet/Leaflet.draw/blob/develop/MIT-LICENSE.md)
licensed.
The location search widget utilizes the [Nominatim API](https://nominatim.org/)
via JavaScript (AJAX) to geocode text input into coordinates for markers.
## License
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.