All Questions
11
questions
0
votes
1
answer
481
views
How do you update the mapRef in React-Leaflet V4 when using React-Redux?
I am using react-leaflet version 4.x.
I'm trying to update the zoom level of the map on click of button, just as a simple use case. I realize that you could create a child component to <...
1
vote
0
answers
210
views
Leaflet onEachFeature bringToFront doesn't work as exptected with matching layers
Using React-Leaflet, I have an onEachFeature in which it checks if each layer shares a "group_id" with the currently selected layer and if that is the case, use layer.bringToFront().
My ...
0
votes
1
answer
4k
views
Getting user location and setting it to state using redux
I have a react app which shows the users location on map using react-leaflet. I used navigator.geolocation to get the position and sets it to the userData state when user allows access. Sometimes it ...
1
vote
1
answer
966
views
React-Leaflet: Polyline does not change colour despite colour value in Redux store updating
I have setup a Redux store which contains a hex colour code. I plan to implement a function where users can select a colour which the line will appear as. However, when the I used the selector to ...
1
vote
0
answers
452
views
React Redux how to load map markers while panning without rerendering everything?
I am using react + redux and react-leaflet v3 + an API to load markers to pin on a map dynamically based on panning behavior.
I have it so that "dragend" event is triggered and the map ...
1
vote
2
answers
11k
views
How to get map properties and handle events in leaflet v3 with react + redux?
I am new at react redux (and hooks) and I've been following this general tutorial:
I'm also interested in using react-leaflet, which at the time of this writing is on v3 which uses hooks. I've gotten ...
1
vote
1
answer
414
views
How to use leaflet.bezier plugin in react-leaflet?
I want to use a leaflet plugin called leaflet-geotiff (https://github.com/lifeeka/leaflet.bezier) but I'm using leaflet react. Is it possible for me to convert this plugin to a leaflet-react version?
4
votes
2
answers
7k
views
React-leaflet: how to update marker positions?
I can't understand how to update my markers correctly using react-leaflet. Using this example:
import React from 'react';
import { render } from 'react-dom';
import { connect } from 'react-redux';
...
1
vote
2
answers
830
views
Open popup with props state from redux
I'm creating a website with a big main map. I have some markers with popups working when I click on makers. But now, I want to open the popup with an external event. I use redux to maintain the ...
1
vote
1
answer
399
views
Mutable object inside a React/Redux store ( wrapper mapbox)?
Is it possible to store a mutable object in the store redux?
I'm trying to create a wrapper over the external library of the mapbox in my app. I create a map object using the library:
Component - ...
2
votes
0
answers
1k
views
OpenLayers (or other mapping APIs) + React/Redux: how to keep map object in the store?
I'm trying to figure out how to work with mapping APIs like openlayers, leaflet, mapbox, google maps, etc. and React + Redux.
My goal is to make the map object available to all other components of ...