Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Ornament position differs on Android and iOS #3380

Open
AndreasWintherMoen opened this issue Feb 16, 2024 · 0 comments
Open

[Bug]: Ornament position differs on Android and iOS #3380

AndreasWintherMoen opened this issue Feb 16, 2024 · 0 comments
Labels
bug 🪲 Something isn't working

Comments

@AndreasWintherMoen
Copy link

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

iOS, Android

@rnmapbox/maps version

10.1.6

Standalone component to reproduce

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

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}} compassPosition={{ top: 0, right: 20 }}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

On Android, the position of ornaments (e.g. compass or scale bar) doesn't respect safe area, but on iOS it does. So if I set the top position to 0, the Android build will overlay the device's top bar (with clock, wifi icons, etc), while being below on iOS. So what I have to do is set top position to 0 if iOS and use something like react-native-safe-area-context to retrieve safe area values if Android.

Please note, I have only tested this on one physical iOS and Android phone, but I seem to get the same issue on iOS/Android simulators as well.

Expected behavior

Behaviour on iOS and Android should match.

Notes / preliminary analysis

No response

Additional links and references

No response

@AndreasWintherMoen AndreasWintherMoen added the bug 🪲 Something isn't working label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant