Skip to main content

All Questions

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
2 votes
1 answer
945 views

How to get polyline coordinates React-Leaft-Draw plugin?

I use this plugin to draw lines on Leaflet map in my project: https://github.com/alex3165/react-leaflet-draw I want to get coordinates (lat,long) of drawn polyline, when _onCreate or later. How could ...
TranceAddict'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
2 votes
1 answer
2k views

how to draw shapes in react-leaflet v3

Do you have any idea about implementing the draw functionality to react-leafletV3? I have added an event listener but it is not working and reacting to anything. useEffect(() => { if (!map) ...
Emad Baqeri's user avatar
  • 2,642
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
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