Skip to content

比例尺控件(ScaleControl)

比例尺组件,用于显示图上距离和实际距离的比值

示例

示例源码
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

名称描述类型默认值
position控件所处位置string('top-left' , 'top-right' , 'bottom-left' ,'bottom-right')top-right
max-widthScaleControl控件的最大长度,以像素为单位number100
unit单位string('imperial' , 'metric' , 'nautical')metric

EVENTS

名称描述参数
created地图初始化完成事件-

SLOTS

名称描述

METHODS

名称描述定义