All Questions
25
questions
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 ...