File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/mapboxgl/mapping/webmap/v3 Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,7 @@ export class WebMap extends mapboxgl.Evented {
507507 }
508508 layersOnMap . push ( {
509509 id : overlayLayer . id ,
510- visibility,
510+ layout : { visibility } ,
511511 source,
512512 type : overlayLayer . type
513513 } ) ;
@@ -558,11 +558,12 @@ export class WebMap extends mapboxgl.Evented {
558558 }
559559 }
560560 const sourceOnMap = this . map . getSource ( layer . source ) ;
561+ const layout = layer . layout || { } ;
561562 const overlayLayers = this . _formatLayer ( {
562563 id : layer . id ,
563564 type : layer . type ,
564565 title,
565- visible : layer . visibility ? layer . visibility === 'visible' : true ,
566+ visible : layout . visibility ? layout . visibility === 'visible' : true ,
566567 renderSource : sourceOnMap && {
567568 id : layer . source ,
568569 type : sourceOnMap && sourceOnMap . type ,
You can’t perform that action at this time.
0 commit comments