rnmapbox / rnmapbox/maps

[Bug]: Android Compass never renders when `compassEnabled` & `compassFadeWhenNorth` initially set

Open
#2,875 7 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

Android

@rnmapbox/maps version

#main (10.0.7-rc.0)

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

const styles = {
  mapView: { flex: 1 },
};

const BugReportExample = () => {
  return (
    <>
      <MapView style={styles.mapView} compassEnabled compassFadeWhenNorth>
        <Camera
          defaultSettings={{
            centerCoordinate: [-74.00597, 40.71427],
            zoomLevel: 14,
          }}
        />
      </MapView>
    </>
  );
};

export default BugReportExample;

Observed behavior and steps to reproduce

When compassEnabled and compassFadeWhenNorth are initially enabled, the compass is not rendered when rotating the map. It seems to be different, when the prop is enabled after initial rendering, see Ornaments example for comparison.

Expected behavior

The compass should appear, when rotating the map.

Notes / preliminary analysis

Maybe related to #2543.

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 by reproducing the issue with the standalone MapView and Camera example, then inspect the Android compass implementation and the Ornaments example for comparison. Review the discussion in #2543 and verify that the compass appears when the map is rotated with both props enabled initially.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.