Layer Info Control
Read-only layer list (no create / delete / move). Same list data as LayerControl.
Uses DraggableItemFloat with locale key map.layer-info-control.title (Vue :title + #title, React title={trans(...)}). Do not reuse map.layer-control.title.
Props
| Prop | Description | Type | Required | Default Value |
|---|---|---|---|---|
mapId | string | false | -- | |
dragId | string | false | -- | |
btnWidth | number | false | 40 | |
controlOrder | CSS flex order for the standalone button | number | false | 0 |
position | 'top-left', 'top-right', 'bottom-left', 'bottom-right' | false | 'bottom-right' | |
controlLayout | 'standalone' (corner), 'toolbar' (always in toolbar), 'button' (always corner; not auto-promoted on mobile) | 'standalone' | 'toolbar' | 'button' | false | 'standalone' |
controlVisible | boolean | false | true |
Map also accepts buttonInMobile ('button' | 'toolbar' | 'menu', default 'button'). On viewports ≤640px:
'button'— leave corner buttons unchanged'toolbar'— move declared control buttons into a singleToolbarControlhost (exceptcontrolLayout="button"). Mount oneToolbarControlin the map slot'menu'— hide per-control corner buttons; fan out intact clusters bypositioninto corner stacks with outside-in More. Mount oneToolbarControl.
See ToolbarControl.
| Prop | Type | Default | Effect |
|---|---|---|---|
show | boolean | — | Open the panel |
Events: none.
Slots
| Name | Vue | React |
|---|---|---|
endList | slot { mapId } | not exposed |
default | extra children | — |
Vue
vue
<script setup lang="ts">
import { Map, BaseMapCard } from '@hungpvq/vue-map-core';
import { LayerInfoControl } from '@hungpvq/vue-map-dataset';
import '@hungpvq/map-core/style.css';
import '@hungpvq/map-dataset/style.css';
import '@hungpvq/vue-map-core/style.css';
import '@hungpvq/vue-map-dataset/style.css';
import '@hungpvq/vue-draggable/style.css';
</script>
<template>
<Map>
<LayerInfoControl position="bottom-right" show>
<template #endList="{ mapId }">
<BaseMapCard :mapId="mapId" />
</template>
</LayerInfoControl>
</Map>
</template>React
tsx
<LayerInfoControl position="bottom-right" show />