flutter_compass icon indicating copy to clipboard operation
flutter_compass copied to clipboard

Compass heading for android is different than iOS

Open securexperts opened this issue 1 year ago • 1 comments

Hi

Any idea why my Heading for android is different than iOS. I need to correct it about 45degrees to be OK Here my Code I use:

setCameraPosition(Position puckPositionToSet) { double headingCorrection; if (Platform.isAndroid) { headingCorrection = 45.0; } else { headingCorrection = 0.0; }

mapboxMap.flyTo(
  CameraOptions(
    center: Point(coordinates: puckPositionToSet).toJson(),
    padding: defaultEdgeInsets,
    bearing: _compassRotationBearing!.heading!.toDouble()+headingCorrection,
  ),
  null,
);

}

Thanks for your comments

securexperts avatar Mar 28 '24 17:03 securexperts

https://github.com/hemanthrajv/flutter_compass/issues/31

robcleghorn avatar Jun 10 '24 08:06 robcleghorn