All Questions
1,096
questions
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 ...
2
votes
1
answer
2k
views
React/ES6: Arrow Function not binding "this" as expected
Language: React/JavaScript ES6
Bundling Tool: Webpack(babel-loader 6.0.0)
Other Libs Involved : Leaflet
Problem:
With the function below the context this is bound to the
component as I need.
...
3
votes
4
answers
5k
views
React and Leaflet
I'm trying to use Leaflet in my React App. I'm running into an issue. Leaflet.js requires the div component to pre-exist when initiating the map. React doesn't "create" the div until it renders the ...
68
votes
4
answers
71k
views
Is it ok to use ReactDOMServer.renderToString in the browser in areas where React isn't directly managing the DOM?
I'm working on an app using Leaflet (via react-leaflet). Leaflet directly manipulates the DOM. The react-leaflet library doesn't change that, it just gives you React components that you can use to ...
0
votes
1
answer
2k
views
How to get marker drag event on dragging marker with mapbox LeafLet
I have created custom create Marker button and onClick of that i am adding marker on map.
I can drag that map but I am lot getting it's LatLng on dragging.
I want to get latlng on marker drag event....
2
votes
1
answer
2k
views
Tiles not ordered correctly when using LeafletJS with ReactJS
I am using the LeafletJS plugin to display a full page map in a ReactJS single page app. I followed the instructions here. However, the tiles are not displayed in correct order. They are ordered ...
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 ...
1
vote
2
answers
753
views
Redux for use in mapping applications
I know that redux is great for handling the global state of an application, and when that state is updated to reflect that in the view. However, is it possible to use it on a react component that ...
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"&...
0
votes
1
answer
2k
views
ReactJS with Leaflet: tiles not correctly displayed until page refresh
I am building an application using Semantic UI and ReactJS. I am using a tab module to contain my map, which uses the Leaflet Javascript library to render the map.
The problem is that the tiles do ...
0
votes
2
answers
901
views
PruneCluster and React.js
Some used them together?
Maybe there is a component for the PruneCluster?
It will be great to see some examples/tutorials....
3
votes
1
answer
4k
views
Reference on object instance - React
I'm using react to render a leaflet map. Since I can't get the map object instance from the DOM, how can I retrieve the instance from components inside different routes ?
App.js
const Main = React....
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 ...
1
vote
1
answer
1k
views
Embeed script tag in React.js render
I try to include a script from Leaflet in a React element, and because it contains a <script>code</script> it raises an error:
var Carte = React.createClass({
render: function() {
var ...
2
votes
1
answer
5k
views
React.js and Mapbox: mapbox map not rendering properly when using react.js
I'm learning to use both react and mapbox,but am struggling with why my mapbox map is not rendering properly when loaded through React. When I load it normally (without React.js), there is no problem,...