All Questions
1,098
questions
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 ...
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, ...
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 ...
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/...
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-...
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/...
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
...
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'...
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.
...
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 ...
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 ...
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 ...
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:
...
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....
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 ...