Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved QML MapQuickItem Animation

    General and Desktop
    4
    6
    1810
    Loading More Posts
    • 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.
    • saitej
      saitej last edited by

      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 Reply Quote 0
      • ?
        A Former User last edited by

        Hi! Something like this:

        PositionSource {
            id: src
            // ...
        }
        
        MapQuickItem {
            id: myMarker
            coordinate: src.position.coordinate;
            // ...
        }
        
        saitej 1 Reply Last reply Reply Quote 0
        • saitej
          saitej @Guest last edited by

          @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 Reply Quote 0
          • L
            ldanzinger @saitej last edited by

            @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

            saitej 1 Reply Last reply Reply Quote 0
            • saitej
              saitej @ldanzinger last edited by

              @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 Reply Quote 0
              • V
                vladstelmahovsky @saitej last edited by

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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post