For questions regarding the use of the mapbox library within react native applications
Questions tagged [react-native-mapbox-gl]
72 questions
10
votes
1 answer
How to draw a navigation line on a mapbox map in react-native?
I am trying to get navigation directions using mapbox-sdk for react-native from npm package:
"@mapbox/mapbox-sdk": "^0.11.0"
And for rendering the directions returned by mapbox-sdk I am using the below npm package:
"@react-native-mapbox-gl/maps":…

0x01Brain
- 798
- 2
- 12
- 28
7
votes
3 answers
How to add markers / annotations programatically with mapbox and react native
I'm new to react native and cannot find any documentation on how to add markers / annotations programatically to the map using mapbox.
We are using geofire query, which triggers when a point of interest is withing range.
Inside the trigger I want to…

Ricardo Chen He
- 326
- 4
- 12
5
votes
3 answers
How to show/hide raster layer (visibility property visible/none) at run time in react-native-mapbox-gl
I have set custom style url in map initialization. Like :
{ this.oMap = e }}
animate={true}
zoomLevel={6}
…

Khurshid Ansari
- 4,638
- 2
- 33
- 52
4
votes
0 answers
Custom icon markers sometimes are not working from MapBox-GL in React-Native
I'm trying to edit the map markers to look like the image below:
And here is my code to create markers:
const MapBoxComponent = () => {
const [markers] = useState([
{
title: 'hello',
coordinates:…

Thang
- 409
- 1
- 6
- 17
4
votes
0 answers
MapboxGL React Native UserLocation Indicator do not display on map
The UserIndicator from , work and display fine on IOS, but with android, it's depends, it sometime work, sometime not, and i realize also, that my CameraRef.current.setCamera() is undefined when the UserIndicator doesn't…

Sébastien Susini
- 53
- 6
4
votes
2 answers
React Native mapbox | react-native-mapbox-gl |How to change PointAnnotation Image and Callout is not touchable in Android?
I am trying to change the default Mapbox pin icon on Android as in iOS I'm getting the expected result.
Issue
Not able to change PointAnnotation Icon(Using PNG format)
Callout image is also not loading(Using PNG format)
Not able to click on…

Atul Raj
- 234
- 5
- 13
4
votes
0 answers
Offline map in React Native Mapbox GL
How to properly manage rendering map when device is offline?
Official documentation (https://github.com/mapbox/react-native-mapbox-gl/blob/master/API.md#offline) helped to get packs saved and being able to remove them, but trying to load component…

Mastikosa
- 51
- 2
- 5
4
votes
0 answers
How does one set the initial pitch using Mapbox gl?
I am using https://github.com/mapbox/react-native-mapbox-gl/blob/master/API.md#custom-styles to integrate mapbox into my my react-native app and I am having trouble changing the "pitch" to be other than the default 0.
Here's what I have:
class…

Colin Sygiel
- 917
- 6
- 18
- 29
3
votes
0 answers
React Native MapboxGL - How to display offline pack on mapview?
I'm working on a project that allows users to use the map offline.
Here's my code to download the offline pack.
const downloadRoute = async () => {
try{
await MapboxGL.offlineManager.createPack({
name:…

KWK_Niko
- 31
- 1
3
votes
0 answers
showsUserHeadingIndicator not changing direction on android
I'm using react-native MapboxGL.
using this prop to show the directional arrow.
on iOS it works fine. but in android, the arrow doesn't move when I change the phone orientation.

Salih Zinaty
- 41
- 2
3
votes
3 answers
How to get the user location in react-native-mapbox-gl?
i'm using react-native-mapbox-gl to show the map in my react app, on page load it should show the location of the user like how the google maps shows, but it fails to show instead it will show some other region of the map,
Can someone help?
Thanks…

Deekshith MR
- 73
- 3
- 10
3
votes
1 answer
How to get the leaves from a cluster using react native mapbox?
Currently I'm working on a project that requires me to use react-native. The problem that I'm facing seems simple considering how this is handled in the Mapbox Android SDK. The situation is the following:
I'm showing a full screen map with some…

MikeSli
- 927
- 2
- 14
- 32
3
votes
3 answers
Compass location on react-native Mapbox map
Is it possible to change the location of the compass in React-Native Mapbox GL? It currently defaults to the top-right and I have been trying to find how to move it to the top-left.
this.map =…

jengin
- 31
- 1
- 3
3
votes
1 answer
How to work with mapbox marker clustors in react native?
I am working with react-native-mapbox-gl. I have an array of locations which I am looping through to draw markers on the map. But there are some locations which are very closer to each other and are nearly not visible. I want to cluster all the…

Banti Ram
- 99
- 11
2
votes
0 answers
SyntaxError with file in node_module Unexpected token, expected "," (4:7) when integrate rnmapbox/maps
I have integration rnmapbox/maps#main via repo github in iOS and have some error from node_module.
I have create issues in github too via that link but if anyone face that issues before. Please feel free to help here.
Thanks
Image showing error when…

Minh Vo
- 120
- 6