Skip to main content

All Questions

Tagged with
0 votes
0 answers
70 views

flyTo of react leaftlet working while setView is not react leaflet

I'm building this "Contacts" page that gets some locations from supabase displays them on the map and at the same time displays their information in a ul. Now everytime the user clicks on a ...
Wicked's user avatar
  • 1
0 votes
3 answers
166 views

Smooth scroll with react-leaflet

I'm trying to create a smooth zoom in my react-leaflet project. I know that this is doable with vanilla leaflet as said in this post, with smoothWheelZoom, but knowing that vanilla leaflet does not ...
Horkos's user avatar
  • 331
0 votes
0 answers
41 views

react-leaflet manage close popup on Child Component

I'm trying to make a react-leaflet popup everytime I click a link that changes the marker position in the child component, but it never closes de popup, here's what it looks like on the map component ...
Sebastián Vidal's user avatar
0 votes
0 answers
12 views

how to push React Leaflet's attribution and map controls to the back [duplicate]

what i'm trying to do the user sees a map, built in React Leaflet / Leaflet.JS. The user can then click a CTA button that pops up a modal. The modal should be the "top layer" of the screen, ...
henrylin03's user avatar
0 votes
1 answer
69 views

React-leaflet ImageOverlay is not visible in exported PDF using jspdf

I'm using react-leaflet v4.2.1. I'm using it to display not a map but custom image like that <MapContainer center={[height / 2, width / 2]} crs={crs} bounds={bounds} minZoom={-5} ...
PatLuc's user avatar
  • 1
0 votes
0 answers
77 views

Implement Map Tiler Temperature weather layer with leaflet and reactjs

I'm trying to make a temperature overlay on the map but getting an error: object is not a layer The desired outcome is as follows: My Code: import { useEffect, useContext } from 'react'; import L ...
Web Dev's user avatar
0 votes
1 answer
126 views

want to show pin on leaflet map using react js

