All Questions
408
questions with no upvoted or accepted answers
2
votes
1
answer
1k
views
Failed to compile in react react-leaflet
I tried to make a project with the current version of react, react-leaflet and leaflet, and I get this error:
Failed to compile.
./src/components/ViewMap.js Module not found: Can't resolve
'react-...
2
votes
0
answers
4k
views
Attempted import error: 'withLeaflet' is not exported from 'react-leaflet'
Code:
import { withLeaflet} from "react-leaflet";
I just want to import the withLeaflet but it gives me this error
Error:
Attempted import error: 'withLeaflet' is not exported from 'react-...
2
votes
0
answers
776
views
Leaflet-Routing-Machine: TypeError: Cannot read property 'getSize' of undefined
Not sure how this can be happening as I am using useRef to pass a reference of my map to the Routing Machine component...
But first here are my dependencies...
"react-leaflet": "...
2
votes
0
answers
751
views
Unable to remove react-leaflet Map with MapControl in React
I created map legend in Leaflet map using MapControl. Everything working well but when I try to remove Map component I have error Uncaught TypeError: Cannot read property 'remove' of undefined from ...
2
votes
0
answers
869
views
React Leaflet Polyline with arrow Head Issues
I am using react Leaflet. I try to implement it with a polyline with an arrowhead.
it showing the following error.
1.TypeError: Cannot read property 'addLayer' of undefined at t.n.componentDidMount (...
2
votes
0
answers
412
views
React Leaflet - Extra Markers Plugin is not showing markers
Encountering an issue where the extra markers plugin is only displaying the icon. There is a very similar post to this but in Angular. My console shows no error as well. Someone who encountered this ...
2
votes
0
answers
717
views
React Leaflet - Dynamically load popup content
I am using React Leaflet for map implementation. How can we load popup content dynamically ?
The dynamic contents are getting from an api.
i tried using state change (for popup content) in the ...
2
votes
0
answers
1k
views
Jest tests not passing even though component seems to render correctly
I am trying to learn to write unit tests for a react application I am building, but I keep running into problems when I try to do a shallow or full render. However when I look at in in chrome it doesn'...
2
votes
0
answers
1k
views
React Leaflet - Unable to use Canvas Markers with Clustering
I'm trying to use Canvas Marker with Clustering but its throwing an error.
The following libs are used:
https://github.com/yuzhva/react-leaflet-markercluster
https://github.com/lycheelin/react-...
2
votes
0
answers
800
views
How to export Leaflet map to tiff image using react?
i'm trying to create geotiff/tiff file from leaflet-map. i already check on any plugin that can export map to image like leaflet.print, leaflet-easyprint, leaflet-image, leaflet.browser.print. but ...
2
votes
0
answers
740
views
Popup won't stay open in react-leaflet after marker's onClick event
I have a leaflet map that creates markers from the API data. Markers have onClick methods, that fetch data from the open weather API unsing marker's lat and lon. The weather data must be shown on the ...
2
votes
0
answers
473
views
D3 + Leaflet map with react js
I'm trying to make a map and plot pins with d3 in the same map, but somehow the pins don't appear and i dont get any error, but sometimes appear this error.
My code basically takes data from an api, ...
2
votes
1
answer
2k
views
React Leaflet: FlyToBounds programmatically on prop change
The react-leaflet map component is rendered properly based on a polyline. The polyline starts perfectly centered in the middle of the screen.
Here is my issue: I want to recenter the map to the ...
2
votes
1
answer
1k
views
Google Maps in React not showing street and city names in hybrid view
I'm using the example here as a rough guide. I'm trying to implement Leaflet.js with Google Maps providing the base layers for imagery. Everything works great, but the hybrid view (satellite+place/...
2
votes
0
answers
1k
views
OpenLayers (or other mapping APIs) + React/Redux: how to keep map object in the store?
I'm trying to figure out how to work with mapping APIs like openlayers, leaflet, mapbox, google maps, etc. and React + Redux.
My goal is to make the map object available to all other components of ...