All Questions
Tagged with leaflet.draw reactjs
19
questions
0
votes
0
answers
135
views
Create a wider selection area to select the lines on react-leaflet map
Having difficulty in selecting the lines on react-leaflet map, so I have followed the below solutions,
https://gis.stackexchange.com/questions/466747/create-wider-selection-area-to-select-lines-on-...
0
votes
1
answer
312
views
how to use "leaflet-buffer" in react-leaflet?
I want to buffer the shapes
I drew on the react-leaflet.
But I can't find any npm library to react like "leaflet-buffer".
Please help me.
1
vote
0
answers
824
views
Cannot read properties of null (reading 'offsetWidth') when loading react-leaflet map
I have a reusable leaflet map component in my react project and every time I search for a specific key word, the markers and the shapes(fences) will get updated. When I reload the parent component (...
1
vote
0
answers
36
views
i am working on someone project that use a version of react-leaflet that import Map instead MapContainer [duplicate]
I wanna do a task that needs react-leaflet-draw but this error occurred
Does anyone know what should I do except updating the react-leaflet because the project is too big?
1
vote
1
answer
153
views
How can I remove last shape layer when creating new one in lefalet
According to this codesandbox I'm using to to generate a map on react and I have implemented the drawer plugin. here I want to delete the last shape I have added to the map and create and show the new ...
0
votes
1
answer
1k
views
React-Leaflet : Adding L.TileLayer breaks map
My goal is to add leaflet-draw to my Map. To do this, I've been using L to add control and drawnItem layers to the map upon component mount. The problem seems to be with the TileLayer. If I add it in ...
0
votes
1
answer
426
views
Leaflet custom edit ?handler?
Is it possible to change the rectangle shown in edit mode to something else, like a marker, circle or an icon?
1
vote
1
answer
3k
views
How to clear leaflet map in reactjs by button?
I want to clear my leaflet map by clicking a button...how to do this... I want to clear all drawed shapes on the map, so the map to be clear
This is my code of the leaflet map in the return statement:...
0
votes
2
answers
4k
views
How to create button with function of draw polygons in Leaflet?
I want to create a button which function is the same as the toolbar in leaflet map.When is pressed the user can draw figures on the map onCreate function but i have no idea how to make a button with ...
1
vote
1
answer
1k
views
Leaflet JS: Cannot read property 'addLayer' of undefined while rendering drawnItems on Map
I tried to display the leaflet Map on which It contains polygon-shaped surfaces on it. Sometimes it is displaying the error cannot read property 'addLayer' of undefined when the page is refreshed map ...
1
vote
1
answer
3k
views
Leaflet.js How to remove the selected layer in Map when map is re rendered with Drawn Items
I tried to render the polygon-shaped surfaces on the map whenever user clicks on polygon shape layer A popup
with polygon details is displayed and the layer can be edited.In the popup, there is ...
2
votes
3
answers
845
views
How to append button into popup in leaflet draw?
I want button inside popup to make some action on popup attached layer.
L.marker(coors[i], { icon })
.addTo(this.drawnItem)
.bindPopup(this._getCustomIcon(mix))
....
7
votes
0
answers
3k
views
React Leaflet.draw: How to create draw functions with standard buttons without using the react-leaflet toolbar, however, have it written in "React"
how can I create custom buttons that reside on a leaflet map in a separate control box to create "Polylines", "Polygons" or a "Marker" which will all be on separate ...
2
votes
1
answer
2k
views
Is there any way to edit existing geojson data on the leaflet-map
I want to make edit support for currently displayed geojson polygon layers on the leaflet map. When editing button is pressed it gives me
Uncaught TypeError: Cannot read property 'lat' of null
...
5
votes
1
answer
4k
views
Importing geojson to react-leaflet-draw
I am trying to import some GeoJSON to the FeatureGroup in _onFeatureGroupReady event handler, but it doesn't appear to be rendered into the map. The code is mostly based on the example from the ...