All Questions
25
questions
0
votes
0
answers
37
views
Leaflet Map Tiles Disoriented When Deployed on EC2 Instance
I'm encountering an issue with Leaflet map tiles appearing disoriented when I deploy my application on an EC2 instance. The tiles load correctly when I run the app locally, but once it's deployed to ...
0
votes
0
answers
116
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 ...
0
votes
0
answers
135
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-...
0
votes
0
answers
156
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 ...
0
votes
0
answers
134
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,...
0
votes
1
answer
225
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-...
1
vote
0
answers
334
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 ...
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
0
votes
1
answer
455
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 ...
1
vote
1
answer
514
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 ...
0
votes
1
answer
448
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() {
...
1
vote
0
answers
230
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, ...
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 ...
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 ...
3
votes
1
answer
8k
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 ...
2
votes
2
answers
749
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) ...
2
votes
2
answers
1k
views
map.getCenter and map.getBounds are not functions inside map.target.on('click') function
I am creating an app that makes use of the leaflet OpenStreetMap API but I am running into a problem. I am trying to get the center coordinates when I click my map, but i am getting the error: '...
3
votes
1
answer
4k
views
Use a local tile layer with leaflet
I'm creating a project with React and Leaflet.
This project will run offline on a computer connected to nothing, so I need to have the tile layer stored on the same computer (no tile server).
Since I ...
0
votes
1
answer
1k
views
React-Leaflet / OpenStreetMap: Detect if the marker is inside a circle
I have a marker and several zones (Circle). Now I want to detect if the marker is inside a zone. Any idea how I can do this?
data.json
{
"name": "John Doe",
"longitude&...
4
votes
1
answer
3k
views
React-Leaflet Map doesn't update
My issue is that react-leaflet <MapContainer> doesn't center on a position that I set dynamically.
The basic logic is that I have a form where I enter Street and House Number, then I make call ...
3
votes
0
answers
827
views
Leaflet map not properly displayed in ionic react app [duplicate]
I am working on a mobile application using react with Ionic 3, and I want to add a map in one of the tabs, in the browser version the map looks correctly, but when I put the mobile version or pass it ...
-2
votes
2
answers
2k
views
How to call getFeatureInfo from react-leaflet? [closed]
I have example from github how to add wms layer:
https://github.com/PaulLeCam/react-leaflet/blob/master/example/components/wms-tile-layer.js
but how to getFeatureInfo on click from wms layer?
0
votes
1
answer
228
views
Is there any way to add MultiPolyline component using react-leaflet?
I am trying to implement an OpenSteetMap view using leaflet.
I have created a POC for the same.
var map = L.map('map').setView([9.89445, 76.71272], 12).addLayer(osm);
var latlngs1 = [
[[9.84644243,...
0
votes
1
answer
549
views
Rare effect when toggling BaseLayer in leaflet with react-leaflet
My application shows a map with react-leaflet and uses LayersControl to switch between an OSM TileLayer and HERE TileLayer. The code is as follows:
<LayersControl position="topright">
&...
0
votes
1
answer
62
views
Checking if object in Open Street Maps is a building
I'm using Leaflet library in my ReactJS app and I wonder if there is a simple way to recognize if object clicked by user is a building.
Idea that came up to my mind is to check map colour under ...