|
| 1 | +{ |
| 2 | + "$id": "/schemas/FeatureStyling.1.0.0", |
| 3 | + "description": "Defines styling options for features.", |
| 4 | + "type": "object", |
| 5 | + "additionalProperties": false, |
| 6 | + "properties": { |
| 7 | + "stylingOptions": { |
| 8 | + "description": "Styling options for features.", |
| 9 | + "oneOf": [ |
| 10 | + { |
| 11 | + "type": "object", |
| 12 | + "additionalProperties": false, |
| 13 | + "required": [ "styleType", "color" ], |
| 14 | + "properties": { |
| 15 | + "styleType": { |
| 16 | + "enum": [ "Expression" ], |
| 17 | + "description": "Specifies the type of styling: 'Expression' or 'Category'. This is used to differentiate between different styling methods." |
| 18 | + }, |
| 19 | + "defines": { |
| 20 | + "type": "object", |
| 21 | + "description": "Named expressions that can be reused within other expressions", |
| 22 | + "additionalProperties": false, |
| 23 | + "patternProperties": { |
| 24 | + "^[a-zA-Z0-9 ?!@+-.:=_/]*$": { |
| 25 | + "$ref": "/schemas/CommonTypes#/definitions/expressionString", |
| 26 | + "description": "Expression string that can define conditions or calculations for styling" |
| 27 | + } |
| 28 | + } |
| 29 | + }, |
| 30 | + "show": { |
| 31 | + "$ref": "/schemas/CommonTypes#/definitions/expressionOrConditions", |
| 32 | + "description": "Expression or conditions that determines if the feature is visible" |
| 33 | + }, |
| 34 | + "color": { |
| 35 | + "description": "Expression or conditions that determine the feature's color, can also be a set of conditions", |
| 36 | + "$ref": "/schemas/CommonTypes#/definitions/expressionOrConditions" |
| 37 | + }, |
| 38 | + "lineWeight": { |
| 39 | + "$ref": "/schemas/CommonTypes#/definitions/expressionString", |
| 40 | + "description": "Expression that determines the feature's line weight/thickness" |
| 41 | + }, |
| 42 | + "lineColor": { |
| 43 | + "$ref": "/schemas/CommonTypes#/definitions/expressionOrConditions", |
| 44 | + "description": "Color definition for the feature's lines" |
| 45 | + } |
| 46 | + } |
| 47 | + }, |
| 48 | + { |
| 49 | + "type": "object", |
| 50 | + "additionalProperties": false, |
| 51 | + "required": [ "styleType", "rules" ], |
| 52 | + "properties": { |
| 53 | + "styleType": { |
| 54 | + "enum": [ "Category" ], |
| 55 | + "description": "Specifies the type of styling: 'Expression' or 'Category'. This is used to differentiate between different styling methods." |
| 56 | + }, |
| 57 | + "rules": { |
| 58 | + "type": "array", |
| 59 | + "description": "Array of Attribute rules", |
| 60 | + "items": { |
| 61 | + "type": "object", |
| 62 | + "additionalProperties": false, |
| 63 | + "required": [ "name", "value", "symbology" ], |
| 64 | + "properties": { |
| 65 | + "name": { |
| 66 | + "$ref": "/schemas/CommonTypes#/definitions/safeString", |
| 67 | + "description": "Name of the attribute to match" |
| 68 | + }, |
| 69 | + "value": { |
| 70 | + "description": "Value of the attribute to match", |
| 71 | + "oneOf": [ |
| 72 | + { |
| 73 | + "$ref": "/schemas/CommonTypes#/definitions/expressionString" |
| 74 | + }, |
| 75 | + { |
| 76 | + "type": "number" |
| 77 | + }, |
| 78 | + { |
| 79 | + "type": "boolean" |
| 80 | + } |
| 81 | + ] |
| 82 | + }, |
| 83 | + "symbology": { |
| 84 | + "type": "object", |
| 85 | + "description": "Symbology settings to apply when the rule matches", |
| 86 | + "additionalProperties": false, |
| 87 | + "required": [ "lineColor", "fillColor", "weight" ], |
| 88 | + "properties": { |
| 89 | + "lineColor": { |
| 90 | + "$ref": "/schemas/CommonTypes#/definitions/colorDef", |
| 91 | + "description": "Color of the feature's lines" |
| 92 | + }, |
| 93 | + "fillColor": { |
| 94 | + "$ref": "/schemas/CommonTypes#/definitions/colorDef", |
| 95 | + "description": "Fill color of the feature" |
| 96 | + }, |
| 97 | + "weight": { |
| 98 | + "type": "number", |
| 99 | + "description": "Thickness of the feature's lines" |
| 100 | + }, |
| 101 | + "linePixels": { |
| 102 | + "$ref": "/schemas/CommonTypes#/definitions/linePixels", |
| 103 | + "description": "Line pattern for the feature's lines" |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + } |
| 108 | + } |
| 109 | + } |
| 110 | + } |
| 111 | + } |
| 112 | + ] |
| 113 | + } |
| 114 | + } |
| 115 | +} |
0 commit comments