React friendly API wrapper around MapboxGL JS.
Questions tagged [react-map-gl]
291 questions
0
votes
1 answer
How to add three.js object on top of mapbox
I'm currently using react, react-map-gl, and three.js. I'd like to render a .obj that I have on top of the react-map-gl.
If the deck.gl code/react-map-gl code is commented out, I currently have my .obj appearing on the screen successfully via:
and…

omnicon
- 99
- 3
- 13
0
votes
1 answer
Capture and Store Address with React in MongoDB
Trying to understand how to capture and store address in React.
I would like to achieve autocomplete functionality, so that user wouldn't be able to enter some scribbled address, instead user would start typing and then choose an address.
Ideally…

Scott Agirs
- 599
- 6
- 14
0
votes
1 answer
Ability to scroll the map when hovering marker?
Im struggling to make possible zooming the map when hovering a marker.
https://codesandbox.io/s/my2p15knj8 - example with marker
However, it is possible but only if I use feature instead of a…

Patrickkx
- 1,740
- 7
- 31
- 60
0
votes
1 answer
react-mapbox-gl Cluster not working
Cluster in react-mapbox-gl is giving error
I am able to plot markers without using cluster but with cluster it gives me this error:
supercluster_1.default is not a function
For this React code :
0
votes
1 answer
React google maps
Could some one let me know how to change the defaultCenter which is coming from the default property. How to change the default property and give the values from the server dynamically.
class SimpleMap extends React.Component {
static…

amitpowerpeace
- 105
- 1
- 2
- 5
0
votes
1 answer
Testing react-map-gl/deck.gl component with Jest/Enzyme causes 'TypeError: Cannot read property 'state' of null'
I am trying to create a simple 'renders without crashing' test for my React components that contains a ReactMapGL components, which itself contains a DeckGL component.
This is the test I have written:
describe('MapGL test', () => {
it('renders…

Freddie Brown
- 33
- 6
0
votes
1 answer
Mapbox render large dataset
I am building a website using mapbox to render about 24mb of geojson data. I stored these data in backend server, the API request takes about 2300ms, and front-end map displaying those data would take over 10 seconds.
The GeoJson are river stream…

leogoesger
- 3,476
- 5
- 33
- 71
0
votes
1 answer
How to switch mapboxgl language in DeckGL
I'm currently playing around with deck.gl.
Taking the UK accident example (3d-heatmap). How can I change the language used to display the POI in mapboxGL?
Where should I put the mapboxGL equivalent of:
map.setLayoutProperty('country-label-lg',…

AlainRo
- 1
- 2
-1
votes
1 answer
React-Leaflet: Marker has wrong position after zoom out
When I show a marker in the center of the map it is OK. But when I zoom out, the marker is like staying in the same place. Finally, its position is very wrong.
Why is it not moving together with the map when zooming out?
I user react-leaflet:

Audrey
- 401
- 2
- 7
- 15
-1
votes
1 answer
over labeling and zooming issue mapbox
I created custom mapbox using the dataset of building but it is having issue in some buildings
not proper rendering like lines in building
there is a labeling issue when the orientation is changed of the map
it should it only provide the labels of…

Haseeb Ullah
- 64
- 7
-1
votes
1 answer
MapBox Integration Issue With Heroku
I am trying to deploy a mern full stack app with mapbox on heroku where you can add pins with react-map-gl and it does not seem to display the map after login or registration and I get csp errors. I think if I solve those mapbox would show.
The…

Bqdor
- 19
- 5
-1
votes
1 answer
How to load Terrain source and add to Mapbox map w/ React?
This is using the https://github.com/visgl/react-map-gl fork.
Using vanilla JS, you use the 'load' callback to add a Source and then set the Terrain.
I was able to replicate this using React and useEffect, but the solution doesn't feel right. How…

EmoShawn
- 26
- 4
-1
votes
1 answer
Move to a Location Programatically in "react-map-gl" using latitude and longitude
Is there any way to programmatically move to a location in react-map-gl
I have tried many ways but nothing works
I'm using vite as my build tool

naveeng2402
- 67
- 1
- 5
-1
votes
2 answers
Only be able to edit mapbox-gl-draw shapes when clicked
I am trying to create a web application using mapbox-gl with react. My goal is to have users draw multiple shapes and be able to edit them when desired. However, using map boxes default, a user can edit/move any draw feature inside a Draw…

Berk Özkan
- 19
- 4
-1
votes
1 answer
how to get long/lat user location in react-map-gl (mapbox)
how can i get the user's longitude and latitude in react-map-gl (mapbox).
I am showing the user's location, but how do I find out his coordinates.
I am making a news map, and I need to automatically place a mark on the user's location.
Help,…

zubcov01
- 1