File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/mapboxgl/mapping/webmap/v3 Expand file tree Collapse file tree 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 {
452452 _createLayerLegendList ( layer , styleSetting ) {
453453 const layerType = layer . type ;
454454 const layerId = layer . id ;
455+ const layerTitle = layer . title ;
455456 const layerType2LegendType = LAEYR_TYPE_LEGEND_TYPE [ layerType ] ;
456457 if ( styleSetting . type === 'heat' ) {
457458 const colors = this . _heatColorToGradient ( ( layer . paint || { } ) [ 'heatmap-color' ] ) ;
@@ -468,7 +469,8 @@ export class WebMap extends mapboxgl.Evented {
468469 }
469470 }
470471 ] ,
471- layerId
472+ layerId,
473+ layerTitle
472474 }
473475 ] ;
474476 }
@@ -492,7 +494,8 @@ export class WebMap extends mapboxgl.Evented {
492494 }
493495 }
494496 ] ,
495- layerId
497+ layerId,
498+ layerTitle
496499 }
497500 ] ;
498501 }
@@ -516,7 +519,8 @@ export class WebMap extends mapboxgl.Evented {
516519 themeField : ( subStyleSetting . field || [ ] ) [ 0 ] ,
517520 styleField : styleField ,
518521 styleGroup,
519- layerId
522+ layerId,
523+ layerTitle
520524 } ;
521525 return legendItem ;
522526 } ) ;
You can’t perform that action at this time.
0 commit comments