Skip to content

Commit

Permalink
Outline: simple line crashes Leaflet export
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchadwin committed May 7, 2015
1 parent 05a8838 commit 60ccc72
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions leafletWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,16 +481,17 @@ def writeLeaflet(outputProjectFileName, width, height, full, layer_list, visible
new_obj += buildNonPointJSON("", safeLayerName)
new_obj += restackLayers(layerName, visible[count])
elif i.geometryType() == 2:
if symbol.symbolLayer(0).layerType() == 'SimpleLine':
borderStyle_str = ""
if symbol.symbolLayer(0).layerType() == 'SimpleLine' or isinstance(symbol.symbolLayer(0), QgsSimpleLineSymbolLayerV2):
colorName = 'none'
borderColor_str = str(symbol.color().name())
radius_str = str(symbol.symbolLayer(0).width() * 5)
else:
borderColor_str = str(symbol.symbolLayer(0).borderColor().name())
borderStyle_str = getLineStyle(symbol.symbolLayer(0).borderStyle())
radius_str = str(symbol.symbolLayer(0).borderWidth() * 5)
if symbol.symbolLayer(0).brushStyle() == 0:
borderStyle_str = "0"
if symbol.symbolLayer(0).brushStyle() == 0:
borderStyle_str = "0"
polyStyle_str = """
return {
color: '"""+borderColor_str+"""',
Expand Down

0 comments on commit 60ccc72

Please sign in to comment.