Skip to content

Layer Highlight

Listens to map click / hover and paints highlight layers from identify + highlight dataset nodes. Invisible (no toolbar).

Events: none.

Props

PropDescriptionTypeRequiredDefault Value
mapIdstringfalse--
dragIdstringfalse--
btnWidthnumberfalse40
position'top-left', 'top-right', 'bottom-left', 'bottom-right'false'bottom-right'
controlVisiblebooleanfalsetrue
PropTypeDefaultEffect
enableClickbooleanfalseHighlight on click
enableHoverbooleanfalseHighlight on mousemove
colorstring'#004E98'Fallback color when the dataset has no highlight node
durationMsnumber5000Click highlight duration (ms)

Add a highlight leaf on the dataset for custom paint; otherwise a default highlight is used.

Vue

vue
<script setup lang="ts">
import { Map } from '@hungpvq/vue-map-core';
import { LayerHighlight } from '@hungpvq/vue-map-dataset';
</script>

<template>
  <Map>
    <LayerHighlight enable-click enable-hover color="#e74c3c" :duration-ms="3000" />
  </Map>
</template>

React

tsx
<LayerHighlight enableClick enableHover color="#e74c3c" durationMs={3000} />

Pair with createDatasetPartHighlightComponent() on the dataset (see Highlight).