React components for leaflet maps. Use this tag for questions related to version 3 of react-leaflet only.
Questions tagged [react-leaflet-v3]
86 questions
0
votes
1 answer
Not sure how to ask this; but Is there a way of keeping the map in the canvas?
Hi I was wondering if there was a way to limit the amount you can move the map so that you can't get to a gray area off the map. For instance having the initial view of the map be the farthest you can zoom out and that map would not move at all.…

swade77
- 23
- 3
0
votes
1 answer
Update leaflet baselayer properties with GoogleMutant
I have a google layer (baselayer) GoogleMutant and want to update its options. I try to
map.remove(google.layer)
//update the POI visibility
google.layer.options.styles.forEach(i=>i.stylers[0].visibility = "off")
map.addLayer(google.layer)
this…

SERG
- 3,907
- 8
- 44
- 89
0
votes
1 answer
using react-leaflet-editable with react-leaflet 2.8.0
I am integrating/including react-leaflet-editable to my existing project which relies 100% on react-leaflet v2.8.0. I am not able to upgrade at the moment as it requires too much changes to the entire project. Something we cannot afford at the…

mw509
- 1,957
- 1
- 19
- 25
0
votes
1 answer
How to add tiles nested in leaflet map to canvas with latest version of react-leaflet?
I'm trying to add map on the canvas and put tiles there with react-leaflet library v3.X. At the moment tiles are displaying as
in HTML. In latest versions of react-leaflet there isn't Map object there is MapContainer object only. So I can't…

Alexander Baikalov
- 23
- 4
0
votes
0 answers
React-Leaflet and Auto Snapshot/Save to PNG
I absolutely love react-leaflet! I'm using it to produce basemaps for weather alerts on a next.js driven site. My company requires that the server is on the Intranet only. Therefore, for employees outside of the company, I'm sending an e-mail for…

Chris Jarzynka
- 11
- 2
0
votes
1 answer
Trying to display a marker where clicked on React Leaflet map
Here's the entire piece of code.
import React, { useState } from "react";
import { Marker, Popup, useMapEvents } from "react-leaflet";
const AddMarkers = () => {
const [markers, setMarkers] = useState([
{
lat: 40,
lng:…

Kuda
- 95
- 1
- 9
0
votes
1 answer
How to change tile layers in leftlet sidebyside or leaflet splitmap
according to this codesandbox I was trying to change the left or right layer of my map by mutating the state but it change the whole map tile when I'm changing it.
Any idea suggestion would be greatly appreciated.

Emad Baqeri
- 2,333
- 2
- 14
- 29
0
votes
1 answer
How to resolve the react-leaflet export error?
I wanted to render map in react js for my project. SO for it i installed react-leaflet using code npm i react-leaflet and also did npm i leaflet in terminal and entered some code for react leaflet. The code is given Below:
This is My Map.JS file:
…

P. M. Arun
- 3
- 4
0
votes
0 answers
How to rewrite from react-leaflet v2 to v3?
There is a library that runs on react-leaflet v2. https://github.com/somarmeteorologia/react-leaflet-markers
But my project uses react-leaflet v3. Therefore, this library needs to be rewritten for the new version. To do this, you need to rewrite…
0
votes
1 answer
Render Map child from outside MapContainer
I would like to render a child inside from outside the initial MapContainer. Is this possible somehow?
In react-leaflet-v3 I render a lot of items on the map by passing the map object via a reference. But for my current situation I…

Hoetmaaiers
- 3,413
- 2
- 19
- 29
-1
votes
1 answer
Spacing between heatmap point
I tried to customise leaflet heatmap.js to render rectangles to generate a heatmap. I was doing good so far. But, there are spacing in between rectangles that I can't get rid of. As in the picture.
heatmap
Solutions that I tried: turn off…

Chuong Lac
- 21
- 3