Esempio n. 1
0
def SetDefaultPlatformStyle(layer, platform="DEFAULT"):
    """ Platform Symbol """
    style = S.getPlatform(platform)

    svgStyle = {}
    svgStyle["name"] = style["NAME"]
    svgStyle["outline"] = style["OUTLINE"]
    svgStyle["outline-width"] = style["OUTLINE_WIDTH"]
    svgStyle["size"] = style["SIZE"]

    symbol_layer = QgsSvgMarkerSymbolLayer.create(svgStyle)
    layer.renderer().symbol().changeSymbolLayer(0, symbol_layer)
Esempio n. 2
0
def SetDefaultPlatformStyle(layer, platform='DEFAULT'):
    ''' Platform Symbol '''
    style = S.getPlatform(platform)

    svgStyle = {}
    svgStyle['name'] = style["NAME"]
    svgStyle['outline'] = style["OUTLINE"]
    svgStyle['outline-width'] = style["OUTLINE_WIDTH"]
    svgStyle['size'] = style["SIZE"]

    symbol_layer = QgsSvgMarkerSymbolLayer.create(svgStyle)
    layer.renderer().symbol().changeSymbolLayer(0, symbol_layer)