Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raruto/leaflet-edit-osm
Leaflet plugin that allows to add an unobtrusive open in OSM Edit link
https://github.com/raruto/leaflet-edit-osm
id javascript leaflet leaflet-edit openstreetmap potlatch2 remote
Last synced: about 1 month ago
JSON representation
Leaflet plugin that allows to add an unobtrusive open in OSM Edit link
- Host: GitHub
- URL: https://github.com/raruto/leaflet-edit-osm
- Owner: Raruto
- License: gpl-3.0
- Created: 2019-11-09T14:09:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-09T19:12:40.000Z (almost 5 years ago)
- Last Synced: 2024-11-09T13:29:22.247Z (about 1 month ago)
- Topics: id, javascript, leaflet, leaflet-edit, openstreetmap, potlatch2, remote
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# leaflet-edit-osm.js
A Leaflet plugin that allows to add an unobtrusive open in OSM Edit link_For a working example see [demo](https://raruto.github.io/leaflet-edit-osm/examples/leaflet-edit-osm.html)_
---
> _Initally based on the [work](https://github.com/osmlab/leaflet-edit-osm) of **Tom MacWright**_
## How to use
1. **include CSS & JavaScript**
```html
...
html, body, #map { height: 100%; width: 100%; padding: 0; margin: 0; }
...
```
2. **choose a div container used for the slippy map**
```html
...
...
```
3. **create your first simple “leaflet-pegman slippy map**
```html
var map = L.map('map');
map.setView(new L.LatLng(45, 9.5), 5);var OpenStreetMap = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: 'Map data: © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
});
OpenStreetMap.addTo(map);var editInOSMControl = new L.Control.EditInOSM({
position: 'bottomright', // position of control inside the map
editor: false, // open link with a default editor ("id", "potlatch2" or "remote")
});
editInOSMControl.addTo(map);
```
_Related: [Leaflet-UI presets](https://github.com/raruto/leaflet-ui)_---
**Compatibile with:** [email protected],
---
**Contributors:** [tmcw](https://github.com/osmlab/leaflet-edit-osm), [Raruto](https://github.com/Raruto/leaflet-edit-osm)