Created
May 11, 2022 17:19
-
-
Save jdbcode/0c15bbf1fb806ade23dcdf00df316cd2 to your computer and use it in GitHub Desktop.
[Medium] FeatureView styling
This file contains hidden or 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
var styleRules = { | |
pointSize: 15, | |
pointFillColor: { | |
property: 'fuel1', | |
categories: [ | |
['Coal', '#CD3290'], | |
['Gas', '#3290CD'], | |
['Nuclear', '#90CD32'], | |
] | |
}, | |
pointFillOpacity: { | |
property: 'capacitymw', | |
palette: [0.3, 1], | |
min: 0, | |
max: 2000 | |
}, | |
rules: [ | |
{ | |
filter: ee.Filter.expression( | |
'fuel1 == "Coal" || fuel1 == "Gas" || fuel1 == "Nuclear"').not(), | |
isVisible: false, | |
} | |
] | |
}; | |
var layer = ui.Map.FeatureViewLayer('WRI/GPPD/power_plants_FeatureView'); | |
layer.setVisParams(styleRules); | |
layer.setName('Power plants'); | |
Map.add(layer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment