With the code below I can add a marker to the symbology of a line type layer. But by default, this marker is a circle.
layerName = 'rede_bombas'
vLayer = QgsProject.instance().mapLayersByName(layerName)[0]
ggsl = QgsGeometryGeneratorSymbolLayer.create({})
ggsl.setSymbolType(QgsSymbol.Marker)
ggsl.setGeometryExpression("centroid($geometry)")
ggsl.setColor(QColor('Blue'))
symbol = vLayer.renderer().symbols(QgsRenderContext())[0]
symbol.insertSymbolLayer(1, ggsl)
vLayer.triggerRepaint()
How do I change the marker shape to ArrowHead?
Is it possible to adjust the marker rotation according to the line rotation?