Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML MapQuickItem Animation
Forum Updated to NodeBB v4.3 + New Features

QML MapQuickItem Animation

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 2.5k Views 1 Watching
  • 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.
  • saitejS Offline
    saitejS Offline
    saitej
    wrote on last edited by
    #1

    Hi

    My appn receives real time gps data and I need to animate the MapQuickItem with the location. What is the best way to do so?

    L V 2 Replies Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! Something like this:

      PositionSource {
          id: src
          // ...
      }
      
      MapQuickItem {
          id: myMarker
          coordinate: src.position.coordinate;
          // ...
      }
      
      saitejS 1 Reply Last reply
      0
      • ? A Former User

        Hi! Something like this:

        PositionSource {
            id: src
            // ...
        }
        
        MapQuickItem {
            id: myMarker
            coordinate: src.position.coordinate;
            // ...
        }
        
        saitejS Offline
        saitejS Offline
        saitej
        wrote on last edited by
        #3

        @Wieland

        Hi ...
        Thanks for the reply. I had tried that but I am not able to set the coordinate of the source as it is saying it is read only.

        I was trying to use an array of latitudes and longitudes for dev sake.

        This is how I have done.
        Mapquickitem

        MapQuickItem {
        property var rlat : [23.192993,23.212900,23.212358,23.211176,23.209993,
                23.208810,23.207627,23.206444,23.205261,23.204079,23.202896,
                23.201713, 23.200530,23.199347,23.198165,23.196982,23.195799,23.194616,23.193433,23.192250]
            property var rlon : [75.788412,75.783390,75.783406, 75.783441, 75.783476, 75.783511, 75.783545, 75.783580,
                75.783615, 75.783650, 75.783685, 75.783719, 75.783754, 75.783789, 75.783824,  75.783859
                , 75.783894, 75.783928, 75.783963,75.783998 ]
            property int temp: 0
        
        coordinate: src.position.coordinate
        
        
        PositionSource{
                id:src
            }
        
        Timer{
                id: timer
                interval: 5000
                //        running: true
                onTriggered: {
        
                    if(temp == rlat.length -1)
                        timer.stop()
                    else
                    {
                        src.position.coordinate = QtPositioning.coordinate(rlat[temp],rlon[temp])
                        src.update()
                    }
                    temp++
        
        
                }
            }
        Component.onCompleted: {
                timer.start()
            }
        }
        
        1 Reply Last reply
        0
        • saitejS saitej

          Hi

          My appn receives real time gps data and I need to animate the MapQuickItem with the location. What is the best way to do so?

          L Offline
          L Offline
          ldanzinger
          wrote on last edited by
          #4

          @saitej if you are interested in using the ArcGIS Runtime SDK, that should be pretty easy with the LocationDisplay. It hooks into a map view, and directly takes in a PositionSource, and displays that on the screen - https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation

          You could then log your GPS tracks by keeping an array of coordinates, and adding graphics to the map - https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/GOSymbols.qml

          saitejS 1 Reply Last reply
          0
          • L ldanzinger

            @saitej if you are interested in using the ArcGIS Runtime SDK, that should be pretty easy with the LocationDisplay. It hooks into a map view, and directly takes in a PositionSource, and displays that on the screen - https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation

            You could then log your GPS tracks by keeping an array of coordinates, and adding graphics to the map - https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/GOSymbols.qml

            saitejS Offline
            saitejS Offline
            saitej
            wrote on last edited by
            #5

            @ldanzinger

            I tried the ArcGIS Runtime SDK in windows but I am getting import errors like:

            module "Esri.ArcGISRuntime" is not installed
            module "Esri.ArcGISExtras" is not installed

            I have installed the ARCGIS SDK with QtCreator and I have given the path also correctly. ARCGIS Runtime QML appears in the project templates also!!

            1 Reply Last reply
            0
            • saitejS saitej

              Hi

              My appn receives real time gps data and I need to animate the MapQuickItem with the location. What is the best way to do so?

              V Offline
              V Offline
              vladstelmahovsky
              wrote on last edited by
              #6

              @saitej have you checked this? http://doc.qt.io/qt-5/qml-qtpositioning-coordinateanimation.html

              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