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. MapQuickItem + MapboxGl ignores item stack ordering
Qt 6.11 is out! See what's new in the release blog

MapQuickItem + MapboxGl ignores item stack ordering

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

    I've noticed a strange behavior when using MapboxGL plugin with QML maps (Qt 5.15.2, Ubuntu). I slightly modified MinimalMap example in order to reproduce that:

    import QtQuick 2.0
    import QtQuick.Window 2.14
    import QtLocation 5.6
    import QtPositioning 5.6
    
    Window {
        width: 512
        height: 512
        visible: true
    
        Plugin {
            id: mapPlugin
            name: "osm" // "mapboxgl", "esri", "osm", ...
        }
    
        Map {
            anchors.fill: parent
            plugin: mapPlugin
            center: QtPositioning.coordinate(0, 0)
            zoomLevel: 14
    
            MapQuickItem {
                coordinate: QtPositioning.coordinate(0, 0)
                opacity: 1
    
                sourceItem: Rectangle {
                    width: 600
                    height: width
                    color: "blue"
                }
            }
    
            MapRectangle {
                color: "red"
                topLeft: QtPositioning.coordinate(0, 0)
                bottomRight: topLeft.atDistanceAndAzimuth(1000, 135)
            }
        }
    }
    

    Running this code with osm plugin is ok:
    Снимок экрана от 2026-05-12 17-16-02.png
    But when it comes to MapboxGL stack ordering is ignored:
    Снимок экрана от 2026-05-12 17-18-01.png
    Stack ordering is only broken when MapQuickItem stacks below MapRectangle. Is it a bug?

    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