@@ -75,7 +75,7 @@ export class LayerFactory {
7575 line-translate ✓
7676 line-translate-anchor ✓
7777 line-width ✓
78- visibility
78+ visibility ✓
7979 */
8080
8181 if ( propertiesObject [ 'line-blur' ] ) {
@@ -130,6 +130,10 @@ export class LayerFactory {
130130 lineProperties [ 'lineWidth' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'line-width' ] ) ;
131131 }
132132
133+ if ( propertiesObject [ 'visibility' ] ) {
134+ lineProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
135+ }
136+
133137 return lineProperties ;
134138 }
135139
@@ -144,16 +148,16 @@ export class LayerFactory {
144148 circle-blur ✓
145149 circle-color ✓
146150 circle-opacity ✓
147- circle-pitch-alignment
148- circle-pitch-scale
151+ circle-pitch-alignment ✓
152+ circle-pitch-scale ✓
149153 circle-radius ✓
150154 circle-sort-key
151155 circle-stroke-color ✓
152156 circle-stroke-opacity ✓
153157 circle-stroke-width ✓
154- circle-translate
155- circle-translate-anchor
156- visibility
158+ circle-translate ✓
159+ circle-translate-anchor ✓
160+ visibility ✓
157161 */
158162
159163 if ( propertiesObject [ 'circle-blur' ] ) {
@@ -168,6 +172,14 @@ export class LayerFactory {
168172 circleProperties [ 'circleOpacity' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-opacity' ] ) ;
169173 }
170174
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+
171183 if ( propertiesObject [ 'circle-radius' ] ) {
172184 if ( typeof propertiesObject [ 'circle-radius' ] !== 'number' ) {
173185 throw new Error ( 'Unsupported circle-radius type' ) ; // TODO: Implement circle radius with stops
@@ -187,6 +199,18 @@ export class LayerFactory {
187199 circleProperties [ 'circleStrokeWidth' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'circle-stroke-width' ] ) ;
188200 }
189201
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+
190214 return circleProperties ;
191215 }
192216
@@ -206,7 +230,7 @@ export class LayerFactory {
206230 fill-sort-key
207231 fill-translate ✓
208232 fill-translate-anchor ✓
209- visibility
233+ visibility ✓
210234 */
211235
212236 if ( propertiesObject [ 'fill-antialias' ] ) {
@@ -237,14 +261,18 @@ export class LayerFactory {
237261 fillProperties [ 'fillTranslationAnchor' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'fill-translate-anchor' ] ) ;
238262 }
239263
264+ if ( propertiesObject [ 'visibility' ] ) {
265+ fillProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
266+ }
267+
240268 return fillProperties ;
241269 }
242270
243271 private static parsePropertiesForSymbolLayer ( propertiesObject ) {
244- const fillProperties = { } ;
272+ const symbolProperties = { } ;
245273
246274 if ( ! propertiesObject ) {
247- return fillProperties ;
275+ return symbolProperties ;
248276 }
249277
250278 /*
@@ -303,29 +331,33 @@ export class LayerFactory {
303331 text-translate-anchor
304332 text-variable-anchor
305333 text-writing-mode
306- visibility
334+ visibility ✓
307335 */
308336
309337 if ( propertiesObject [ 'icon-image' ] ) {
310- fillProperties [ 'iconImageName' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-image' ] ) ;
338+ symbolProperties [ 'iconImageName' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-image' ] ) ;
311339 }
312340
313341 if ( propertiesObject [ 'icon-rotate' ] ) {
314- fillProperties [ 'iconRotation' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-rotate' ] ) ;
342+ symbolProperties [ 'iconRotation' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-rotate' ] ) ;
315343 }
316344
317345 if ( propertiesObject [ 'icon-size' ] ) {
318- fillProperties [ 'iconScale' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-size' ] ) ;
346+ symbolProperties [ 'iconScale' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'icon-size' ] ) ;
319347 }
320348
321349 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 ) ;
323351 }
324352
325353 if ( propertiesObject [ 'text-field' ] ) {
326- fillProperties [ 'text' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'text-field' ] ) ;
354+ symbolProperties [ 'text' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'text-field' ] ) ;
327355 }
328356
329- return fillProperties ;
357+ if ( propertiesObject [ 'visibility' ] ) {
358+ symbolProperties [ 'visibility' ] = NSExpression . expressionForConstantValue ( propertiesObject [ 'visibility' ] ) ;
359+ }
360+
361+ return symbolProperties ;
330362 }
331363}
0 commit comments