Skip to content

[Bug]: MapView flickers and some Scratches line while zooming in and out on some devices #4272

Description

@Salmankhan033

Mapbox Version

11.15.0

React Native Version

0.81.5

Platform

Android

@rnmapbox/maps version

10.3.1

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

Observed Behavior

When continuously zooming in and out on the map, the map view flickers on some Android devices. The flickering occurs during the zoom animation and results in an unstable rendering experience.

Steps to Reproduce

  1. Open a screen containing a MapView.
  2. Interact with the map using pinch-to-zoom gestures.
  3. Zoom in and out repeatedly.
  4. Observe that the map flickers intermittently on some Android devices.
  5. I am facing on Android Note 10 device

Environment

  • Platform: Android
  • React Native: 0.79.0
  • @rnmapbox/maps: 10.3.0
  • Mapbox SDK: 11.16.2

The issue has not been observed on iOS.

Expected behavior

The map should render smoothly while zooming in and out without any flickering or visual artifacts, regardless of the Android device.

Notes / preliminary analysis

  • The issue appears to be Android-specific.
  • It occurs only on certain Android devices and is difficult to reproduce consistently across all hardware.
  • The problem seems related to the rendering pipeline during zoom animations.
  • I found a similar issue in the native Android Mapbox SDK:
    Map flickers on certain devices mapbox/mapbox-maps-android#2479

I am unsure whether this is caused by the React Native wrapper or inherited from the underlying Android SDK.

Additional links and references

Image

Video: https://drive.google.com/file/d/12KfnYgl4ppzbFsJC0yQAoLfE8ocM-Lw8/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions