Skip to content

[Bug]: Custom Mapbox Style Not Loading - Shows Black Screen (Classic Templates Work Fine) #3882

@A-dith-ya

Description

@A-dith-ya

Mapbox Implementation

Mapbox

Mapbox Version

10.1.39

React Native Version

0.79.3

Platform

iOS, Android

@rnmapbox/maps version

0.79.3

Standalone component to reproduce

import React, { useEffect } from "react";
import { View, StyleSheet } from "react-native";
import Mapbox from "@rnmapbox/maps";

Mapbox.setAccessToken("pk.ey...");

export default function Index() {
  return (
    <View style={styles.container}>
      <Mapbox.MapView
        style={styles.map}
        styleURL="mapbox://styles/your-username/your-style-id"
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  map: {
    flex: 1,
  },
});

Observed behavior and steps to reproduce

Custom Mapbox styles created in Mapbox Studio display as a black map in React Native app, while classic/default Mapbox styles load and render correctly.

Expected behavior

Custom Mapbox styles should load and render the same way classic styles do.

Notes / preliminary analysis

No response

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions