Skip to main content

All Questions

0 votes
0 answers
109 views

Issue using MapContainer from react-leaflet: TypeError: Cannot read properties of null (reading 'useState')

I'm trying to use React Leaflet to add a map from OpenStreetMap on my website. Everything seems to go well syntax wise, however when I try to use I encounter this error: Uncaught TypeError: Cannot ...
yoenuts's user avatar
  • 31
0 votes
0 answers
126 views

Leaflet Map open popup in markercluster from outside with react-leaflet and react-leaflet-markercluster

I encountered an issue with combining two functionalities: placing Markers in a group using the MarkerCluster plugin (https://tomickigrzegorz.github.io/react-leaflet-examples/#/marker-grouping-...
Sebastian Tekieli's user avatar
0 votes
0 answers
152 views

Changing the color of a Leaflet map polyline as I navigate from point A to B

I'm working on a project where I'm using Leaflet to create a map. I've defined a path from point A to B, and it's currently colored yellow. However, I want to change the color of the traveled path to ...
Sammith Gowda's user avatar
0 votes
0 answers
129 views

How to use dragging marker in leaflet-geosearch?

I am using react-leaflet and leaflet-geosearch. I want the marker here draggable and print the location when the marker is moved to another place. How to do this? const Search = ({ location,...
MD. MEHEDI IMAM's user avatar
0 votes
1 answer
220 views

Neatly put markers in a row when they have the same exact coordinates

I have a map component that loads data from a geoJSON file and displays each datapoint on an openstreetmap map. The library is use for that is the 'react-leaflet' library. And I also use the 'react-...
atthijs98's user avatar
1 vote
0 answers
327 views

How to create city boundaries using bbox data in React Leaflet?

I'm working on a React application that uses Leaflet and react-leaflet to display a map. I want to create boundaries around cities that are marked on the map with a marker. To get the necessary ...
wch's user avatar
  • 300
0 votes
1 answer
92 views

Highlight borders of the nation

When I search for a country I would like the borders to be highlighted on the map. I don't know how to do with openstreetmap , leaflet and react Demo: Countries App
Piero Sabino's user avatar
0 votes
1 answer
448 views

how to find my city location with location search in React Redux with Leaflet with OpenStreetMap

I was assigned by my lecturer to add city search to my application using React(Redux) using Leaflet (OpenStreetMap) can anyone help me to solve this problem? and what are the dependencies needed? Here ...
Ujang Aripin's user avatar
1 vote
1 answer
500 views

Tiles are rendering very slow using react-leaflet

I am trying to make a simple react app which will check user's location and update in on the screen using brower's GPS. It is working but not every map tiles are being rendered and rendering is also ...
Istiak Hassan Emon's user avatar
0 votes
1 answer
446 views

Leaflet control disapperars while dragging map on mobile(React)

Currently doing a map with React-Leaflet. On desktop everthing works fine, but on mobile(iPhone X) the layercontrol and zoom control flicker/disappear while moving the map. function Osm() { ...
carlo711's user avatar
  • 695
1 vote
0 answers
229 views

React-leaflet, GeoJson: problem with coloring layers after choosing a option from cascader

I have an issue with my interactive map, I have a react-leaflet map with GeoJSON layers. Also, I have added some state components like cascader with some name of countries options, like Austria, ...
loklba's user avatar
  • 31
0 votes
1 answer
1k views

Trouble figuring out how to use GeometryUtil with React-Leaflet

I'm building an application with JavaScript, React & Leaflet(+React-Leaflet plugin). I want to get coordinates of closest marker to my location, but I'm having trouble figuring out how to use ...
aksoco's user avatar
  • 191
0 votes
1 answer
1k views

Leaflet not scaling correctly to mobile devices

I have a problem with scaling leaflet map to fit mobile devices. I'm building an application using React, Leaflet(+React-Leaflet) & OpenStreetMaps. If I'm placing component like footer or zoom ...
aksoco's user avatar
  • 191
3 votes
1 answer
7k views

Custom button on the leaflet map with React-leaflet version3

I'm a new leaflet learner with React typescript. Want to create a custom button on the map. On clicking the button a popup will appear. I saw many example but they are all based on older version and I ...
sandy's user avatar
  • 293
2 votes
2 answers
743 views

React leaflet map location glitches when not in App.js

I am trying to use a Leaflet map in my React application but I am running into a strange problem. I tell my map to pan to the user's current geolocation (if they have allowed access to their location) ...
Pimv_h's user avatar
  • 420

15 30 50 per page