All Questions
19
questions
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 ...
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 ...
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, ...
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
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/...
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
1
answer
739
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 ...
1
vote
1
answer
690
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
....
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 ...
1
vote
1
answer
984
views
How to fix 'TypeError: leaflet__WEBPACK_IMPORTED_MODULE_7___default.a.markerClusterGroup is not a function'
I am trying to implement marker cluster on my multiple markers but I keep getting type error.
TypeError: leaflet__WEBPACK_IMPORTED_MODULE_7___default.a.markerClusterGroup is not a function
this....
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@...
0
votes
1
answer
78
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
1
answer
780
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 ...
0
votes
1
answer
3k
views
map.addLayer(markerClusters) is not a function
I get this error:
map.addLayer(markerClusters) is not a function
in for my markerClusters since I updated the following packages:
"leaflet": "^0.7.7",
"leaflet.markercluster": "^0.5.0",
"react-...
0
votes
0
answers
38
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 ...