All Questions
523
questions
0
votes
2
answers
535
views
How to build a Choropleth map in React
So I'm trying to make a Choropleth map of Spain in React, using leaflet. This is my code: `
import React, { useEffect, useRef, useState } from 'react';
import { MapContainer, TileLayer, GeoJSON, ...
2
votes
1
answer
456
views
Map getting rendered only in localhost - Not displayed after app build process
I am working on a react application which have two maps (one leaflet+esri map and the other is maptiler). I have got the API keys for both, and it gets rendered properly in localhost environment.
...
0
votes
1
answer
116
views
Stop Map to change it's direction whenever markers are updated
Below is the code of my react-leaflet simple map, i have given center and zoom values
<Map
center={[-30.036294, 20.71996]}
zoom={5.8}>
{markers.map(m => {
return <Marker ...
1
vote
2
answers
314
views
React Leaflet update position
I've got a question about React Leaflet. I am now trying to build a PWA with the react framework and I need to use a map, hence React Leaflet.
So here's the situation :
I need to load the Map when I ...
0
votes
1
answer
156
views
How can I add a switch to leaflet map react?
There is a problem with customizing a button and put it at top right of a Map Container.
here is my reactjs code for Map box.
<MapContainer style={{width:"32vw", height:"32vh&...
0
votes
1
answer
179
views
Fixing Popup Leaflet on the left side
I need to fix the Popup to the left of the map, but when moving the map, the Popup does not adhere to the left edge
I entered position: fixed in styling and everything is fine when zooming, but when ...
6
votes
1
answer
2k
views
React Leaflet map rendering all over the page
I am fairly new to React and Leaflet. I have gotten Leaflet working just fine in a simple HTML page. So now I am trying to make a more dynamic site by using React.
The problem I am running into is I ...
2
votes
1
answer
1k
views
How to add a button on React Leaflet map to create a marker?
I have a form in which the user must specify the location of his home on the map. In this form I have used React Leaflet map.
The default location of the <Marker> is the current location of user....
0
votes
1
answer
402
views
Address validation with react native and leaflet polygon map
I need assistance with address validation. I built a polygon in a map using Leaflet on the other end, and that polygon is recorded in a database, which I import into the mobile app (keep in mind the ...
0
votes
0
answers
279
views
Uncaught Error: Invalid LatLng object: (NaN, 40.83618432283402)
I have a problem with a leaflet, this error (Uncaught Error: Invalid LatLng object: (NaN, 40.83618432283402)) is thrown when I click on the marker.
The most interesting thing is that the error is ...
0
votes
1
answer
338
views
How can I change my (TypeScript Definition) .d.ts file to a (JavaScript) .js file?
I have found many articles on how to convert a file from .js --> .d.ts but not from .d.ts --> .js
I have this .d.ts code and I want it to be javascript code. Can anyone help?
import { ...
1
vote
3
answers
140
views
How to avoid infinite loops inside useEffect working with dispatch()?
I'm making a project where I have a list with several properties. Each property has data such as name, latitude, longitute, among others.
On one side of the screen I render the list showing the ...
1
vote
0
answers
146
views
React leaflet draw causes no context provider error
I'm running into some major compatibility issues it seems. I am getting this error when I am directed to a page with a map that is meant for the user to draw a radius using react-leaflet-draw. Here is ...
2
votes
0
answers
87
views
Leaflet map not rendering full image properly on mobile devices
I'm currently working in a react web-app. We are using leaflet to render some buildings maps. The app is working good in desktop. But we found the maps images are not loaded properly when using mobile ...
1
vote
2
answers
255
views
Map isn't showing up using react-leaflet, but not logging any errors
The code is running perfectly after 5 hours of not getting my dashboard to show up, however now the map just isnt showing up and when i check the console i get no error, any thoughts? I followed the ...