Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mapbox GL plugin + ShaderEffect



  • Hi,

    I'm experiencing some quite weired issues when using mapboxgl plugin with ShaderEffect. The opacity is not applied on the layer.

    Here is the QML object I try to display on the map:

    import QtQuick 2.12
    import QtGraphicalEffects 1.0
    
    import QtLocation 5.15
    
    MapItemGroup {
    	MapItemView {
    		id: list
    		anchors.fill: parent
    		model: mySegmentModel
    
    		delegate: MapPolyline{
                           path: model.points
    	               line.width: 2
    	               line.color: model.color
    		}
    	}
    
    	ShaderEffectSource {
    		height: parent.height
    		width: parent.width
    		sourceItem: list
    		opacity: 0.3
    		hideSource: true
    	}
    }
    

    If I apply the opacity directly on the MapPolyline, it works well but as all polylines can cross each other, I got some bad effect. Furhermore with old mapbox plugin it was working correctly.


Log in to reply