Skip to main content

All Questions

91 votes
19 answers
85k views

react-leaflet map not correctly displayed

I'm trying to use react-leaflet to display a map. I use the code from this fiddle which is working, but on my computer I have this output Here is my code : DeviceMap.js import React from 'react' ...
ThomasThiebaud's user avatar
2 votes
1 answer
373 views

react-leaflet 1.x + create-react-app : 404 on marker image

I tried using react-leaflet (in version 1.0.0-rc.2) with create-react-app but the marker image is in 404. The generated image src is http://{server_host}:3000/static/media/marker-icon.2273e3d8.png")...
Julien Deniau's user avatar
0 votes
1 answer
2k views

React leaflet marker layer not updating on zoom

The react-leaflet-marker-layer does not update on zooming the map in/out. It stays the same, while the map content changes its zoom level. This happens both during zoom using mouse scroll and the +/...
Peter G.'s user avatar
  • 7,954
18 votes
5 answers
15k views

React leaflet not rendering properly

The react-leaflet map does not get rendered properly. The map is rendered outside of its parent's boundaries Some tiles of the map are missing The problem occurs when using the map with standard ...
Peter G.'s user avatar
  • 7,954
2 votes
2 answers
3k views

React-leaflet: How can GeoJson methods like resetStyle be called?

I am following leafletjs's interactive choropleth map example and I am trying to add interaction by using the GeoJson object's resetStyle method and the Map object's fitBounds method. In leaflet, ...
photon's user avatar
  • 606
7 votes
2 answers
3k views

React-leaflet how to resetStyle

I'm following Leaflet's Choropleth tutorial http://leafletjs.com/examples/choropleth.html and using react-leaflet. I managed to setStyle without any modification from the original source code and it ...
Alex Parij's user avatar
  • 1,246
2 votes
2 answers
9k views

How to reference the leaflet layer of a react-leaflet component?

I used react-leaflet to visualize a quite long path on a map. Users can select from a list and I would like to have different color for the selected path. Changing the state and rendering again is too ...
elcsiga's user avatar
  • 180
4 votes
1 answer
2k views

Leaflet popup won't open (React)

I'm working on a map view for a react application which I'm using Leaflet for (react-leaflet). I'm able to plot markers on the map, but the popups that I have bound to them won't open when clicked. I ...
Matt's user avatar
  • 4,049
2 votes
1 answer
7k views

Having trouble getting a custom zoom button in React-Leaflet

I'm trying to build my own Zoom button with react-leaflet I have the following code: import React from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import { Map, ...
Javier Muñoz's user avatar
4 votes
1 answer
1k views

TileLayer displays in different order (Using React-Leaflet library)

I'm trying to do a simple Web App using the library react-leaflet. I have the following code: import React from 'react'; import { Map, Marker, Popup, TileLayer } from 'react-leaflet'; class ...
Javier Muñoz's user avatar
0 votes
1 answer
3k views

Leaflet JS (react-leaflet) - Bounds Box Filled With Transparent Color

I'm working with react-leaflet package, however, if you can answer the question in plain leaflet that would be helpful as well. I am successfully panning to the bounds of a polygon that I supply like ...
maxwell's user avatar
  • 2,361
0 votes
1 answer
1k views

What is the proper way to set options for the <Map> component in the React-Leaflet library?

The React-Leaflet documentation specifies that certain dynamic properties can be set via props. However, there are many other Leaflet properties/methods that are customizable...the caveat being that ...
J.C's user avatar
  • 80
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
2 votes
2 answers
2k views

How to write a component which outputs Markers of react-leaflet?

How a custom react component which outputs Marker on map should be written? I need to have smth like this working: import MyMarker from './MyMarker.js'; const builtMarker = (function() { const ...
Varvara Stepanova's user avatar

15 30 50 per page
1
47 48 49 50
51