Skip to main content

All Questions

Tagged with
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-...
Kishor's user avatar
  • 200
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.
nOybek's user avatar
  • 405
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 (...
Shanilka Fernandopulle's user avatar
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?
Mohammad Mirzae's user avatar
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 ...
Emad Baqeri's user avatar
  • 2,642
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 ...
BurgMan's user avatar
  • 67
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?
smurfo's user avatar
  • 91
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:...
Liverpool's user avatar
  • 275
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 ...
Liverpool's user avatar
  • 275
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 ...
Pavan Kusunuri's user avatar
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 ...
Pavan Kusunuri's user avatar
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)) ....
Dostonbek Oripjonov's user avatar
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 ...
robert's user avatar
  • 71
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 ...
Hojiakbar Karimov's user avatar
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 ...
r3wt's user avatar
  • 4,722

15 30 50 per page