rnmapbox / rnmapbox/maps

[Bug]: Raster layers glitch out randomly on map zoom, pan or even map idle

Open
#3,748 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Mapbox Implementation

Mapbox

Mapbox Version

11.9.0

React Native Version

0.76.5

Platform

Android

@rnmapbox/maps version

10.1.33

Standalone component to reproduce
import React from 'react';
import {
  MapView,
  Camera,
  MapboxGL,
} from '@rnmapbox/maps';

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{ flex: 1 }}>
        <MapboxGL.RasterSource
          id="wms-source"
          tileUrlTemplates={[
            'https://spatial-gis.information.qld.gov.au/arcgis/rest/services/GeoscientificInformation/GeologyDetailed/MapServer/export?bbox={bbox-epsg-3857}&bboxSR=EPSG%3A3857&layers=15&size=256,256&format=png&transparent=true&f=image',
          ]}
          tileSize={256}
        >
          <MapboxGL.RasterLayer
            id="wms-layer"
            sourceID="wms-source"
            style={{
              rasterOpacity: 0.5,
            }}
          />
        </MapboxGL.RasterSource>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
      </MapView>
    );
  }
}

export default BugReportExample;
Observed behavior and steps to reproduce
  • When I add a raster layer to my map, the layer loads but the layer behaves weirdly, randomly loads and then the tiles disappear and appear again randomly, and the tiles loading is also random. Take a look at the attached video.
  • The issue happens when the map is idle (not interacted with), zoomed in or being panned.

https://github.com/user-attachments/assets/8e89f016-6dcd-4685-a072-39d35867ccf4

Expected behavior
  • The layer should load gradually like the other layers, and once loaded, the tiles shouldn't just randomly disappear.
Notes / preliminary analysis
  • I am loading geology layers for all states of Australia. The rest of the states load fine, only the Queensland causes issue. The same layer loads fine on web too. Here are the rest of the tile urls for reference:
  • South Australia
  • New South Wales
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

The issue includes a standalone React Native example using MapboxGL.RasterSource and RasterLayer; start by running it on Android with the Queensland URL and observe loading while idle, zooming, and panning. Compare it with the other supplied raster URLs; done means Queensland raster tiles load gradually and remain visible without randomly disappearing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
computer-graphics, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.