React friendly API wrapper around MapboxGL JS.
Questions tagged [react-map-gl]
291 questions
0
votes
1 answer
react-map-gl-draw addFeatures creating duplicates
Describe the Issue
When feature is deleted and new feature is added for vertices to update. The new feature is created twice. Every time this cycle is repeated.
Function deleteVertex have the the code of this problem.
Actual Result
new duplicate…

Zohaib Imtiaz
- 369
- 1
- 3
- 8
0
votes
1 answer
why aren't marker icons showing on the map of react mapbox?
i want to include my address pinpoint in the map and i am using react-map-gl since it is free to use. i have uploaded the project for map options in codesandbox
my target is the put icons on significant institutions around my address and i rendered…

rony01
- 131
- 10
0
votes
1 answer
how can i add source and layer to my react-map-gl
i'm trying to add source and layers on my map and it's not rendering even though the map is being rendered.
But whenever i change the source type to vector it worked, but the type i want to use is geojson(in order to use polygons and polyline), but…

Ogundipe Pelumi
- 57
- 2
- 8
0
votes
1 answer
How to display a line in 3s plane on map?
I want to display some lines in 3d plane, just like below image.
Currently i am using mapbox-gl-js to display map in my application.
I want to do this is mapbox-gl-js, but mapbox doesn't supports this feature. Is there any way to achive this…
user13319825
0
votes
1 answer
Is there a way to overlay a png and coordinates on a map using react-map-gl
I am trying to display a png image on a react-map-gl map similarly to how it is described here but the image does not display as expected and there are no errors to work with.
Here is the code
const Map = (props: Props) => {
const [viewport,…

mcpolandc
- 217
- 2
- 7
- 15
0
votes
1 answer
How to use mapbox studio url in react-map-gl?
I am trying to use style url from mapbox studio. I am using react-map-gl as a wrapper for map-box-gl js.
user13319825
0
votes
1 answer
How to cerate hover effect in geojson mapbox
I am using MAP-BOX to draw map on the screen. I want to create some effect on mouse-hover.
I created line using geojson source and react-map-gl as a wrapper.
I want to set some opacity to the line on mouse hover.
export const layer = {
'id':…
user13319825
0
votes
1 answer
How to loop through and return the values of a javascript object?
(Apologies if some of my terms aren't correct)
In Firebase I have a number of posts. Each post has a 'latitude' field and a 'longitude' field. I am pulling these out and storing them in an array/object called mapRefs:
useEffect(() => {
…

Ray Purchase
- 681
- 1
- 11
- 37
0
votes
0 answers
Animating geojson position in react-map-gl
I've been trying to make an uber like the animation on a ReactJS app where once the user starts a ride the position of the cab updates according to the coordinates sent by backend every 5 seconds. But the position of the marker never updates, even…

Divye Shah
- 747
- 1
- 11
- 24
0
votes
1 answer
How to load React-map-gl with latitude and longitude set as users loaction by default?
I want to render the map with default values of viewport set to user's location. Currently below code is for normal rendering and there is locate me button in the map when clicked it moves to that location.
Any way to get it default…

Mohit Balwani
- 1
- 1
0
votes
1 answer
React-map-gl and deck.gl plot bounds
I was just wondering what the plotting bounds are for react-map-gl and deck.gl is, im trying to plot coordinates e.g. [90,20] and it doesnt plot on the map. Im simply using an icon layer and a staticmap.

MacaScull
- 161
- 1
- 10
0
votes
1 answer
Deck.gl globe advice
I was just wondering if anyone can provide an example of the globe being used within Deck.gl, is it an actual globe or is it just the view. As I would like to be able to view a globe, I've made a minor attempt at using it but this left me with a…

MacaScull
- 161
- 1
- 10
0
votes
2 answers
react-map-gl makes request to its api everytime the component is rendered
I am using react-map-gl Mapbox for map but it seems to make requests to mapbox api every time the component is rendered. How can I prevent this?
My component

Lokesh Bajracharya
- 457
- 2
- 8
- 19
0
votes
1 answer
React-Map-GL - Can't pass environmental variable to component
I'm using react-map-gl to integrate Mapbox into my project. My Map component looks like this:
import * as React from 'react';
import { useState } from 'react';
import ReactMapGL from 'react-map-gl';
function Map() {
const [viewport, setViewport]…

Nick Kinlen
- 1,356
- 4
- 30
- 58
0
votes
1 answer
react-map-gl - India geoLocation is showing Incorrect
i am rendering indian cities on map using marker component of react-map-gl ,
showing ex. Mumbai "lat": "19.0760", "long": "72.8777" on react-map-gl but it is showing in incorrect position on map .
find Img link -…

Sachin
- 11
- 4