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. QML MapView
Forum Updated to NodeBB v4.3 + New Features

QML MapView

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

    Re: QML MapView
    Hello, I'm exploring use of MapView{} and it's almost working how I'd like it to.If I have MapQuickItem nested in our MapView {}, not the map{} then the map renders and it says that the marker is at the latitude and longitude we want from our console.log but nothing is rendered on the screen at this position

    Plugin {
        id: mapPlugin
        name: "maplibre"
        // specify plugin parameters if necessary
        PluginParameter {
            name: "maplibre.map.styles"
            //value: "https://demotiles.maplibre.org/style.json"
            // value: "http://localhost:8080/styles/savvy.integrated.local/512/{z}/{x}/{y}.png"
            value: "http://192.168.1.58:8080/styles/savvy.integrated.local/style.json"
        }
    }
    MapView {
        id: mapView
        anchors.fill: parent
        anchors.topMargin: 0
        anchors.leftMargin: 0
        map.plugin: mapPlugin
        map.center: QtPositioning.coordinate(26.451,-80.549)
        map.zoomLevel: 10
        MapQuickItem {
            parent: mapView.map
            sourceItem: Image {
                source: "qrc:/Image/Map/marker.png"
                smooth: true
            }
        }
    }
    
    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