Skip to main content

All Questions

Tagged with
5 votes
2 answers
3k views

Open Pop Up on Click Outside of Map

I have a list, and through clicking on the list Elements, I want to open the pop up on the marker. Currently, the pop up only opens when the marker is clicked. This is how I create the marker and ...
four-eyes's user avatar
  • 11.9k
5 votes
2 answers
624 views

Extracting underlying data via RSelenium with embedded leaflet svg, and more

I would like to extract information about each ad in this link. Now, I got to the stage where I can automatically click See Ad Details, but there is much underlying data that is not straightforward to ...
Kim's user avatar
  • 4,240
5 votes
6 answers
8k views

useLeafletContext() can only be used in a descendant of <MapContainer>

I am in the process of converting a leaflet-map in React into a hook with the use of react-leaflet and react-leaflet-markercluster. Everything worked perfectly except the use of the MarkerCluster ...
julziemoon's user avatar
5 votes
1 answer
6k views

Leaflet error: clearLayers is not a function

I'm using a Leaflet offline map with React where I manually load in a countries.js GeoJSON file with every country in the world. I then conditionally color each country depending on data received from ...
cbll's user avatar
  • 6,999
5 votes
1 answer
2k views

React Leaflet popups not working on mobile devices

I'm using react-leaflet in an application and it works as intended unless it is viewed from a mobile device (both physical and through dev tools). On mobile devices, the popups will appear and ...
Michael's user avatar
  • 421
5 votes
1 answer
4k views

Importing geojson to react-leaflet-draw

I am trying to import some GeoJSON to the FeatureGroup in _onFeatureGroupReady event handler, but it doesn't appear to be rendered into the map. The code is mostly based on the example from the ...
r3wt's user avatar
  • 4,722
5 votes
3 answers
5k views

react-leaflet-markercluster is not working

I'am trying to use react-leaflet-markercluster, but after I add <MarkerClusterGroup> to the code, errors are displayed in the console and the page does not load. If this component is not added, ...
Akhtem Aliiev's user avatar
5 votes
1 answer
1k views

Leaflet renders Windy map when used via CDN but not via npm pakcage

I am using Leaflet with Windy in React via CDN which works fine: in index.js: <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> <script src="https://...
Mr. Robot's user avatar
  • 1,704
5 votes
1 answer
451 views

How to make marker appear on the surface of image overlay onclicked in react-leaflet?

I am using React leaflet together with custom CRS, Leaflet CRS docs What I want to do is: A custom image is display at the map container as ImageOverlay When user clicked on a position on the Image, ...
ken's user avatar
  • 2,612
5 votes
0 answers
3k views

Testing mapbox-gl map fails in test because theres no WebGL

I use mapbox-gl, specifically mapbox-gl-leaflet, in React to create a map: import Leaflet from 'leaflet' import 'mapbox-gl/dist/mapbox-gl.css' import {} from 'mapbox-gl-leaflet' import 'leaflet/dist/...
Juuro's user avatar
  • 1,617
5 votes
0 answers
387 views

Rendering Component as Leaflet Marker using renderToString loses theme

We have a react project that uses styled components, with a ThemeProvider providing a theme object that all of the components should be able to reference. In this project, we have a leaflet map, and ...
Steve Dockery's user avatar
4 votes
2 answers
9k views

Uncaught Error: Map container is already initialized

I am using React JS for making a webpage. My aim is to display a map on the front end. I am using the react-leaflet npm package for the same. However, I am getting the below error: Error... "...
piyush kasturi's user avatar
4 votes
1 answer
22k views

React-leaflet bounds

Right now I am setting the bounds of my react leaflet map by passing a bounds parameter as shown below: <div hidden={!this.props.hide && !this.props.toggle} className="map-container"&...
trebek1's user avatar
  • 775
4 votes
1 answer
3k views

React-Leaflet Map doesn't update

My issue is that react-leaflet <MapContainer> doesn't center on a position that I set dynamically. The basic logic is that I have a form where I enter Street and House Number, then I make call ...
ArmanK's user avatar
  • 155
4 votes
1 answer
3k views

Probleme to reload a ReactLeaflet map

I got a problem with my map. A react-leaflet map. It's displayed when I load my website on it. But other way, like on click on a link, it doesn't. I just load the tiles at the top left, one by one ...
Anastasia's user avatar
  • 131

15 30 50 per page
1 2 3
4
5
74