Skip to main content

All Questions

0 votes
0 answers
136 views

How to create satellite layer with labels using react-leaflet-google-layer

Trying to implement satellite view with labels on my react project using react-leaflet and react-leaflet-google-layer packages. I can create satellite view but not able to add labels on map (city ...
Sudhan's user avatar
  • 11
0 votes
1 answer
232 views

React Leaflet divIcon with clickable button

In react-leaflet, I am trying to add a draggable button to the map as shown in the image below. I also want the rest of the div to be non-clickable. However, when I click the button, nothing happens. ...
pomipiwimo's user avatar
0 votes
0 answers
13 views

How to dynamically resize Leaflet CRS.Simple map based on viewport while maintaining standardized coordinates? [duplicate]

I'm using Leaflet to render a static image as a map. For the sake of example, let's say the image is 700px x 700px. To create the map, I do the following: map.current = L.map("map", { ...
GMoney's user avatar
  • 43
1 vote
1 answer
125 views

How to stop a click propagation for custom react components that are child to MapContainer

I`ve created a custom control react component for map like that: export const MapZoom = () => { const map = useMap() const handleButtonClick = () => { map.zoomIn() } ...
Павел Хорольський's user avatar
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 ...
DrunkenAvenger's user avatar
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 ...
Mubashir Rehman's user avatar
0 votes
1 answer
248 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 ...
Leonard's user avatar
  • 73
0 votes
1 answer
300 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 ...
Aditya Mishra's user avatar
0 votes
0 answers
75 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 ...
Christopher Lam's user avatar
1 vote
1 answer
215 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 ...
Smile_mask's user avatar
1 vote
0 answers
34 views

Marker hiding after fitBounds in leaflet

fitBounds and flyToBounds are very good for changing the bounds of the map of different positions. The thing is that I have some markers on the map and when I call this function it sometimes hides the ...
Pichi Wuana's user avatar
1 vote
0 answers
40 views

Property 'onClick' does not exist on type 'IntrinsicAttributes & MapContainerProps & RefAttributes<Map>'

Onclick doesn't work on the mapcontainer, can anyone help with that? Function handleMapClick: function handleMapClick(event: LeafletMouseEvent ) { } MapContainer with onClick: <MapContainer ...
Irrigador's user avatar
0 votes
1 answer
93 views

Leaflet GeoApiFrProvider Sending Incomplete Search Requests

I am working on a map application using Leaflet and the GeoApiFrProvider. While the setup works correctly most of the time, I'm encountering an issue where the search request is sent prematurely, ...
Fatima Fatima's user avatar
0 votes
0 answers
190 views

React Leaflet Fullscreen Control

I'm using this library, but the fullscreenControl prop doesn't allow me to change the icon's position on the map. Any idea? remains fixed in the topleft. im using this lib https://www.npmjs.com/...
mtpog093's user avatar
0 votes
1 answer
92 views

Can't typify mapRef.current

So I have this react component with leaflet map and TypeScript warns me on line mapRef.current.setView(coords, 13) that this is "unsafe call of an any typed value" import 'leaflet/dist/...
Georgie's user avatar

15 30 50 per page
1
2
3 4 5
35