File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
lib/components/data-vis/map
wrappers/components/data-vis/map Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 96
96
onstyleload,
97
97
onstyledata,
98
98
onidle,
99
+ showLegend = false ,
99
100
}: {
100
101
data: object [];
101
102
customPalette? : object [];
486
487
{/if }
487
488
</MapLibre >
488
489
</div >
489
-
490
- <div class =" legend" >
491
- {#each legendItems as item }
492
- <div class =" legend-item" >
493
- <div class ="legend-color" style ="background-color: {item .color };" ></div >
494
- <span >{item .label }</span >
495
- </div >
496
- {/each }
497
- </div >
490
+ {#if showLegend }
491
+ <div class =" legend" >
492
+ {#each legendItems as item }
493
+ <div class =" legend-item" >
494
+ <div class ="legend-color" style ="background-color: {item .color };" ></div >
495
+ <span >{item .label }</span >
496
+ </div >
497
+ {/each }
498
+ </div >
499
+ {/if }
498
500
499
501
<style >
500
502
:global(.maplibregl-ctrl-group button .reset-button ) {
Original file line number Diff line number Diff line change 295
295
value: 400 ,
296
296
description: " Set height of map" ,
297
297
},
298
+ {
299
+ name: " showLegend" ,
300
+ category: " Styling" ,
301
+ isProp: true ,
302
+ value: true ,
303
+ description: " Show the map Legend"
304
+ }
298
305
{
299
306
name: " styleSheet" ,
300
307
isProp: true ,
You can’t perform that action at this time.
0 commit comments