Questions tagged [react-leaflet-v3]

React components for leaflet maps. Use this tag for questions related to version 3 of react-leaflet only.

86 questions
0
votes
1 answer

WMSTileLayer event handler does not works in react leaflet

According to react leaflet documentation below code must work. Or am I doing any wrong? A suggestion would be appreciated. Thanks in advance
Amir
  • 8,821
  • 7
  • 44
  • 48
0
votes
1 answer

change or move the position of the popup react-leaflet

My popup from the marker is overlapping, making it partially visible. I need to move the popup above. Code:
Sai Krishnadas
  • 2,863
  • 9
  • 36
  • 69
0
votes
1 answer

Leaflet zIndex in custom pane between TileLayer, Geojson

I am organising several layers with an interface which allow order decision. For example I have 3 layers: WMS Layer, order: 3 Geojson layer: order 2 WMS Layer, order: 1 I am able to order the WMS layers with the zIndex property. The Geojson layer…
Hoetmaaiers
  • 3,413
  • 2
  • 19
  • 29
0
votes
1 answer

Using react leaflet version3 gave this kind of errors

Module parse failed: Unexpected token (3:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | / required styles / | .leaflet-pane, |…
Noman
  • 594
  • 1
  • 18
0
votes
2 answers

'LeafletProvider' is not exported from 'react-leaflet'

I had this error, Attempted import error: 'LeafletProvider' is not exported from 'react-leaflet'. when I tried to import LeafletProvider to one of my component file as follows: import { withLeaflet, MapControl, LeafletProvider } from…
Semb
  • 156
  • 2
  • 20
0
votes
1 answer

How to hook into tileload event with React-Leaflet v3

I'm looking for a way to hook into the leaflet Events tileload or tileloadstart with react-leaflet (v3.1.0). However, they are not available in useMapEvents() or accessible in the TileLayer component. Any idea where I could hook into them? I'm…
Jörg Rech
  • 1,339
  • 2
  • 13
  • 25
0
votes
1 answer

How to create markers on click of geojson component?

I'm trying to add markers when a user clicks on a certain Geojson feature. I'm new to react and react-leaflet and am trying to use the useState hook to accomplish this task. I've been stuck a couple of days on this issue. Here is my App.js. I…
just_Mango
  • 117
  • 1
  • 7
0
votes
1 answer

react-leaflet babel loade errorr: ./node_modules/react-leaflet/esm/Pane.js 25:37 Module parse failed: Unexpected token (25:37)

./node_modules/react-leaflet/esm/Pane.js 25:37 Module parse failed: Unexpected token (25:37) File was processed with these loaders: ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js You may need an additional loader to handle the…
Jenyo Jay
  • 11
  • 1
0
votes
1 answer

how to share position in leaflet js to other app like google map

I want the user to be able to share the location on the leaflet in to other applications like google map: Is it possible to do this in a react leaflet?
amirhossein
  • 301
  • 1
  • 3
  • 12
0
votes
1 answer

How to add multiple icon for same position in React-leaflet version 3

I'm developing an app using React-leaflet version 3 with TypeScript. In my app, I have the requirement to add multiple icons for one position. EX: A particular [lat,long] position identified as having a blood donation camp, an outdoor checkup…
0
votes
0 answers

Creating custom layer using React leaflet V3

I want to create a custom helper div layer on the map on a button click or mouse-over over the button. The button is also a custom control button on the map. Here is the example control button My custom layer will provide map related information.…
0
votes
1 answer

How do I programatically a layer in react-leaflet?

I'm using react-leaflet (3.2.0) and TypeScript, In my project, I don't want switch layers with LayersControl, but I need do it programatically. So I have something like this: export const getDefaultBgLayer = () => (
javalonde
  • 549
  • 2
  • 6
  • 7
0
votes
1 answer

How to upgrade react-leaflet from v.2.8 to v.3

I'm using react-leaflet v.2.8 in my project. I want to upgrade the react-leaflet to v.3. But how? When I write "npm i react-leaflet", it installed only react-leaflet v.2.8.
A7x
  • 383
  • 3
  • 15
0
votes
0 answers

what is the meaning Uncaught TypeError: Cannot read property '_zoom' of undefined after i use react leaflet marker cluster?

i getting stuck with using markercluster in react leaflet. i always get error Uncaught TypeError: Cannot read property '_zoom' of undefined, i already add markercluster.js, markercluster css but still face the problem.. heres my code
0
votes
1 answer

Change the tileLayer using the React useEffect hook

I'm trying to change the tileLayer using React's useEffect hook. This stops when switching from DarkMode to LightMode Theme thus changing the tileLayer to a Dark and vice versa. I've read hundreds of pages and tried many alternatives but it just…
Adriano
  • 1
  • 1