Last active
October 18, 2019 16:13
-
-
Save RalucaNicola/ce62c54433403636ce4a269e32f6cf3b to your computer and use it in GitHub Desktop.
unique value renderer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renderer = new UniqueValueRenderer({ | |
valueExpression: "$feature.pred_party", | |
defaultSymbol: createSymbol("lightgray"), | |
uniqueValueInfos: partyCodes.map(party => { | |
return { | |
value: party.field, | |
symbol: createSymbol(party.color) | |
} | |
}) | |
}); | |
function createSymbol(color: string) { | |
return new SimpleMarkerSymbol({ | |
color: color, | |
outline: { | |
width: 0 | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment