# ImageLayer

# 使用

<amap>
  <amap-image-layer :bounds="[[swx, swy], [nex, ney]]" :url="picUrl" />
</amap>
1
2
3

Source Code

# Props

属性名 类型 备注
url string
bounds number[2][2]
visible boolean
zIndex number
opacity number
zooms number[2]
extraOptions object 其它未在上面列出的属性,仅支持单次绑定

# Events

事件名 备注
complete

# Example

<template>
  <demo-view
    :map-options="{
      center: [116.335161, 39.942138],
      zoom: 15,
    }"
  >
    <template v-slot:control>
      <a-form-item label="opacity">
        <a-slider
          v-model="opacity"
          :min="0"
          :max="1"
          :step="0.1"
          style="width: 180px;"
        />
      </a-form-item>
    </template>
    <template v-slot:map-content>
      <amap-image-layer
        :url="url"
        :bounds="[
          [116.327911, 39.939229],
          [116.342659, 39.946275],
        ]"
        :opacity="opacity"
      />
    </template>
  </demo-view>
</template>

<script>
import PIC_URL from '../../public/assets/dongwuyuan.jpg';

export default {
  data() {
    return {
      url: PIC_URL,
      opacity: 0.8,
    };
  },
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43