MapLegend Control
Usecase
- Display dynamic legend based on visible layers and symbology.
- Provide contextual guidance for map colors, lines, and symbols.
Props
| Prop | Description | Type | Required | Default Value |
|---|---|---|---|---|
mapId | string | false | -- | |
dragId | string | false | -- | |
btnWidth | number | false | 40 | |
position | 'top-left', 'top-right', 'bottom-left', 'bottom-right' | false | 'bottom-right' | |
controlVisible | boolean | false | true |
Slots
| Name | Description |
|---|---|
default | Custom legend content slot |
Usage
vue
<script setup lang="ts">
import { Map } from '@hungpvq/vue-map-core';
import { LegendControl } from '@hungpvq/vue-map-legend';
import '@hungpvq/vue-map-core/style.css';
import '@hungpvq/vue-map-legend/style.css';
</script>
<template>
<Map>
<LegendControl />
</Map>
</template>