All Questions
11
questions
1
vote
0
answers
36
views
Interacting with leaflet popup containing React components
I am trying to interact with a popup in Leaflet. However, when I try to click the CustomButton inside of the popup, nothing happens, it wont even console log.
const popupContent = (
<div>
...
0
votes
1
answer
159
views
i'm trying to bind react-bootstrap accordion to a leaflet.js marker. when clicking on accordion, marker will get zoomed-in
i'm trying to bind react-bootstrap accordion to a leaflet.js marker. when clicking on accordion, marker will get zoomed-in... the problem is i have to "double click" on the accordion to ...
0
votes
1
answer
277
views
Error: 'Map' is not exported from 'react-leaflet' (imported as 'LeafletMap')
Here is my code:
import { Map as LeafletMap, TileLayer } from 'react-leaflet';
function Map() {
return (
<div className="map">
<LeafletMap>
<TileLayer ...
2
votes
1
answer
3k
views
React Leaflet: Dynamic Markers, cannot read property 'addLayer'
I've been working on a map component that renders points of results that stream in from search. I have gotten most of it working, until I began passing props in for the return statement. I'm using my ...
3
votes
2
answers
6k
views
Leaflet-React : L is not defined
I have been using leaflet to allow geo-results to render onto a map for users to see where their results are located. This has worked fine up until now because I have been using the base functionality ...
0
votes
1
answer
70
views
Is there a way to append a div to already existing div generated automatically by leaflet in React JS?
Please, read the question two times, this is not a duplicate.
Is it possible to append a div generated by me in JSX to a div automatically generated by leaflet library in React?
<div class="...
3
votes
4
answers
3k
views
leaflet map overlapping the container div
So I went leaflet documentation and copy pasted example I found there to see If can reproduce the map, however, not only the map is broken but it is also overlapping the container it is in. I tried to ...
0
votes
0
answers
65
views
How can I realign this Leaflet map on my page?
I use the Leaflet map to display, on a map, a position given by my user.
However, when I load the map and center it on the marker of the user, it is not in the center of my map, but in the top-left ...
0
votes
1
answer
48
views
when I click one marker I need to zoom in two levels to see the location
I am using marker cluster group.
using that I am able to show two markers.
when you click number two which is in red color you will see two markers.
after that when I click one marker I need to zoom ...
0
votes
1
answer
212
views
leaflet popup string html not displaying correctly using react.js
I have the following code that tries to display html in the popup:
layer.bindPopup(
`<p data data-campaign="4" data-token="${this.state.reg_mapping[feature.properties.name]}">
<h4>...
1
vote
1
answer
210
views
using html5 video with react-leaflet
I'm trying to add overlay (in this case video) to my react-leaflet map using html5.
<div>
<Map viewport={this.state.viewport} onViewportChanged={this.onViewportChanged} zoomControl={...