Leaflet-Geoman is a plugin for Leaflet, the open-sorce javascript library for mobile-friendly maps, and allows drawing, editing, dragging, cutting, splitting, measuring and pinning geometry layers.
It supports Markers, CircleMarkers, Polylines, Polygons, Circles, Rectangles, ImageOverlays, LayerGroups, GeoJSON, MultiLineStrings and MultiPolygons.
Questions tagged [leaflet-geoman]
61 questions
0
votes
0 answers
LEAFLET GEOMAN - Picking up the coordinates inside this polygon draw
I already have a geojson being consulted and that is plotting these black dots. And then I inserted the leaflet-geoman plugin to give users the freedom to create polygons on the map. Basically draw something there.
For example: Draw a polygon to…

Rayssa Rocha
- 17
- 4
0
votes
1 answer
Changing instance of Feature on click
Im trying to find a way to change the instance of a Leaflet geoJson Feature after it is added to the map.
This is what I want to achieve:
Importing data with L.GeoJson and I am using pointToLayer to change the marker to L.CircleMarker
Now I…

Henrik Maaland
- 210
- 2
- 14
0
votes
1 answer
Leaflet geoman setLatLngs not restoring object to the getLatLngs position
I have an issue that when leaflet geoman removes a vertex on for example polygon, I cannot restore the latLngs of the object.
What im doing:
On object click -> object.getLatLngs(). Works fine.
If I start editing the object and then…

Henrik Maaland
- 210
- 2
- 14
0
votes
1 answer
keep focus on canvas Layer after map drag
I have a L.canvasMarker from leaflet-canvas-markers
When in editing mode with Leaflet-Geoman I can move the marker without any issue.
But if I drag the map then try to drag the marker, it does not work (it has lost focus).
To be able to drag it…

Henrik Maaland
- 210
- 2
- 14
0
votes
2 answers
Improve leaflet performance with alot of objects with leaflet geoman
Im struggling to find any solution to improve performance of leaflet map with a lot of objects on the map.
What I have done;
Rendering everything I can with canvas.
My issue is that I have a lot of markers which requires an image icon. This is not…

Henrik Maaland
- 210
- 2
- 14
0
votes
1 answer
How to use a variable (array of Leflet Layers) generated inside of a Event in my code later.on
I have an event which after drawing a polygon on a map generate an array of Leaflet layers containing Points of Interests sitting on the polygon. This event works fine.
The point is that I would like to save this array of layers somewhere in a…

losted
- 45
- 6
0
votes
1 answer
checking duplicate markers leaflet geoman
Im trying to check each geojson feature if it is a Marker. If it is I want to remove the placed layer then init drawing marker again.
If it is not the same position, I will just add it to the feature layer.
The problem is with eachLayer it always…

Henrik Maaland
- 210
- 2
- 14
0
votes
1 answer
Leaflet-geoman how to properly retrieve GeoJSON
I'm having some troubles when it comes to using the draw control given by leaflet-geoman:
What I'm trying to achieve:
Draw Polygon(s) --> ✅
Get geojson from layer(s) --> ✅
Store in database --> ✅
Retrieve from database --> ✅
Load in leaflet map and…

Juan Carlos
- 146
- 2
- 10
0
votes
1 answer
How to find the CSS class of Leaflet toolbar buttonTitles?
What I want to do is to change the layout(CSS) of the pop-up that appears when hovering over a toolbarbutton in Leaflet.
I tried to look through all the elements by inspecting the toolbar-objects, as well as reading the documentation but still…

MariSk
- 1
- 3
0
votes
1 answer
Is there a way to disable a marker or a polygon to be draggable in leaflet-geoman?
As the title says, I have a set of different markers and polygons on a map.
All I want to do is to disable the markers and the polygons I create on the map to be dragged and only make circles draggable.
As far as I read the documentation, there's no…

Federico Torrielli
- 25
- 5
0
votes
1 answer
Cannot access event.layer in Leaflet.Geoman
I am using Leaflet-Geoman to draw on map. Drawing and editing works perfectly.
When the user has finished drawing I need to access the layer with the drawing for further processing. See an example here:
map.on('pm:drawend', function(event) {
…

Johanna Bech
- 1
- 1
0
votes
1 answer
Leaflet-geoman remove button not working after bind a new layer click function
I need to bind a custom click function on the drawn shapes. I'm using the following code for that:
map.on('pm:create', function(e) {
e.layer.on('click', function(e) {
document.getElementById('info-pane').style.display = 'block';
…

Kleyson Rios
- 2,597
- 5
- 40
- 65
0
votes
0 answers
I can not add tokens to the cluster when using
I can not add tokens to the cluster when using (библиотека leaflet)
When I first load the page, I get all the markers and add them to the clusters - this is no problem. The situation is aggravated when I try to drag and drop to add new markers.…

Дома_ Завода_рф
- 1
- 1
0
votes
1 answer
How to add marker onto polygon layer using leaflet.pm?
Lines and polygons are added without problems, but when trying to add markers on top of a polygon layer ("lyrPoly"), it interprets that I want to click on the polygon (e.g. opens popup) instead of adding marker. How can I avoid this? I am using…

agh
- 107
- 1
- 12
0
votes
2 answers
Leaflet Draw and Leaflet Snap with geojson polygon layers
I'm trying to enable snapping (using Leaflet Snap)in a Leaflet application I'm creating. I'm using Leaflet Draw. Existing layers are read in from a database in geojson. I add these to the guideLayers and I add newly created features there too. It's…

Dan
- 13
- 1
- 5