MapTooltip
Example
Example Source Code
vue
<template>
<div style="height: 400px" class="vw-full vh-full">
<mb-map :zoom="14">
<mb-tianditu-layer />
<mb-map-tooltip>
<template #default="{ coordinates, pixel }">
<div
v-if="pixel.x && pixel.y"
style="padding: 4px; background-color: black; color: white"
>
position: {{ coordinates }} / {{ pixel }}
</div>
</template>
</mb-map-tooltip>
</mb-map>
</div>
</template>
<script setup lang="ts"></script>
API
PROPS
Name | Description | Type | Default |
---|
EVENTS
Name | Description | Parameters |
---|---|---|
created | Map initialization completed event | - |
SLOTS
Name | Description |
---|---|
default | Default slot with parameters: { coordinates, pixel }, representing mouse latitude/longitude and mouse screen pixel position |
METHODS
Name | Description | Definition |
---|