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. How do I move my map markers in realtime?
Forum Updated to NodeBB v4.3 + New Features

How do I move my map markers in realtime?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 399 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.
  • A Offline
    A Offline
    agunggumilang
    wrote on last edited by
    #1

    hi everyone,
    I work on qtlocation map and I want update my location in realtime. I already set my updateInterval: 1 (0.001 sec) but MapQuickItem still moves too late.
    is there a way about that how can i move my marker in realtime? any suggestion about it is very useful for me.
    thanks.

    this my qml:

    PositionSource {
        id: ps
        updateInterval: 1
        active: true
        onPositionChanged: {
            console.log(position.coordinate);
        }
    }
    
    Map {
        id: map
        anchors.fill: parent
    
        plugin: Plugin {
            name: "mapboxgl"
    
            PluginParameter {
                name: "mapboxgl.access_token"
                value: "my_token"
            }
    
            PluginParameter {
                name: "mapboxgl.mapping.additional_style_urls"
                value: "Urls"
            }
        }
    
        MapQuickItem {
            zoomLevel: map.zoomLevel
    
            sourceItem: Image {
                id: carMarker
                source: "../images/circle.png"
            }
    
            coordinate: ps.position.coordinate
            anchorPoint.x: carMarker.width / 2
            anchorPoint.y: carMarker.height / 2
        }
    }
    

    and this the result:
    https://drive.google.com/file/d/1lLMuyWX4WQYw-L4jdx-sq-xstkjVRyCl/view?usp=sharing

    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