I would like to add my own SVG symbol instead of a dot. I tried the following.
layer = iface.activeLayer()
QgsProject.instance().addMapLayer(layer)
svgStyle = {}
svgStyle['fill'] = '#0000ff'
svgStyle['name'] = path
svgStyle['outline'] = '#000000'
svgStyle['outline-width'] = '6.8'
svgStyle['size'] = '6'
symbol = QgsSvgMarkerSymbolLayer.create(svgStyle)
layer.renderer().setSymbol(symbol)
Unfortunately the following error occurs:
TypeError: QgsSingleSymbolRenderer.setSymbol(): argument 1 has unexpected type 'QgsSvgMarkerSymbolLayer'