1. 程式人生 > >vue 高德地圖使用 vue-amap

vue 高德地圖使用 vue-amap

return def data bubuko container emp vid -a bsp

此插件文檔及使用還不錯

https://elemefe.github.io/vue-amap/

技術分享圖片

<template>
    <div class="amap-page-container" style="height:300px;">
      <el-amap vid="amapDemo" :zoom="zoom" :center="center" class="amap-demo">
        <el-amap-circle v-for="(circle,index) in circles" :key="index" :center="
circle.center" :radius="circle.radius" :fill-opacity="circle.fillOpacity" :events="circle.events"></el-amap-circle> </el-amap> </div> </template> <style> .amap-page-container { height: 200px; } </style> <script> export
default { data () { return { zoom: 15, center: [121.5273285, 31.21515044], circles: [ { center: [121.5273285, 31.21515044], radius: 200, fillOpacity: 0.5, events: { click: ()
=> { alert(click); } } } ] } } }; </script>

vue 高德地圖使用 vue-amap