Skip to content

[Bug]: Ornaments do not appear correctly on Android #2403

@naftalibeder

Description

@naftalibeder

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

Android

@rnmapbox/maps version

#main

Standalone component to reproduce

N/A

Observed behavior and steps to reproduce

See the ornaments example.

Expected behavior

Ornaments should be sized correctly and respond to changes in position.

Notes / preliminary analysis

Ornaments do not appear correctly on Android. See #2352 (comment):

The weird scale bar issue on Android is tied to a map view dimensions race condition. When the scale bar width is calculated on native I don't believe it has the final map view width and I didn't have enough time to look into how we could pass down the final value after the map is laid out.

Test case: Rotate the app so the map layout is recalculated for landscape mode and notice the scale bar looks correct, then rotate back.

Additional links and references

android-compass.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions