Skip to content

Commit c7a14f4

Browse files
committed
WIP redo symbology schema
1 parent 22f1562 commit c7a14f4

File tree

1 file changed

+67
-32
lines changed

1 file changed

+67
-32
lines changed

packages/schema/src/schema/project/layers/vectorLayer.json

Lines changed: 67 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,76 @@
2323
},
2424
"symbologyState": {
2525
"type": "object",
26-
"description": "The state of the symbology panel options",
27-
"required": ["renderType"],
26+
"description": "The state of the layer's symbology options",
27+
"required": [],
28+
"additionalProperties": false,
2829
"properties": {
29-
"renderType": {
30-
"type": "string",
31-
"enum": ["Single Symbol", "Graduated", "Categorized"]
30+
"color": {
31+
"type": "object",
32+
"description": "The state of the layer's color symbology options",
33+
"required": ["renderType"],
34+
"properties": {
35+
"renderType": {
36+
"type": "string",
37+
"enum": ["Single Symbol", "Graduated", "Categorized", "Canonical", "Heatmap"]
38+
},
39+
"selectedAttribute": {
40+
"type": "string",
41+
"description": "The selected attribute for varying the color",
42+
},
43+
"colorRamp": {
44+
"type": "string",
45+
"default": "cool"
46+
},
47+
"nStops": {
48+
"type": "string",
49+
"default": "9"
50+
},
51+
"stopsDistributionMode": {
52+
"type": "string",
53+
"default": "equal interval",
54+
"enum": [
55+
"quantile",
56+
"equal interval",
57+
"jenks",
58+
"pretty",
59+
"logarithmic"
60+
]
61+
}
62+
}
3263
},
33-
"value": {
34-
"type": "string"
35-
},
36-
"method": {
37-
"type": "string",
38-
"enum": ["color", "radius"]
39-
},
40-
"colorRamp": {
41-
"type": "string",
42-
"default": "cool"
43-
},
44-
"nClasses": {
45-
"type": "string",
46-
"default": "9"
47-
},
48-
"mode": {
49-
"type": "string",
50-
"default": "equal interval",
51-
"enum": [
52-
"quantile",
53-
"equal interval",
54-
"jenks",
55-
"pretty",
56-
"logarithmic"
57-
]
64+
"size": {
65+
"type": "object",
66+
"description": "The state of the layer's size symbology options (radius, line thickness etc.)",
67+
"required": ["renderType"],
68+
"properties": {
69+
"renderType": {
70+
"type": "string",
71+
"enum": ["Single Symbol", "Graduated", "Canonical", "Categorized"]
72+
},
73+
"selectedAttribute": {
74+
"type": "string",
75+
"description": "The selected attribute for varying the size",
76+
},
77+
"nStops": {
78+
"type": "string",
79+
"default": "9"
80+
},
81+
"stopsDistributionMode": {
82+
"type": "string",
83+
"default": "equal interval",
84+
"enum": [
85+
"quantile",
86+
"equal interval",
87+
"jenks",
88+
"pretty",
89+
"logarithmic"
90+
]
91+
}
92+
},
93+
"additionalProperties": false
5894
}
59-
},
60-
"additionalProperties": false
95+
}
6196
}
6297
}
6398
}

0 commit comments

Comments
 (0)