flutter_compass
flutter_compass copied to clipboard
Compass heading for android is different than iOS
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
https://github.com/hemanthrajv/flutter_compass/issues/31