@@ -75,7 +75,7 @@ export class LayerFactory {
75
75
line-translate ✓
76
76
line-translate-anchor ✓
77
77
line-width ✓
78
- visibility
78
+ visibility ✓
79
79
*/
80
80
81
81
if ( propertiesObject [ 'line-blur' ] ) {
@@ -130,6 +130,10 @@ export class LayerFactory {
130
130
lineProperties [ 'lineWidth' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'line-width' ] ) ;
131
131
}
132
132
133
+ if ( propertiesObject [ 'visibility' ] ) {
134
+ lineProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
135
+ }
136
+
133
137
return lineProperties ;
134
138
}
135
139
@@ -144,16 +148,16 @@ export class LayerFactory {
144
148
circle-blur ✓
145
149
circle-color ✓
146
150
circle-opacity ✓
147
- circle-pitch-alignment
148
- circle-pitch-scale
151
+ circle-pitch-alignment ✓
152
+ circle-pitch-scale ✓
149
153
circle-radius ✓
150
154
circle-sort-key
151
155
circle-stroke-color ✓
152
156
circle-stroke-opacity ✓
153
157
circle-stroke-width ✓
154
- circle-translate
155
- circle-translate-anchor
156
- visibility
158
+ circle-translate ✓
159
+ circle-translate-anchor ✓
160
+ visibility ✓
157
161
*/
158
162
159
163
if ( propertiesObject [ 'circle-blur' ] ) {
@@ -168,6 +172,14 @@ export class LayerFactory {
168
172
circleProperties [ 'circleOpacity' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-opacity' ] ) ;
169
173
}
170
174
175
+ if ( propertiesObject [ 'circle-pitch-alignment' ] ) {
176
+ circleProperties [ 'circlePitchAlignment' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-pitch-alignment' ] ) ;
177
+ }
178
+
179
+ if ( propertiesObject [ 'circle-pitch-scale' ] ) {
180
+ circleProperties [ 'circleScaleAlignment' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-pitch-scale' ] ) ;
181
+ }
182
+
171
183
if ( propertiesObject [ 'circle-radius' ] ) {
172
184
if ( typeof propertiesObject [ 'circle-radius' ] !== 'number' ) {
173
185
throw new Error ( 'Unsupported circle-radius type' ) ; // TODO: Implement circle radius with stops
@@ -187,6 +199,18 @@ export class LayerFactory {
187
199
circleProperties [ 'circleStrokeWidth' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-stroke-width' ] ) ;
188
200
}
189
201
202
+ if ( propertiesObject [ 'circle-translate' ] ) {
203
+ circleProperties [ 'circleTranslation' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-translate' ] ) ;
204
+ }
205
+
206
+ if ( propertiesObject [ 'circle-translate-anchor' ] ) {
207
+ circleProperties [ 'circleTranslationAnchor' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-translate-anchor' ] ) ;
208
+ }
209
+
210
+ if ( propertiesObject [ 'visibility' ] ) {
211
+ circleProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
212
+ }
213
+
190
214
return circleProperties ;
191
215
}
192
216
@@ -206,7 +230,7 @@ export class LayerFactory {
206
230
fill-sort-key
207
231
fill-translate ✓
208
232
fill-translate-anchor ✓
209
- visibility
233
+ visibility ✓
210
234
*/
211
235
212
236
if ( propertiesObject [ 'fill-antialias' ] ) {
@@ -237,14 +261,18 @@ export class LayerFactory {
237
261
fillProperties [ 'fillTranslationAnchor' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'fill-translate-anchor' ] ) ;
238
262
}
239
263
264
+ if ( propertiesObject [ 'visibility' ] ) {
265
+ fillProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
266
+ }
267
+
240
268
return fillProperties ;
241
269
}
242
270
243
271
private static parsePropertiesForSymbolLayer ( propertiesObject ) {
244
- const fillProperties = { } ;
272
+ const symbolProperties = { } ;
245
273
246
274
if ( ! propertiesObject ) {
247
- return fillProperties ;
275
+ return symbolProperties ;
248
276
}
249
277
250
278
/*
@@ -303,29 +331,33 @@ export class LayerFactory {
303
331
text-translate-anchor
304
332
text-variable-anchor
305
333
text-writing-mode
306
- visibility
334
+ visibility ✓
307
335
*/
308
336
309
337
if ( propertiesObject [ 'icon-image' ] ) {
310
- fillProperties [ 'iconImageName' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-image' ] ) ;
338
+ symbolProperties [ 'iconImageName' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-image' ] ) ;
311
339
}
312
340
313
341
if ( propertiesObject [ 'icon-rotate' ] ) {
314
- fillProperties [ 'iconRotation' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-rotate' ] ) ;
342
+ symbolProperties [ 'iconRotation' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-rotate' ] ) ;
315
343
}
316
344
317
345
if ( propertiesObject [ 'icon-size' ] ) {
318
- fillProperties [ 'iconScale' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-size' ] ) ;
346
+ symbolProperties [ 'iconScale' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-size' ] ) ;
319
347
}
320
348
321
349
if ( propertiesObject [ 'text-color' ] ) {
322
- fillProperties [ 'textColor' ] = NSExpression . expressionForConstantValue ( new Color ( propertiesObject [ 'text-color' ] ) . ios ) ;
350
+ symbolProperties [ 'textColor' ] = NSExpression . expressionForConstantValue ( new Color ( propertiesObject [ 'text-color' ] ) . ios ) ;
323
351
}
324
352
325
353
if ( propertiesObject [ 'text-field' ] ) {
326
- fillProperties [ 'text' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'text-field' ] ) ;
354
+ symbolProperties [ 'text' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'text-field' ] ) ;
327
355
}
328
356
329
- return fillProperties ;
357
+ if ( propertiesObject [ 'visibility' ] ) {
358
+ symbolProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
359
+ }
360
+
361
+ return symbolProperties ;
330
362
}
331
363
}
0 commit comments