All Questions
1,095
questions
0
votes
0
answers
107
views
Obtaining visible Map Data as an Image in React-Leaflet
I'm working on a ReactJS application that utilizes react-leaflet to display maps, supporting both OpenStreetMap and TIFF formats. My goal is to implement an upscale/digital zoom feature when the zoom ...
0
votes
1
answer
212
views
React leaflet shows empty map
I have a problem with the map display in React Leaflet - I installed everything, but it still doesn't work...
What do I have to change? I added css, added height but do not know what is missing
...
1
vote
2
answers
1k
views
having ReferenceError: window is not defined error for react leaflet during build process
I am using react-leaflet in my nextjs project. The project works perfect on dev mode but when I try to build it it gives ReferenceError: window is not defined. I am also using ssr as false in dynamic ...
0
votes
1
answer
233
views
How to change the style of a geojson feature on a click event in react leaflet
I am working on a react app with react leaflet. When you click on a country on the leaflet map, the country is supposed to change style (turn a different colour). I can't get this to work. In the ...
0
votes
1
answer
268
views
react-leaflet basic example rendering
I'm using leaflet and react-leaflet for the first time and using their basic example here
and the map is broken in multiple sections with half not visible.
<MapContainer center={[51.505, -0.09]} ...
0
votes
1
answer
59
views
ReactJS executes both if and else statement
I'm trying to build this little project with React Leaflet in which by searching through the leaflet-geosearch search bar a certain city, after clicking on it, a form should pop up asking for some ...
1
vote
1
answer
100
views
Leaflet for React: Converting overlay map for Leaflet into Leaflet for React
I have the following code meant for Leaflet:
const TileLayerNOAA = L.TileLayer.extend({
getTileUrl(coords) {
var z = coords.z -2;
if (z<0) z=0;
return 'https://gis.charttools....
0
votes
0
answers
93
views
How to properly change a loaded KML in react-leaflet-kml
I am using react-leaflet-kml and the functionality I am trying to make is a list of buttons corresponding to a KML file, which will make the map load/render that KML.
Currently, the buttons simply ...
0
votes
1
answer
28
views
What is the recommended approach when dealing with irregularly shaped tiles in L.TileLayer (leaflet)?
I am currently working on a Plan Viewer for 2D plans in a react web-app. Once a plan is uploaded to our servers in pdf format, the creation of tiles at different zoom levels is triggered.
Now I want ...
0
votes
0
answers
24
views
Get dustbin locations near user's location and display on leaflet map
I am getting the type of garbage from the backend. Eg: plastic, glass, metal, paper, etc.
I am showing the user's location on a map using Leaflet in React.
How can I get dustbin locations based on the ...
0
votes
0
answers
70
views
How can I make a programmatic click in react-leaflet?
I am working on a map webapp, that should react on navigation from another route in the following ways:
fly to coordinates
click on them programatically
// fly
const map = useMap();
...
0
votes
1
answer
284
views
Problem with using google earth engine api with react
I am creating a react app with google earth engine API and leaflet with a Django backend. The backend will be used for computer vision purposes, Google earth engine is to be used to add layers to the ...
0
votes
0
answers
73
views
React-leaflet doesn't clear routes when adding additional waypoints
I'm trying to clear the route when I add a new waypoint. Only two waypoints should should show. However, when adding an additional waypoint, Leaflet will show the old route instead of clearing it. I ...
1
vote
0
answers
65
views
how to use RoutingMachine for creating path with manually added markers in reactleaflet map
as i have added the multiple markers but i want the create the path with RoutingMachine in reactleaflet map with those added markers anyone give me solution for this code below. in this we want to add ...
1
vote
1
answer
198
views
How to get the address (street, house, etc.) when you click on a map in react-leaflet?
It is necessary that when you click on the map, the address (street, house, etc.) is displayed. Now when you click, I have latitude and longitude.
How to implement this? Send request with latitude and ...