Skip to main content

All Questions

0 votes
0 answers
30 views

How to dynamically use fallback tiles from the previous zoom level of the same server in Leaflet?

I'm working on a mapping application using React with Leaflet for tile rendering. When tiles fail to load (due to network issues, server downtime, tiles not available), I want to dynamically use ...
Shrutika Maske's user avatar
0 votes
1 answer
87 views

react-leaflet-heatmap-layer-v3 src directory not found

Trying to use the npm library react-leaflet-heatmap-layer-v3 and after I install it successfully and then yarn start my react typescript app, I get the following warning messages: WARNING in ./...
ArthurJ's user avatar
  • 809
0 votes
0 answers
18 views

how to do autosave on editvertex ? because i dont want user to save all the time when he/she edits

Just want to save the polygons even after not saving it , and i have hided the save and cancel button. Im already rendering the polygons using my own state and im changing it on every vertex change ...
Anzil Az's user avatar
0 votes
0 answers
35 views

How to wrap the VideoOverlay component in react-leaflet with a div?

I'm currently working on integrating a video overlay onto a map using the react-leaflet library. I'm using the VideoOverlay component provided by react-leaflet to render the video onto the map ...
dina's user avatar
  • 1,052
1 vote
1 answer
287 views

How can I access the map object since the whenCreated prop was removed in react-leaflet v4.x?

I have been struggling with an issue which comes down to me not being able to properly reference the map object. After researching it for a few days, I've come to the conclusion that the "old&...
EngineeringCheetah's user avatar
0 votes
1 answer
93 views

Dynamically change the background color of the TileLayer attribution

I have created a component that contains the map and changes the map for dark or light mode. How can I dynamically change the color of the attribution? There's any props or style key that i can use ? ...
lucamir's user avatar
0 votes
1 answer
268 views

react-leaflet basic example rendering

I'm using leaflet and react-leaflet for the first time and using their basic example here and the map is broken in multiple sections with half not visible. <MapContainer center={[51.505, -0.09]} ...
pnk6's user avatar
  • 278
0 votes
1 answer
213 views

Why L.vectorGrid.protobuf return undefined?

I'm using in React, Leaflet and react-leaflet. Random things in order to post the question: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just ...
Kambei's user avatar
  • 573
3 votes
1 answer
837 views

react-leaflet cannot read properties of null (reading useState)

I just installed react-leaflet in order to display a map in a react project. I believe I have followed the setup instructions to a T, but I still keep getting this error: this error only appears when ...
Sovengarde's user avatar
1 vote
1 answer
119 views

Unexpected token (10:25) in react-leaflet videoOverlay file during webpack build

Failed to compile ./node_modules/react-leaflet/lib/VideoOverlay.js 10:25 Module parse failed: Unexpected token (10:25) You may need an appropriate loader to handle this file type. | var overlay = ...
D333's user avatar
  • 41
1 vote
3 answers
137 views

How to avoid infinite loops inside useEffect working with dispatch()?

I'm making a project where I have a list with several properties. Each property has data such as name, latitude, longitute, among others. On one side of the screen I render the list showing the ...
Katyellen's user avatar
  • 303
0 votes
1 answer
587 views

React Leaflet 4.2.0 - how to change zoom on button click?

**I would like to add a button next to the map, after clicking which I will be able to change the zoom of the map. ** Is this feasible in the new version of react-leaflet? Example scenario: I display ...
Bartek Giepard's user avatar
1 vote
1 answer
948 views

Rotate marker in react-leaflet v4 - React Typescript

I´m having trouble trying to rotate the marker in react-leaflet. I have seen some examples where it is done with an older version of react-leaflet using leaflet-rotatedmarker. See below... have tried ...
CookieMonster's user avatar
0 votes
1 answer
826 views

How to add a custom control (legend with buttons) to react-leaflet v.4 map?

I would like to add a custom Legend in react-leaflet v4 map, but i can't understand how to do it correctly. I have already read the https://react-leaflet.js.org/docs/example-react-control/ example but ...
DimMtz's user avatar
  • 1
0 votes
1 answer
390 views

React-Learflet - Change circle opacity when clicked

I'm trying to change my circle Opacity when I click on it to act as an active state I declared my state const [active, setActive] = useState(false) My function const sidebarTrigger = () => { ...
Phakamani Xulu's user avatar

15 30 50 per page