<template>
  <div>
    <div style="position: relative">
      <a-map-position :position="mapPosition" @position="onPosition"></a-map-position>
      <div style="position: absolute; left: 400px; top: 8px;">{{ mapInfo.lng }},{{ mapInfo.lat }}, {{ mapInfo.address }}</div>
    </div>
  </div>

</template>

<script>
import AMapPosition from '@/components/AMap/AMapPosition'

export default {
  name: "position",
  components: {AMapPosition},
  data() {
    return {
      // 地图位置
      mapPosition: [116.3975, 39.9092],
      mapInfo: {},
    }
  },


  methods: {
    // 地图位置选择
    onPosition(info) {
      this.mapInfo = info;
      console.log(info);
    },
  }
}
</script>

<style scoped>

</style>
