rnmapbox / rnmapbox/maps

[Bug]:The background is black instead of transparent

Open
#3,961 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🪲 feature reproduced
Dominant language
Kotlin
Stars
2.9k
Forks
947
Avg merge
6d 37m
Merged PRs (30d)
1

Description

Mapbox Implementation

Mapbox

Mapbox Version

10.1.38

React Native Version

0.76.9

Platform

iOS, Android

@rnmapbox/maps version

10.1.38

Standalone component to reproduce
import React, {
  memo, useCallback, useEffect, useMemo, useState,
} from 'react';
import MapboxGL from '@rnmapbox/maps';


const MemoizedMapView = memo(MapboxGL.MapView);

 const transparentStyle = {
    version: 8,
    name: 'Transparent Base',
    sources: {},
    layers: [
      {
        id: 'background',
        type: 'background',
        paint: {
          'background-color': 'rgba(0,0,0,0)',
          'background-opacity': 1,
        },
      },
    ],
  };

<MemoizedMapView
          styleJSON={JSON.stringify(transparentStyle)}
  />
Observed behavior and steps to reproduce

The background is black instead of transparent

Expected behavior

The background is black instead of transparent

Notes / preliminary analysis

No response

Additional links and references

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the standalone React Native MapView reproduction using styleJSON and verify the behavior on both iOS and Android. Compare the observed black background with the stated transparent background and confirm the expected result before investigating the relevant MapView implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.