ScaleContro
Scale component, used to display the ratio between distance on the map and the actual distance.
Example
Example Source Code
vue
<template>
<div style="height: 400px" class="vw-full vh-full">
<mb-map>
<mb-tianditu-layer />
<mb-scale-control :mamb-width="88" 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 |
| max-width | Maximum length of the ScaleControl, in pixels | number | 100 |
| unit | Unit | string('imperial' , 'metric' , 'nautical') | metric |
EVENTS
| Name | Description | Parameters |
|---|---|---|
| created | Map initialization completed event | - |
SLOTS
| Name | Description |
|---|
METHODS
| Name | Description | Definition |
|---|
