Summary/Description
We need to build out controls for the ColorByCategory functionality.
This will replace the colorByCategory styling block in our current JSON Blob control.
- Dimension selector.
- Category color mapping UI.
- Default/null category labels.
- Category enable/disable behavior.
"colorByCategory": {
"categoricalColors": [
{
"No Visible Damage": {
"fillColor": [52, 168, 83, 255],
"legend_entry_name": "No Visible Damage"
}
},
{
"Inaccessible": {
"fillColor": [66, 133, 244, 255],
"legend_entry_name": "Inaccessible"
}
},
{
"Affected": {
"fillColor": [178, 134, 207, 255],
"legend_entry_name": "Affected"
}
},
{
"Minor": {
"fillColor": [245, 166, 35, 255],
"legend_entry_name": "Minor"
}
},
{
"Major": {
"fillColor": [220, 53, 69, 255],
"legend_entry_name": "Major"
}
},
{
"Destroyed": {
"fillColor": [0, 0, 0, 255],
"legend_entry_name": "Destroyed"
}
},
{
"Other": {
"fillColor": [128, 128, 128, 255],
"legend_entry_name": "Other"
}
}
],
"defaultLegendName": ["Other"],
"dimension": "damage_summary"
},
dimension control: column selector
categoricalColors controls section:
Need some sort of addition control button that allows users to add category entries they want.
category name control - text entry
fillColor control: RGBA Selector or field entries (for R,G,B,A)
legendEntryName control: text entry
defaultLegendName control: text entry
Motivation/Context
The JSON blob has been useful as a fast prototyping surface, but it is now carrying too much product behavior: category coloring, metric coloring, point sizing, legends, text overlay, styling, defaults, maybe more. That makes it hard for users, hard to validate, and easy for MVT/non-MVT behavior to drift.
Acceptance
- ColorByCategory works as expected.
- Point/Line/Polygon/GeoJSON and MVT all receive the same category config.
- Update documentation properly (Wiki, etc...)
Wiki Page for GeoJSON Config:
https://github.com/raft-tech/GeoSet/wiki/GeoSet-Map-Layer#geojson-config
Summary/Description
We need to build out controls for the ColorByCategory functionality.
This will replace the colorByCategory styling block in our current JSON Blob control.
dimension control: column selector
categoricalColors controls section:
Need some sort of addition control button that allows users to add category entries they want.
category name control - text entry
fillColor control: RGBA Selector or field entries (for R,G,B,A)
legendEntryName control: text entry
defaultLegendName control: text entry
Motivation/Context
The JSON blob has been useful as a fast prototyping surface, but it is now carrying too much product behavior: category coloring, metric coloring, point sizing, legends, text overlay, styling, defaults, maybe more. That makes it hard for users, hard to validate, and easy for MVT/non-MVT behavior to drift.
Acceptance
Wiki Page for GeoJSON Config:
https://github.com/raft-tech/GeoSet/wiki/GeoSet-Map-Layer#geojson-config