File tree 1 file changed +7
-3
lines changed
src/mapboxgl/mapping/webmap/v3 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ export class WebMap extends mapboxgl.Evented {
452
452
_createLayerLegendList ( layer , styleSetting ) {
453
453
const layerType = layer . type ;
454
454
const layerId = layer . id ;
455
+ const layerTitle = layer . title ;
455
456
const layerType2LegendType = LAEYR_TYPE_LEGEND_TYPE [ layerType ] ;
456
457
if ( styleSetting . type === 'heat' ) {
457
458
const colors = this . _heatColorToGradient ( ( layer . paint || { } ) [ 'heatmap-color' ] ) ;
@@ -468,7 +469,8 @@ export class WebMap extends mapboxgl.Evented {
468
469
}
469
470
}
470
471
] ,
471
- layerId
472
+ layerId,
473
+ layerTitle
472
474
}
473
475
] ;
474
476
}
@@ -492,7 +494,8 @@ export class WebMap extends mapboxgl.Evented {
492
494
}
493
495
}
494
496
] ,
495
- layerId
497
+ layerId,
498
+ layerTitle
496
499
}
497
500
] ;
498
501
}
@@ -516,7 +519,8 @@ export class WebMap extends mapboxgl.Evented {
516
519
themeField : ( subStyleSetting . field || [ ] ) [ 0 ] ,
517
520
styleField : styleField ,
518
521
styleGroup,
519
- layerId
522
+ layerId,
523
+ layerTitle
520
524
} ;
521
525
return legendItem ;
522
526
} ) ;
You can’t perform that action at this time.
0 commit comments