Skip to main content

All Questions

Tagged with
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
1 vote
0 answers
166 views

React-leaflet `no Context Provided` error when creating 3rd-party plugin

I am trying to build a custom plugin component for react-leaflet, but am running into the same error that several others have before me: No context provided: useLeafletContext() can only be used in a ...
tgordon18's user avatar
  • 1,757
0 votes
0 answers
193 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
0 answers
136 views

Create a wider selection area to select the lines on react-leaflet map

Having difficulty in selecting the lines on react-leaflet map, so I have followed the below solutions, https://gis.stackexchange.com/questions/466747/create-wider-selection-area-to-select-lines-on-...
Kishor's user avatar
  • 200
0 votes
1 answer
93 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
0 votes
1 answer
285 views

Renderer is not working in PathOptions for the Polyline in react-leaflet

I'm trying to add renderer property to PathOptions for drawing the Polyline and here is the code for it: const canvasRenderer = L.canvas({ tolerance: 5, }); <Polyline ...
Kishor's user avatar
  • 200
0 votes
1 answer
122 views

How to drag a polygon when dragging a marker inside of it?

I have a map with polygons and markers, and a sidebar with tools buttons (like in this demo : https://geoman.io/demo). My markers are linked to my polygons in my database and if I use the 'Drag layers'...
FE-P's user avatar
  • 89
0 votes
1 answer
118 views

React leaflet polygon has border stroke when clicking on it (in Chrome)

I have a new problem with react leaflet this problem appeared suddenly. I don't know what happened and this stroke suddenly appeared around of polygon just in chrome browser when clicking on polygon. ...
Muhammad Habibpour's user avatar
0 votes
0 answers
76 views

How to Fix Polygon Stretching Error in React Leaflet Map

I am working on a project where I am using the react-leaflet package to display a series of polygons on a map, based on data fetched from an external API. I am experiencing an issue where some ...
bhamam's user avatar
  • 13
0 votes
0 answers
107 views

Leaflet Heatmap is rendering only what is on screen, if I drag the map it will re-render after releasing the mouse

So basically I understand that the heatmap is rendering only what is beeing showed on screen. I wanted it to render more than what's on screen so that this problem woundn't happen. I have already ...
Felipe Castro's user avatar
0 votes
1 answer
386 views

React Leaflet Google Map Partial and Incomplete [duplicate]

I'm trying to learn something and develop a google map project with react-leaflet using JavaScript. I've made a simple React app and implemented the simple google map layer. Maps however are only ...
Raw Anger's user avatar
0 votes
0 answers
45 views

how to use leaflet.shapefile plugin

how do we actually start using leaflet.shapefile plugin from calvinmetcalf? I ran npm install shpjs --save, but when I do something like new L.Shapefile it will show this error: ...
Qwerty's user avatar
  • 23
0 votes
0 answers
55 views

Rewrite react-leaflet event

I have a similar problem as this question from almost 7 years ago: Rewrite Leaflet event Except I want to extend the boxZoom handler in react-leaflet. Specifically I want to modify the boxZoom....
shipurjan's user avatar
0 votes
1 answer
405 views

Using bringToFront() / bringToBack() in React-Leaflet to set Layer order

I want to set the layer order of my react leaflet map by calling bringToBack() on my selected layer after the component has rendered. I tried getting the layer with useRef() and then calling ...
user avatar

15 30 50 per page
1
5 6
7
8 9
74