Questions tagged [react-map-gl]

React friendly API wrapper around MapboxGL JS.

291 questions
0
votes
1 answer

Can't understand why I only get one table row in this react loop

The Tables variable is an Object which contains and array of objects const Tables = {QD1:[{key:value, key:value, key:value, key:value}],QD1:[{key:value, key:value, key:value,key:value}]} I'm trying ti construct a table based on the contents of it.…
Quantipy
  • 3
  • 2
0
votes
1 answer

Mapbox GL popup text is unselectable

The text in my popups is unselectable. I am able to close popups via click, etc., but when hovering the pointer over the text, the pointer remains as the hand icon, and never changes into the I-beam text selection icon. I've tried adding the popups…
Lasf
  • 2,536
  • 1
  • 16
  • 35
0
votes
1 answer

Deck.GL ScatterplotLayer does not render circle radius

I'm trying to draw a circle on a map (where in the center there will be a marker). However, nothing is appearing on my map. I've tried various ScatterplotLayer options and tried switching the location, also tried getPosition: (d) =>…
Perelan
  • 396
  • 5
  • 19
0
votes
1 answer

React-Map-GL: How can i see the icons which i can use by default mapbox - map sprite?

I have the following geojson of points, which are going to be buses on the map: const features = buses.map((el) => ({ type: 'Feature', geometry: { type: 'Point', coordinates: el.state.position.coordinates.map((coordinate) =>…
0
votes
1 answer

How to put a input form component overlay on ReactMapGL component?

I am new to the React app development. I am trying to create a react app which uses ReactMapGL class from react-map-gl library. This renders the map (I created Map component). I want to display an input form(I created SampleInputForm component) as…
STforever
  • 15
  • 4
0
votes
2 answers

How to use data in deck.gl?

I am new to deck.gl and having some issues.Whenever i try to use API as data like I am trying to use the following api data: 'https://envirocar.org/api/stable/measurements' but it doesn't work or if i put api's data in a json file and put that in…
0
votes
1 answer

React and hooks - Getting TypeError: Object(...) is not a function

I'm using Mapbox to try to render various coordinates from a local JSON file. However, I'm receiving the error TypeError: Object(...) is not a function. I've looked up some info on what could be causing it (e.g. earlier versions of react won't work…
Bodrov
  • 840
  • 1
  • 15
  • 29
0
votes
1 answer

React-map-gl dynamic geoJson file cause Error 414 - URI too long

I fetch the data from database which is not a geoJson, so I use array.map function dynamically making one base on the data I fetched, then passing to component. But it seems this geoJson paste to URL as GET parameters... if I save the geoJson as…
0
votes
0 answers

received Error: failed to invert matrix when add in deckGL in Reactjs hooks

im new in reactjs and deckGL and im having a little problem with the code below. I am trying to add DeckGL with FlyToInterpolator to center the marker. I'm receiving this error after I clicked the button, but when i'm using the react-map-gl +…
Melissa
  • 35
  • 8
0
votes
0 answers

React-map-gl (GeoJSON map example): data not updating in map through control panel (year slider)

I am trying to implement GeoJSON example from here : https://uber.github.io/react-map-gl/#/Examples/geo but when I try to change the year slider from year to year, data and dataLayers are staying the same and not changing at all. I've copied the…
0
votes
1 answer

Dynamic Mapbox layer update using @urbica/react-map-gl

I can’t change the source-layer dynamically in . By pressing a button I change state to layer: 'building' or layer: 'road' but changes do not occur inside Code with…
0
votes
2 answers

React useState hook not updating state onClick

I am using useState hooks in React and the geojson state will not be updated in the when _updateData is triggered onClick. I think useEffect is overwriting the updated geojson which changes onClick in the _updateData…
0
votes
1 answer

How to setState of one state using the state of another state onClick

Is there a way to setState of one state with the state of another state? For example below in _updateData()...on click the geojson state gets the state of newGeojson? The goal is to be able to change the data={geojson} on click of the button (not…
ckingchris
  • 559
  • 1
  • 12
  • 25
0
votes
1 answer

How to create a grid of 50sq km Rectangles or Hexagons in React Map GL(Mapbox) and Deck.gl, that covers an entire country

I'm trying to create a Grid Layer of Either Rectangles or Hexagons in React Map GL(Map Box) and Deck GL, that cover an entire country. This is what I'm trying to achieve: http://webcoveragemap.rootmetrics.com/en-US These are the Solutions I've…
Jawad Farooqi
  • 335
  • 3
  • 14
0
votes
1 answer

How to remove all map layers from kepler.gl dynamically?

I have added a div and dropdwn, on each option I have uploaded geojson data using addDatatoMap in reactjs . On each time I selected the option , this uploaded the respective layer , But I am not able to remove the previous layers, So any code or…