I am trying to animate the bearing property change on a Qml map:
Map {
id: map
Behavior on bearing {
enabled: true
RotationAnimation {
direction: RotationAnimation.Shortest
duration: 500
easing.type: Easing.Linear
}
}
Button {
onClicked: map.bearing = 100 // animation works. Map rotation is animated
}
Button {
onClicked: map.setBearing(100, Qt.point(10,10)) // animation does not work. Map rotates immediately to the bearing
}
}
When the bearing is set directly using map.bearing
then the animation works. But when using the helper method map.setBearing
then the animation is not working. Is there a way to get the animation together with the map.setBearing
method?
Regards,