Add default outlines if not set; Put outlines on top of symbol layers
This commit is contained in:
parent
530c3a6823
commit
e8d04ada05
1 changed files with 20 additions and 6 deletions
|
@ -4,12 +4,13 @@ import arcpy # type: ignore
|
|||
|
||||
DEFAULT_LINE_WIDTH = 0.7
|
||||
DEFAULT_COLOR = [
|
||||
59.61,
|
||||
50.98,
|
||||
50.59,
|
||||
19.61,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
57,
|
||||
100,
|
||||
]
|
||||
CODE_BLK = "BLK"
|
||||
|
||||
|
||||
class Toolbox:
|
||||
|
@ -432,7 +433,14 @@ class FeatureRenderer:
|
|||
if leg_id in outline_codes:
|
||||
# Set user defined outline color
|
||||
outline_code = outline_codes[leg_id]
|
||||
|
||||
if (
|
||||
not outline_code
|
||||
) or outline_code == "#":
|
||||
outline_code = CODE_BLK
|
||||
|
||||
color_value = get_symbol_color(outline_code)
|
||||
|
||||
color = (
|
||||
arcpy.cim.CreateCIMObjectFromClassName(
|
||||
"CIMCMYKColor", "V3"
|
||||
|
@ -477,6 +485,10 @@ class FeatureRenderer:
|
|||
if leg_id in outline_codes:
|
||||
# Set user defined outline color
|
||||
outline_code = outline_codes[leg_id]
|
||||
|
||||
if (not outline_code) or outline_code == "#":
|
||||
outline_code = CODE_BLK
|
||||
|
||||
color_value = get_symbol_color(outline_code)
|
||||
color = arcpy.cim.CreateCIMObjectFromClassName(
|
||||
"CIMCMYKColor", "V3"
|
||||
|
@ -572,8 +584,10 @@ class FeatureRenderer:
|
|||
stroke_symbol.width = stroke_symbol_props[
|
||||
leg_id
|
||||
]["width"]
|
||||
unique_value_class.symbol.symbol.symbolLayers.append(
|
||||
stroke_symbol
|
||||
|
||||
# Insert at the beginning such that it appears on top of solid fill layer
|
||||
unique_value_class.symbol.symbol.symbolLayers.insert(
|
||||
0, stroke_symbol
|
||||
)
|
||||
|
||||
# Regroup items
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue