NavigationControl
Navigation controls component, including zoom buttons and a compass.
Example
Example Source Code
vue
<template>
<div style="height: 400px" class="vw-full vh-full">
<mb-map :bearing="30">
<mb-tianditu-layer />
<mb-navigation-control
:show-compass="true"
:show-zoom="true"
position="top-right"
/>
</mb-map>
</div>
</template>
<script setup lang="ts"></script>
API
PROPS
Name | Description | Type | Default |
---|---|---|---|
position | Position | string('top-left' , 'top-right' , 'bottom-left' ,'bottom-right') | top-right |
show-compass | Is compass visible | boolean | true |
show-zoom | Is zoomer visible | boolean | true |
EVENTS
Name | Description | Parameters |
---|---|---|
created | Map initialization completed event | - |
SLOTS
Name | Description |
---|
METHODS
Name | Description | Definition |
---|