@@ -463,7 +463,9 @@ class SymbolLayer extends Layer {
463463 .last
464464 .toLowerCase ()
465465 .contains (map["layout" ]["visibility" ])),
466- iconAllowOverlap: map["layout" ]["icon-allow-overlap" ],
466+ iconAllowOverlap: map["layout" ]["icon-allow-overlap" ] is bool ?
467+ ? map["layout" ]["icon-allow-overlap" ] as bool ?
468+ : null ,
467469 iconAnchor: map["layout" ]["icon-anchor" ] == null
468470 ? null
469471 : IconAnchor .values.firstWhere ((e) => e
@@ -472,13 +474,21 @@ class SymbolLayer extends Layer {
472474 .last
473475 .toLowerCase ()
474476 .contains (map["layout" ]["icon-anchor" ])),
475- iconIgnorePlacement: map["layout" ]["icon-ignore-placement" ],
476- iconImage: map["layout" ]["icon-image" ],
477- iconKeepUpright: map["layout" ]["icon-keep-upright" ],
477+ iconIgnorePlacement: map["layout" ]["icon-ignore-placement" ] is bool ?
478+ ? map["layout" ]["icon-ignore-placement" ] as bool ?
479+ : null ,
480+ iconImage: map["layout" ]["icon-image" ] is String ?
481+ ? map["layout" ]["icon-image" ] as String ?
482+ : null ,
483+ iconKeepUpright: map["layout" ]["icon-keep-upright" ] is bool ?
484+ ? map["layout" ]["icon-keep-upright" ] as bool ?
485+ : null ,
478486 iconOffset: (map["layout" ]["icon-offset" ] as List ? )
479487 ? .map <double ?>((e) => e.toDouble ())
480488 .toList (),
481- iconOptional: map["layout" ]["icon-optional" ],
489+ iconOptional: map["layout" ]["icon-optional" ] is bool ?
490+ ? map["layout" ]["icon-optional" ] as bool ?
491+ : null ,
482492 iconPadding: map["layout" ]["icon-padding" ] is num ?
483493 ? (map["layout" ]["icon-padding" ] as num ? )? .toDouble ()
484494 : null ,
@@ -515,7 +525,9 @@ class SymbolLayer extends Layer {
515525 iconTextFitPadding: (map["layout" ]["icon-text-fit-padding" ] as List ? )
516526 ? .map <double ?>((e) => e.toDouble ())
517527 .toList (),
518- symbolAvoidEdges: map["layout" ]["symbol-avoid-edges" ],
528+ symbolAvoidEdges: map["layout" ]["symbol-avoid-edges" ] is bool ?
529+ ? map["layout" ]["symbol-avoid-edges" ] as bool ?
530+ : null ,
519531 symbolPlacement: map["layout" ]["symbol-placement" ] == null
520532 ? null
521533 : SymbolPlacement .values.firstWhere ((e) => e
@@ -538,7 +550,9 @@ class SymbolLayer extends Layer {
538550 .last
539551 .toLowerCase ()
540552 .contains (map["layout" ]["symbol-z-order" ])),
541- textAllowOverlap: map["layout" ]["text-allow-overlap" ],
553+ textAllowOverlap: map["layout" ]["text-allow-overlap" ] is bool ?
554+ ? map["layout" ]["text-allow-overlap" ] as bool ?
555+ : null ,
542556 textAnchor: map["layout" ]["text-anchor" ] == null
543557 ? null
544558 : TextAnchor .values.firstWhere ((e) => e
@@ -550,7 +564,9 @@ class SymbolLayer extends Layer {
550564 textFont: (map["layout" ]["text-font" ] as List ? )
551565 ? .map <String ?>((e) => e.toString ())
552566 .toList (),
553- textIgnorePlacement: map["layout" ]["text-ignore-placement" ],
567+ textIgnorePlacement: map["layout" ]["text-ignore-placement" ] is bool ?
568+ ? map["layout" ]["text-ignore-placement" ] as bool ?
569+ : null ,
554570 textJustify: map["layout" ]["text-justify" ] == null
555571 ? null
556572 : TextJustify .values.firstWhere ((e) => e
@@ -559,7 +575,9 @@ class SymbolLayer extends Layer {
559575 .last
560576 .toLowerCase ()
561577 .contains (map["layout" ]["text-justify" ])),
562- textKeepUpright: map["layout" ]["text-keep-upright" ],
578+ textKeepUpright: map["layout" ]["text-keep-upright" ] is bool ?
579+ ? map["layout" ]["text-keep-upright" ] as bool ?
580+ : null ,
563581 textLetterSpacing: map["layout" ]["text-letter-spacing" ] is num ?
564582 ? (map["layout" ]["text-letter-spacing" ] as num ? )? .toDouble ()
565583 : null ,
@@ -575,7 +593,9 @@ class SymbolLayer extends Layer {
575593 textOffset: (map["layout" ]["text-offset" ] as List ? )
576594 ? .map <double ?>((e) => e.toDouble ())
577595 .toList (),
578- textOptional: map["layout" ]["text-optional" ],
596+ textOptional: map["layout" ]["text-optional" ] is bool ?
597+ ? map["layout" ]["text-optional" ] as bool ?
598+ : null ,
579599 textPadding: map["layout" ]["text-padding" ] is num ?
580600 ? (map["layout" ]["text-padding" ] as num ? )? .toDouble ()
581601 : null ,
0 commit comments