react-leaflet Questions

4

Solved

Is there a way to use vector tiles from react-leaflet? I am aware of Leaflet.VectorGrid, but it is not written for react-leaflet?
Mcleroy asked 13/3, 2017 at 13:50

5

In react-leaflet v4, the Popup component has a default href associated with the close button that directs to #close. Is there a way in React to modify this href or disable the href redirection? It'...
Hint asked 26/4, 2022 at 21:36

2

Solved

I am using the simple example from leaflet-react in a barebones create-react-app app. Problem: The map tiles do render, but there is always 1-2 rows of map tiles that do not render (grayed out). D...
Superego asked 5/3, 2019 at 18:34

4

I was trying to show a sample map on my react website. I have installed the leaflet package and also the react-leaflet package then set everything up as the react-leaflet document said to do. You c...
Leflore asked 7/5, 2022 at 16:57

3

Hej! I want my popup to open via a hover/mouseover. I tried the recommended but it still only opens on click. Does anyone have an idea what is missing? Any help is appreciated! import React from &q...
Viewfinder asked 8/3, 2022 at 7:14

3

I cannot figure out how to call fitBounds() on the Leaflet map. If I was just using vanilla leaflet, this solution would work perfectly: Zoom to fit all markers in Mapbox or Leaflet Unfortunately...
Nebulosity asked 14/6, 2018 at 16:23

2

Solved

I've got a component which puts an editable polygon on the map. When the user hits the "save" button, I want to access an array of the polygon's new vertices, so that I can save them. How do I do t...
Estranged asked 20/12, 2017 at 11:41

9

Solved

I am getting a ReferenceError: window is not defined when using next.js with leaflet.js . Wondering if there's a simple solution to this problem - is using next.js overcomplicating my workflow? f...
Lanford asked 29/8, 2019 at 6:27

2

Solved

So what I'm trying to do is, I want to change the center of map after I get the users lat and lng, the code below will make the problem clearer: <LeafletMap center={this.state.UserCurrentPositi...
Furbish asked 16/12, 2020 at 11:47

2

Solved

I want to get bounds of the current map so that I can search those bounds with the Overpass API. For leaflet I know the method is just map.getBounds(), but I don't know how to implement that in re...
Macerate asked 21/11, 2016 at 20:20

3

Solved

Is there any difference between Circle and CircleMaker on leaflet? On example the only difference looks like one might have a children, though, on docs, both allow children. So whats the difference...
Gastritis asked 14/7, 2021 at 10:59

4

Solved

I want to have a button outside the map that changes the view to another coordinates. Is there any way to get mapContainer instance to call their functions? Or how can I implement that function? I ...
Finical asked 21/12, 2020 at 14:6

18

Solved

I am trying to create a react-typescript app along with leaflet. I used the command, npm install leaflet react-leaflet @types/react @types/leaflet --save to install the dependencies. But when I sta...
Aerate asked 15/5, 2021 at 23:26

3

Solved

I would be realy happy if some one could help me... I've installed react-leaflet on my react project and the map component is loaded successfully, i need to get current latlng and show it in the Po...
Stupa asked 3/2, 2019 at 13:18

0

Extending the following question: React-leaflet geojson onEachFeature popup with custom react component I am trying to have a Form within each popup that renders. Ideally the user is able to edit c...
Operon asked 16/2, 2022 at 11:21

4

I'm trying to create a <GeoJSON {...} /> react element from a Feature in Typescript, without success. (I'm using react-leaflet + Typescript) With regular js, I just have to do something like ...
Downthrow asked 22/2, 2020 at 6:11

5

Solved

Why I am getting: ./src/components/mapComponent/MapView.jsx Attempted import error: 'Map' is not exported from 'react-leaflet'. I am importing this in the component: import React, { Component } fr...
Lamarre asked 14/11, 2020 at 22:14

3

Solved

How to add markers dynamically to React-Leaflet maps? I want to add new markers when user clicks on map. And I cannot get it work. import React, { Component } from 'react' import { render } from ...
Forth asked 16/3, 2017 at 13:37

3

Solved

Issue I'm using leaflet v1.7.1 and react-leaflet v3.0.5 in my React project. When I try out the setup example in React Router's "Setup" documentation page, the marker icon becomes a broke...
Justness asked 17/1, 2021 at 8:5

1

Solved

I'm developing a React app, and I'm trying to implement a Leaflet-map with support for offline download of the map tiles. For this I thought of using leaflet.offline (https://github.com/allartk/lea...
Phosgene asked 7/9, 2021 at 16:36

3

Solved

I am using react-leaflet with tile provider Stadia OSM bright. when I run it locally Is showing tiles but when I make build and upload to server It stops loading tiles and starts giving request 403...
Advowson asked 22/4, 2020 at 6:55

4

React-leaflet nicely provides the ability to put content within a Popup of a Marker. For instance in my example: <Marker position={[item.lat, item.lng]} key={item.machineid}> <Popup m...
Somber asked 1/12, 2016 at 2:15

3

Solved

It is more theoretical question, rather than a problem. How to use font awesome icons as react-leaflet map marker icons? I would like to have such an icon selector control to assign(customize) ea...
Holster asked 29/8, 2018 at 16:51

1

Solved

When I click on Marker, Popup appears. Popup has a customized 'close' button. I want to use this button instead of default "X" in upper-right corner. I have seen these two questions: clos...
Billington asked 29/5, 2021 at 8:5

1

I've just started a brand new project using create-react-app and set up react-leaflet as their documentation recommends here. I am trying to use this example to check if it's all working good but t...
Guilbert asked 15/5, 2021 at 23:5

© 2022 - 2024 — McMap. All rights reserved.