React friendly API wrapper around MapboxGL JS.
Questions tagged [react-map-gl]
291 questions
0
votes
1 answer
I cant use bootstrap modals in a map function
first iframe works. but second iframe is in the bootstrap modal doesnt get my src attribute. shows empty in the console.
if i type src="youtube.com/url" instead of src={musics.musicEmbed} this also works. but i want to use bootstrap modals in my map…

Julia Schafer
- 387
- 1
- 6
- 15
0
votes
2 answers
Image of react-map-gl fails in Next.js application
I am struggling getting Image from react-map-gl to work with my Next.js application.
To narrow it down, I have tried to port over the example from the official documentation (https://urbica.github.io/react-map-gl/#/Components/Image):
import {…

user5801710
- 301
- 1
- 9
0
votes
1 answer
Stuck with React Fragments
I have been stuck with this React Fragment problem for a week. For some reason, my code is breaking in the return block. This causes my app to not work correctly. I followed the tutorial for the CRUD application, however, the teacher's app and…

Daniel Siddiqui
- 21
- 3
0
votes
2 answers
React Map is not reading properties
I am learning react. It is showing an error. I tried many time to solve it but failed. I tried changing this.state.article with this.article but in vein- I even tried to cover this in function but it didn't work.
constructor(){
super();
…

Muzamil Khan
- 1
- 1
0
votes
1 answer
raster tiles from a custom source in ReactMapGL
I'm new to ReactMapGL library, I need to load openweathermap data on Mapbox map using ReactMapGL library following the way I have tried but it is not successful.

Rayan
- 181
- 1
- 1
- 4
0
votes
1 answer
React map gl NavigationControls not showing on page
I think it might be a css issue, the docs state: Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to work properly. Make sure to add the stylesheet to your page. What stylesheet would this be exactly?
import React, {…

Linguistics
- 139
- 1
- 5
0
votes
1 answer
Mapbox GL style line color based on property text value
I'm trying to style a single GeoJSON source with different line colors based on a feature property using react-map-gl, and I can't find a way to get set the color of lines in a smart way.
Most of all, I would love to apply a function on the dataset…

hansmei
- 660
- 7
- 17
0
votes
2 answers
React-map-gl-draw unable to install
I am trying to add react-map-gl-draw to my application on top of react-map-gl; however, the error I get is the following:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving:…

Berk Özkan
- 19
- 4
0
votes
1 answer
React Map GL: map not taking the width and height after opening inspect
I am using react map gl to render maps in my react application. But the Maps rendered from react-map-gl are not taking the width after opening inspect and, sometimes not restoring back to normal after shrinking the window
This is my setting for the…
user15608655
0
votes
1 answer
Map not showing up when using react-map-gl and create-react-app
I am using create react app, along with react-map-gl. I just need the map to show up on the screen right now but all it does is show the mapbox logo and have a blank space where the map should be.
Here is my main .js file:
import './App.css';
…

Linxs
- 15
- 5
0
votes
0 answers
How use for loop inside view in react native
I have vehicle_details array of 2 object given below
vehicle_details: Array(2)
0: {id: 919, requisition_id: 932, vehicle_id: 39, vehicle_no: "TN02K8762", shift: "Double Shift", …}
1: {id: 972, requisition_id: 932, vehicle_id: 234, vehicle_no:…

Mahesh Amte
- 83
- 8
0
votes
1 answer
How to find react-map-gl-draw icons className
I'm using the react-map-gl-draw library to draw polygons on the map. I would like to find out the className for the icons of react-map-gl-draw.
For example, className="mapbox-gl-draw_ctrl-draw-btn mapbox-gl-draw_trash" will give me a button with…

Boogie
- 115
- 6
0
votes
2 answers
How can I import the const data from another file using Promise (React)
I am trying to import data from another file into my React component. The data is acquired via an asynchronous function resolving to the data.
However I am getting an error when trying to map over the test data in the consuming component. I think…

kelvin
- 13
- 3
0
votes
1 answer
Cannot display MAP from react-map-gl and Mapbox
I am using react project, so created create-react-app with tailwind Css by following this guide: https://tailwindcss.com/docs/guides/create-react-app,
In my project I need to have Map so I can get the nearest location and so on. So followed this…

Ayesha
- 211
- 1
- 2
- 13