Skip to content

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

NameDescriptionTypeDefault
positionPositionstring('top-left' , 'top-right' , 'bottom-left' ,'bottom-right')top-right
max-widthMaximum length of the ScaleControl, in pixelsnumber100
unitUnitstring('imperial' , 'metric' , 'nautical')metric

EVENTS

NameDescriptionParameters
createdMap initialization completed event-

SLOTS

NameDescription

METHODS

NameDescriptionDefinition