mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
284 stars 117 forks source link

Compass is trimmed!? #100

Open gtsl-2 opened 1 year ago

gtsl-2 commented 1 year ago

Maybe it's just me, but the compass is sometimes trimmed. I would like to display compass....

gtsl-2 commented 1 year ago

If scaleBar.updateSettings is removed, the compass will not be displayed. But I don't know why.

await mapboxMap?.compass.updateSettings(
    CompassSettings(
      clickable: false,
      marginTop: 110,
      marginRight: 30,
      visibility: true,
    ),
  );
  await mapboxMap?.scaleBar.updateSettings(
    ScaleBarSettings(
      marginTop: -60, // <-- go to heaven  
      // enabled: false, <-- the compass also disappears, so remove code 
    ),
  );
Ashotjlavyan commented 1 year ago

You should add compass settings like this to make it always visible.

    await mapboxMap?.compass.updateSettings(CompassSettings(
        position: OrnamentPosition.TOP_RIGHT,
        fadeWhenFacingNorth: false,
        enabled: true,
        clickable: false,
        visibility: true,
        marginTop: 20,
        marginRight: 20));