google-mapsflutterdartgoogle-maps-markersmap-directions

Flutter Google Maps - Rotate marker according to the driving direction


Can anyone share a documentation / code sample for Flutter google maps plugin where I can rotate the marker ( ex: a car icon ) according to the driving direction. I saw this can be achieved on native library by rotating the marker. But couldn't fjnd any option to rotate the marker in Flutter.

I guess we need to consider below points while rotating the marker. Please add your thoughts on this as well.

Map North Direction. Devices rotation from compass.

Thanks


Solution

  • https://pub.dev/packages/location plugin :

    Marker( rotation: currentLocation.heading )