|
150 | 150 | height: ["get", "height"], |
151 | 151 | fillOpacity: 0.5, |
152 | 152 | fillColor: [ |
153 | | - "case", |
154 | | - ['==', ['get', 'subtype'], 'agricultural'], |
155 | | - "wheat", |
156 | | - ['==', ['get', 'subtype'], 'civic'], |
157 | | - "teal", |
158 | | - ['==', ['get', 'subtype'], 'commercial'], |
159 | | - "blue", |
160 | | - ['==', ['get', 'subtype'], 'education'], |
161 | | - "aqua", |
162 | | - ['==', ['get', 'subtype'], 'entertainment'], |
163 | | - "pink", |
164 | | - ['==', ['get', 'subtype'], 'industrial'], |
165 | | - "yellow", |
166 | | - ['==', ['get', 'subtype'], 'medical'], |
167 | | - "red", |
168 | | - ['==', ['get', 'subtype'], 'military'], |
169 | | - "darkgreen", |
170 | | - ['==', ['get', 'subtype'], 'outbuilding'], |
171 | | - "white", |
172 | | - ['==', ['get', 'subtype'], 'religious'], |
173 | | - "khaki", |
174 | | - ['==', ['get', 'subtype'], 'residential'], |
175 | | - "green", |
176 | | - ['==', ['get', 'subtype'], 'service'], |
177 | | - "gold", |
178 | | - ['==', ['get', 'subtype'], 'transportation'], |
179 | | - "orange", |
180 | | - "grey", |
| 153 | + "match", |
| 154 | + |
| 155 | + ["get", "subtype"], |
| 156 | + |
| 157 | + "agricultural", "wheat", |
| 158 | + "civic", "teal", |
| 159 | + "commercial", "blue", |
| 160 | + "education", "aqua", |
| 161 | + "entertainment", "pink", |
| 162 | + "industrial", "yellow", |
| 163 | + "medical", "red", |
| 164 | + "military", "darkgreen", |
| 165 | + "outbuilding", "white", |
| 166 | + "religious", "khaki", |
| 167 | + "residential", "green", |
| 168 | + "service", "gold", |
| 169 | + "transportation", "orange", |
| 170 | + |
| 171 | + //Default color. |
| 172 | + "grey" |
181 | 173 | ], |
182 | 174 | filter: ['any', ['==', ['geometry-type'], 'Polygon'], ['==', ['geometry-type'], 'MultiPolygon']] |
183 | 175 | } |
|
0 commit comments