I am trying to create a map using React JS and a leaflet but the problem is I am not able to map position on the map here is my code import React, { useState } from 'react'; import { MapContainer, ...
Shiv's user avatar
  • 23
0 votes
0 answers
110 views

React Leaflet map not Re-rendering

I'm encountering an issue with my React application where the Leaflet map component is not re-rendering even though the data it depends on has changed. Here's the structure of my code: App.js let [...
New's user avatar
  • 11
0 votes
0 answers
49 views

Error Adding Marker Clusters & County Boundaries to Leaflet Map

I am able to add all state boundaries to my leaflet map. But if I try to add clusters I am getting the below error. Error in /~/components/MapBoundaries.tsx (138:34) map is not defined Can you let me ...
Ram01's user avatar
  • 171
0 votes
0 answers
63 views

How to Insert React Component Inside `leaflet-overlay-pane` using react-leaflet (core)?

I'm working on a project where I'm using react and react-leaflet to create a map application. I have a requirement to insert a custom React component, wrapped in a <div>, inside the leaflet-...
dina's user avatar
  • 1,052
0 votes
0 answers
35 views

How to wrap the VideoOverlay component in react-leaflet with a div?

I'm currently working on integrating a video overlay onto a map using the react-leaflet library. I'm using the VideoOverlay component provided by react-leaflet to render the video onto the map ...
dina's user avatar
  • 1,052
0 votes
0 answers
80 views

How to Implement Tile Caching for Leaflet in React?

I'm currently working on a project using React with Leaflet for mapping functionality. I've been exploring options to optimize performance, and one area I'm interested in is caching Leaflet tiles to ...
ssss's user avatar
  • 202
0 votes
1 answer
103 views

Why whenever i call MapContainer I always get "React-leaflet Error: Dispatcher is null"?

I am at my first experiments with React-Leaflet, so after installing everything i treid to add a simple map in my React App, but whenever i call MapContainer the only thing I obtain is this error log: ...
OvalRock's user avatar
0 votes
0 answers
113 views

Create A Polar Coordinates Grid using react-leaflet

I am currently working on a react component that could potentially create a Polar coordinates grid. In my React Project, i have to display on top of OSM (Open Street Map) two types of Grids (...
Elmounir Othmane's user avatar
0 votes
1 answer
58 views

React Leaflet: Resize point marker not being dragged

A resizeable rectangle in place automatically on the map with some bounds. when I drag the rectangle, it drags but the resizeable points is still on the same place. Is there something i am missing ...
raman's user avatar
  • 980
0 votes
0 answers
18 views

How to add the toolbar in leaflet [duplicate]

I want to add the leaflet toolbar like below in the MapContainer, would you please help ? <MapContainer id='mymap' center={[65, 300]} zoom={1} zoomControl={true} doubleClickZoom={false} ...
azerty's user avatar
  • 3
0 votes
0 answers
17 views

React Leaflet NextJS - interactive bug map (unsynchronized images) [duplicate]

I have a small problem, I use leaflet react, but I have this kind of rendering The first zoom is perfect in itself (complete image, but weird contour), but as soon as I switch to Zoom 1, 2, 3..., I ...
Mateo's user avatar
  • 35
0 votes
1 answer
112 views

Auto pan and update map position when data inside Popup changes

I have some dynamic data inside <Popup> that will change the Popup box size after opening. When you first click on the <Marker> it will update the content, position and adjust the pan of ...
newcool's user avatar
  • 321
0 votes
1 answer
81 views

React-Leaflet: updating a marker's position every second fetching the coordinates from an .env file

I'm running a simple react-lefleat map on small http server running on an Arduino board and I would like to update a marker's position (my position) according to the coordinates extraced by the ...
Sebastian Schweizer's user avatar
0 votes
1 answer
58 views

Leaflet mosaic TileLayer

I want to use leaflet reactjs and i want to do it on an image. the prblm is that the image is shown as mosaic. <div className="bg-white w-auto m-2 h-[calc(635px-10rem)] border-2 border-gray-...
azerty's user avatar
  • 3
0 votes
1 answer
115 views

React Leaflet Material UI divIcon not styled

In React Leaflet, I am trying to use divIcon to render a custom Material UI marker that takes in a background color prop. However, when the marker is used in leaflet, the background style is not ...
pomipiwimo's user avatar
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
0 answers
130 views

Working example for Leaflet Geosearch in react

Excuse my ignorance, but being new to react and JS, I am getting irate trying to follow the docs for https://smeijer.github.io/leaflet-geosearch/ & https://github.com/smeijer/leaflet-geosearch I ...
Bringle's user avatar
  • 61
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
1 vote
1 answer
87 views

How to Get GeoJSON Feature on Map.Locate in React Leaflet

I am creating a map with imported GeoJSON data. I am trying to create a Find Me button that will zoom to the user's location and get a property associated with the enclosing region (as defined by the ...
isaa's user avatar
  • 11
0 votes
2 answers
312 views

Type Error Importing GeoJSON file in a Typescript React App

I am trying to import a GeoJSON file to map region in a Leaflet map using React-Leaflet. I started the project using create-react-app. However, when I try to use the data in the GeoJSON component, I ...
isaa's user avatar
  • 11
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
0 votes
0 answers
114 views

Issue using MapContainer from react-leaflet: TypeError: Cannot read properties of null (reading 'useState')

I'm trying to use React Leaflet to add a map from OpenStreetMap on my website. Everything seems to go well syntax wise, however when I try to use I encounter this error: Uncaught TypeError: Cannot ...
yoenuts's user avatar
  • 31
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
1 vote
1 answer
339 views

How can I access the map object since the whenCreated prop was removed in react-leaflet v4.x?

I have been struggling with an issue which comes down to me not being able to properly reference the map object. After researching it for a few days, I've come to the conclusion that the "old&...
EngineeringCheetah's user avatar

15 30 50 per page
1
2
3 4 5
37