Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Map Not Updating in QML Despite Receiving GPS Data
Forum Updated to NodeBB v4.3 + New Features

Map Not Updating in QML Despite Receiving GPS Data

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 274 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.
  • S Offline
    S Offline
    Sakhana99
    wrote on last edited by
    #1

    Hi everyone,

    I'm working on deploying a Qt application to a custom ROM, which includes a Magic Lane map. The problem I'm facing is that while the application successfully receives and parses GPS data, and the QML code is also receiving this data, the map itself is not updating.

    Here’s part of my logs showing that the correct data is being received:

    09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: Latitude (decimal degrees): 36.8981
    09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: Longitude (decimal degrees): 10.1884
    09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: qml: longggg 10.1884
    09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: qml: latttttttt 36.8981
    
    

    Here is the QML code for the map component:

    PositionSource {
        id: positionSource
        active: true
        updateInterval: 1000
    
        name: "serialnmea"
        PluginParameter { name: "serialnmea.serial_port"; value: "/dev/ttyUSB1" }
    
        Component.onCompleted: {
            ServicesManager.dataSource.setPositionSource(positionSource);
            console.log("Position source is active:", positionSource.active);
            console.log("Position source is valid:", positionSource.valid);
        }
    
        onPositionChanged: {
            initialPosition.coordinates.longitude = connection.longitude
            initialPosition.coordinates.latitude = connection.latitude
            console.log("position long: ", initialPosition.coordinates.Longitude)
            console.log("position lat: ", initialPosition.coordinates.latitude)
        }
    
        property var updater: ServicesManager.contentUpdater(ContentItem.Type.RoadMap)
    }
    
    

    What works:

    The application successfully receives and parses the GPS data.
    The QML part logs the correct latitude and longitude data.
    What doesn’t work:

    The map is not updating with the new position data, even though the correct coordinates are being logged.
    Any suggestions or ideas on what might be causing the map not to update, despite the data being received? Am I missing something in how I'm setting the position on the map?

    Thank you in advance for your help!

    M 1 Reply Last reply
    0
    • S Sakhana99

      Hi everyone,

      I'm working on deploying a Qt application to a custom ROM, which includes a Magic Lane map. The problem I'm facing is that while the application successfully receives and parses GPS data, and the QML code is also receiving this data, the map itself is not updating.

      Here’s part of my logs showing that the correct data is being received:

      09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: Latitude (decimal degrees): 36.8981
      09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: Longitude (decimal degrees): 10.1884
      09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: qml: longggg 10.1884
      09-18 13:27:40.058  5569  5605 D libPixii_App_1_arm64-v8a.so: qml: latttttttt 36.8981
      
      

      Here is the QML code for the map component:

      PositionSource {
          id: positionSource
          active: true
          updateInterval: 1000
      
          name: "serialnmea"
          PluginParameter { name: "serialnmea.serial_port"; value: "/dev/ttyUSB1" }
      
          Component.onCompleted: {
              ServicesManager.dataSource.setPositionSource(positionSource);
              console.log("Position source is active:", positionSource.active);
              console.log("Position source is valid:", positionSource.valid);
          }
      
          onPositionChanged: {
              initialPosition.coordinates.longitude = connection.longitude
              initialPosition.coordinates.latitude = connection.latitude
              console.log("position long: ", initialPosition.coordinates.Longitude)
              console.log("position lat: ", initialPosition.coordinates.latitude)
          }
      
          property var updater: ServicesManager.contentUpdater(ContentItem.Type.RoadMap)
      }
      
      

      What works:

      The application successfully receives and parses the GPS data.
      The QML part logs the correct latitude and longitude data.
      What doesn’t work:

      The map is not updating with the new position data, even though the correct coordinates are being logged.
      Any suggestions or ideas on what might be causing the map not to update, despite the data being received? Am I missing something in how I'm setting the position on the map?

      Thank you in advance for your help!

      M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      @Sakhana99 I guess you should ask the maker of that 3rd party product about that

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sakhana99
        wrote on last edited by
        #3

        i made it myself

        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