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 to add Postion to Map
Forum Updated to NodeBB v4.3 + New Features

How to add Postion to Map

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 593 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    Dev1337
    wrote on last edited by Dev1337
    #1

    Hi together,

    can someone tell me how i can add dynamically postitions to the map?

    I know how to add a fixed position.

    MapQuickItem {
    coordinate: QtPositioning.coordinate(50, 50)

            anchorPoint.x: image.width * 0.5
            anchorPoint.y: image.height
    
            sourceItem: Column {
                Image {
                    id: image
                    source: "point.png"
                    width: 50 / 2
                    height: 86 / 2
                }
    
                Text {
                    text: "Test Position"
                    font.bold: true
                }
            }
        }
    

    But i need to add the positions dynamically frome the database where i get a Json model with the coordinates.
    I allready tried it with a ListElement but it dident worked.

    Somebody can help me maybe?

    1 Reply Last reply
    0
    • CharbyC Offline
      CharbyC Offline
      Charby
      wrote on last edited by
      #2

      Here is a complete workshop explaining how to handle the Map item with QtQuick - in addition the demo project in github shows several ways of adding POI (static, listmodel, xmlmodels) :
      https://forum.qt.io/topic/63838/qt-qml-workshop-materials/2

      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