QML Map 5.9 - How to animate map bearing



  • I would like to know if it is possible to animate a map's bearing. I have the map in a driver's up orientation, meaning the map is always displayed with a rotation that lets the driver's icon on the map always be pointed up. I do this by setting the Map's bearing property whenever I get get a new position for the driver(which also contains the heading or bearing of the driver). This works great, but the only issue is that I would like to animate the rotation of the map. As it is now, the rotation is instantaneous and leaves one a little nauseous when watching the map. When I try out Google Maps on my phone the map rotations are very smooth and aesthetic . I would like this kind of behavior in my QML map

    I have tried something this on as part of the Map object:
    Behavior on bearing {NumberAnimation {easing.type:Easing.InOutQuad; duration:1000}}

    But it had no effect. Any suggestions much appreciated
    -David.



  • @DBoosalis

    This was pretty easy to do. All I did was add a couple of Rotation animators, one for the vehicle and one for the map itself


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.