File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/mapboxgl/mapping/webmap/v3 Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -378,8 +378,7 @@ export class WebMap extends mapboxgl.Evented {
378378 visible
379379 }
380380 } else {
381- const appreciableLayers = this . _generateLayers ( ) ;
382- const matchLayer = appreciableLayers . find ( layer => layer . id === id ) ;
381+ const matchLayer = this . _appreciableLayers . find ( layer => layer . id === id ) ;
383382 formatItem = this . _formatLayer ( {
384383 dataSource : matchLayer . dataSource ,
385384 id,
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ describe('mapboxgl-webmap3.0', () => {
117117 expect ( webMapV3 . getLayers ( ) . length ) . toBeLessThanOrEqual ( mapInfo . layers . length ) ;
118118 expect ( webMapV3 . getLegendInfo ( ) . length ) . not . toBe ( 0 ) ;
119119 expect ( webMapV3 . getLayerCatalog ( ) . length ) . not . toBe ( 0 ) ;
120+ expect ( webMapV3 . getLegendInfo ( ) . length ) . toBe ( 6 ) ;
120121 done ( ) ;
121122 } ) ;
122123 } ) ;
You can’t perform that action at this time.
0 commit comments