Skip to main content

All Questions

Tagged with
0 votes
1 answer
50 views

Leaftlet divIcon with clickable button

I'm working on leaflet and I wanted to add click event for a icon in the custom divIcon as below, If user clicks on the edit(pencile) icon then click event should trigger, Here is the code I'm ...
0 votes
1 answer
136 views

React Leaflet map resizing issues

While using react-leaflet to create a map, I would like the map component to take over all the available space after header and footer. The code seems to work. However, when the resize handler is ...
0 votes
0 answers
35 views

GeoJSON component not updating with state

I am having the following problem: although the filteredData is being updated, the Map doesnt reflect it. This is the relevant code for my HOC (which contians the Map component): const ...
0 votes
0 answers
17 views

Deployment error for Importing/exporting DomUtil

Failed to compile ⨯ ./node_modules/@react-leaflet/core/lib/dom.js Attempted import error: 'DomUtil' is not exported from 'leaflet' (imported as 'DomUtil'). This error occurred during the build process ...
1 vote
2 answers
196 views

React Leaflet markers not rendering with location data fetched from an API using useEffect

I am trying to render leaflet markers using React Leaflet with data fetched from an API using useEffect. The markers are not showing up despite the location data being non-null at the time of ...
0 votes
1 answer
75 views

Hide rest of map around country with leaflet.js in next js

I need help please. I would like to hide the other maps and only show the one of Cameroon. I'm using Leaflet and I'm on Next.js to be able to display the map. I saw this page React-Leaflet 4 with ...
1 vote
0 answers
399 views

React leaflet. map is not showing

I have been trying to create a map section in my website for at least an hour now, but the react-leaflet or leaflet just won't work at all. I do every step that the doc says, I have watched a lot of ...
0 votes
1 answer
74 views

Next.js React-Leaflet bouncing marker using Leaflet.SmoothMarkerBouncing

I am new to the front-end development, I am trying to get bouncing marker in React-leaflet using https://www.npmjs.com/package/leaflet.smooth_marker_bouncing/v/1.3.0?activeTab=explore But I don't have ...
4 votes
3 answers
3k views

React-leaflet doesn't display the map with leaflet.css loaded nor resizing

I'm working on a react project using leaflet, but it doesn't display de map, here is the Map component: import React from "react"; import { MapContainer, TileLayer, useMap } from "react-...
2 votes
4 answers
3k views

Map is not visible at initialization using react-leaflet

I have this react component: import React, { Fragment } from 'react'; import L from 'leaflet'; import { Map, TileLayer, Marker, Popup } from 'react-leaflet'; import 'leaflet/dist/leaflet.css'; const ...
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 ...
0 votes
0 answers
71 views

Leaflet Map Rendering Issue with Large Non-Geographical Map

I’m currently developing a non-geographical map for my website using React, tailwindCSS and react-leaflet. The map is square-shaped and quite large, with each side measuring 10 million pixels. The ...
2 votes
2 answers
881 views

React-leaflet + leaflet.elevation usage

I'm posting to see if anyone can give me some light on this 'problem/issue'. I'm using react-leaflet and also leaflet-elevation, a 'plug-in' that creates an elevation graph and also adds some extra ...
0 votes
1 answer
101 views

react-leaflet-heatmap-layer-v3 src directory not found

Trying to use the npm library react-leaflet-heatmap-layer-v3 and after I install it successfully and then yarn start my react typescript app, I get the following warning messages: WARNING in ./...
15 votes
4 answers
11k views

Leaflet React get map instance in functional component

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 ...

15 30 50 per page
1
2
3 4 5
74