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. Qt Quick - adding coordinate - Help
Forum Updated to NodeBB v4.3 + New Features

Qt Quick - adding coordinate - Help

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

    Guys wondering if anybody could tell me where I am going wrong with this one.

    Basically I have a button that when clicked I want to add the next coordinate for a polyline and then for it to show up on my map - however nothing seems to happen.

    Any ideas how to add the coordinate and update on map?

    Here is the code:

     MapPolyline {
    
            id: polyline
            line.width: 3
            line.color: 'pink'
            path: [
            { latitude: 53.336272, longitude: -2.837986000001 },
            { latitude: 53.33583666169488, longitude: -2.837948799133301 },
            { latitude: 53.33487728642166, longitude: -2.857099771499634 },
            { latitude: 53.334353, longitude: -2.855717999996 }
                  ]
            }
    

    and for the button:

     Button {
            id: button3
            x: 17
            y: 193
            width: 104
            height: 23
            text: qsTr("Test Alpha ")
            onClicked:{
                polyline.addCoordinate(53.33378174636405,-2.8531837463378906)
                update(polyline)
            }
    
    

    Cheers!

    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