MapCircle not rendering in QML when using Mapbox

368 views Asked by At

I have an issue with trying to display QML MapCircle on a Window when I use the Mapboxgl plugin.

I have a model which is populated from C++ and is shown on the map when the user clicks a button. Here is a snippet:

MapItemView{
    model:disksModel
    delegate:MapCircle{
        border.color: "red"
        border.width: 1
        center: QtPositioning.coordinate(model.latitude, model.longitude)
        radius: 53
    }
}

When I use osm or esri as my plugin,

plugin:Plugin{
 name:"esri"
 }

I get the following which is what I expect: enter image description here but using mapbox, the circles aren't displayed. enter image description here

plugin:Plugin{
    name:"mapboxgl"
    PluginParameter {
        name: "mapboxgl.mapping.use_fbo"
        value: true
    }

    PluginParameter {
        name: "mapboxgl.mapping.items.insert_before"
        value: "aerialway"
    }
 }

However, if I change my model to use something like a MapQuickItem and then use something like a Marker,

MapItemView{
    model:disksModel
    delegate:MapQuickItem{
         sourceItem: Image{
            id:waypointMarker
            opacity: .75
            sourceSize.width:80
            sourceSize.height:80
            source: "../images/marker.png"
        }
        coordinate: QtPositioning.coordinate(model.latitude, model.longitude)
        anchorPoint.x: waypointMarker.width/2
        anchorPoint.y: waypointMarker.height/2
    }
}

The coordinates of interest are then marked on the screen enter image description here. Does anyone know a workaround or fix for this?

0

There are 0 answers