All Questions
19
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 ...
0
votes
1
answer
106
views
Getting the clicked marker in react leaflet
So I have my leaflet map in my react project, I have markers on this map and I want to get the marker clicked. I want to show this markers popUp info on a side panel. How would I get the marker ...
0
votes
1
answer
72
views
changing cluster's styles not working with lazy loading leaflet in SSR react application
I'm encountering some challenges with lazy loading a Leaflet map in a React application deployed on a server-side rendering (SSR) environment. The application involves loading a list of products in a ...
0
votes
0
answers
73
views
React-leaflet doesn't clear routes when adding additional waypoints
I'm trying to clear the route when I add a new waypoint. Only two waypoints should should show. However, when adding an additional waypoint, Leaflet will show the old route instead of clearing it. I ...
0
votes
1
answer
767
views
How to cluster polygons with react-leaflet?
I'm looking for a way to cluster polygons using react-leaflet v4 and react-leaflet-markercluster. I have not found any up-to-date examples of how I can achieve this, so I'm hoping I might get some ...
1
vote
1
answer
476
views
NextJS and persist layout that contains Leaflet
I'm migrating a project from React to NextJS which has a layout where the common component is a Leaflet Map.
In Next JS, the "next/dynamic" used to load the map
React used react-router-dom@...
1
vote
1
answer
684
views
How To Use Leaflet.markercluster in a Layer Group
So I'm trying to group my markers on my Leaflet Map using Leaflet.markercluster. Currently, I add my markers using a child in my MapContainer in my App() function:
return (
<MapContainer
....
5
votes
3
answers
5k
views
react-leaflet-markercluster is not working
I'am trying to use react-leaflet-markercluster, but after I add <MarkerClusterGroup> to the code, errors are displayed in the console and the page does not load. If this component is not added, ...
1
vote
1
answer
2k
views
Custom icons for MarkerClusters in React Leaflet
I am trying to implement a custom icon for my markerclusters (instead of the regular circular clusters). I referred to the link and implemented as shown in the code below:
https://www.npmjs.com/...
5
votes
6
answers
8k
views
useLeafletContext() can only be used in a descendant of <MapContainer>
I am in the process of converting a leaflet-map in React into a hook with the use of react-leaflet and react-leaflet-markercluster. Everything worked perfectly except the use of the MarkerCluster ...
1
vote
2
answers
4k
views
react-leaflet: Clear marker cluster before rendering new markers
TLDR; Is there a way to clear all markers from a marker cluster using react-leaflet and react-leaflet-markercluster?
EDIT: Yes, there is! I just added a key prop to the MarkerClusterGroup, as @...
1
vote
2
answers
1k
views
How to remove marker from markercluster
I am using React Leaflet and react-leaflet-markercluster. I have a lot of markers and if parent's state is changed, marker cluster rerendering takes longer time. For this reason, cluster components ...
2
votes
1
answer
1k
views
Performance issues if MapComponent state is updated
I am not sure if this is an issue of react-leaflet-markercluster, react-leaflet, leaflet, react, or my code.
I have a map with several thousand markers and I am using react-leaflet-markercluster for ...
1
vote
1
answer
735
views
How pass props to React Leaflet.markercluster options since v2.0.0?
I tried to pass property with <MarkerClusterGroup {...markerclusterOptions}>
by let markerclusterOptions but i think it is not a good way, because it does not work!
in documentation (# React ...
6
votes
0
answers
2k
views
Leaflet map with react-leaflet-markercluster cluster spiderfy's or closes onClick
I have a Leaflet map in React using react-leaflet and react-leaflet-markercluster
Clustering seems to work beautifully, but if I click on one of the cluster CircleMarker or Tooltip it opens a new ...