1

I hope this is the right place to ask. I'm developing a react-native-mapbox-gl/maps app on Windows 10, and the MarkerView component just isn't showing up. Here's the App.js code for reference:

import React, { Component } from 'react';
import {
  StyleSheet,
} from 'react-native';

import MapboxGL from '@react-native-mapbox-gl/maps';
MapboxGL.setAccessToken('MY_TOKEN')

export default function App() {

  return (
    <MapboxGL.MapView
      style={{ flex: 1, width: '100%' }}
      styleURL={MapboxGL.StyleURL.Street}
      showUserLocation={true}>
    </MapboxGL.MapView>
  );
};

The MapView component and other MapboxGL components are working properly, yet whenever I try to invoke the MapboxGL.MarkerView component (be it inside of Mapview or in any other place in the App), the program does not recognize it. Going to the @react-native-mapbox-gl/maps module yields no results either, as the MarkerView class is missing. Has it been deprecated and the GitHub docs not updated? Is there a replacement?

Thanks in advance.

Notes: RN Version: 0.62.2; react-native-mapbox-gl/maps version: 8.1.0 (master).

The Mapbox Token has been properly installed and used; There are no installation issues either on the client or server sides of the app.

Mati L
  • 55
  • 4

1 Answers1

1

you can use MapboxGL.PointAnnotation component instead

Or you can user 8.0.0 version

Zeeshan Ansari
  • 9,657
  • 3
  • 26
  • 27
  • Could you take a look at this? https://stackoverflow.com/questions/63411891/mapbox-error-in-android-index-2-size1 –  Aug 18 '20 at 09:10