Map Not Updating in QML Despite Receiving GPS Data
-
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!