Skip to main content

All Questions

1 vote
0 answers
75 views

Changing Colours of Leaflet Map

I wonder if and how it is possible to change the color of the map (individual countries, backgrounds and lines) in Leaflet? I have simply created the basic code of a leaflet map as specified in the ...
Tim Schäflein's user avatar
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
3 answers
268 views

How to use L.canvas to draw a fluctuating circle

I am a back-end programmer who is using leaflet for the first time. I don’t know much about js animation steps. I want to use L.canvas to draw a dynamic circle, just like the picture below. Specify ...
Redamancy-qian's user avatar
1 vote
0 answers
2k views

react leaflet draw - editing a polygon and updating polygon state doesn't work as expected

I have an array of polygons set as state. I want to show them using Leaflet and edit the polygons. Polygon state must change, so I can store them in a database later on. Problem is: if I edit an ...
frankm's user avatar
  • 11
0 votes
1 answer
634 views

Trying to integrate leaflet's movingmarker plugin to react-leaflet , i have no idea on how to do that .is there any other way to animate

These are my code suggest me if there is an alternate way to animate my marker https://ewoken.github.io/Leaflet.MovingMarker/
MOTIVATIONAL VIDEOS's user avatar
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
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
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
2 answers
8k views

how to add styles for custom leaflet popup

I am trying to add styling of marker popup but styles are not reflecting on popup. Also not able to add priming button. import { Map, marker} from "leaflet"; const popupOptions = { className: "...
vinita jain's user avatar
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
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

15 30 50 per page