Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Map 5.9 - How to animate map bearing

QML Map 5.9 - How to animate map bearing

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DBoosalis
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • D DBoosalis

      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.

      D Offline
      D Offline
      DBoosalis
      wrote on last edited by
      #2

      @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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kyeiv
        wrote on last edited by
        #3

        maybe would you provide some code samples? i am trying to do something similar..

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved