quanyawei
2023-09-21 8b679c8269611f389929af0a8d87cafc30159183
src/components/map/pickCoordinate1.vue
@@ -1,13 +1,6 @@
<template>
  <a-modal
    title="坐标选择"
    destroyOnClose
    :visible="true"
    @ok="addLonAndLat"
    @cancel="handleMapCancel"
    okText="确定"
    class="modalStyle"
  >
  <a-modal title="坐标选择" destroyOnClose :visible="true" @ok="addLonAndLat" @cancel="handleMapCancel" okText="确定"
    class="modalStyle">
    <div>
      <div style="display: flex">
        <div style="display: flex; width: 300px">
@@ -24,15 +17,12 @@
            style="width: 160px; height: 26px"
            @change="searchMap"
          ></a-input> -->
          <input v-model="input" id="tipinput" /><button
            @click="searchAddress"
            style="
          <input v-model="input" id="tipinput" /><button @click="searchAddress" style="
              background-color: #1890ff;
              color: white;
              border: none;
              margin-left: 5px;
            "
          >
            ">
            搜索
          </button>
          <div id="panel"></div>
@@ -52,34 +42,17 @@
          <!-- <a-input style="width: 160px; height: 26px" @focus="selectPoi" /> -->
        </div>
        <div>
          <span style="margin-left: 25px">经度:</span
          ><a-input
            v-model="clickPoint[0]"
            style="display: inline; width: 160px; height: 26px"
          />
          <span style="margin-left: 25px">经度:</span><a-input v-model="clickPoint[0]"
            style="display: inline; width: 160px; height: 26px" />
        </div>
        <div>
          <span style="margin-left: 25px">纬度:</span
          ><a-input
            v-model="clickPoint[1]"
            style="display: inline; width: 160px; height: 26px"
          />
          <span style="margin-left: 25px">纬度:</span><a-input v-model="clickPoint[1]"
            style="display: inline; width: 160px; height: 26px" />
        </div>
      </div>
      <el-amap
        ref="map"
        :center="clickPoint"
        :events="{ click: mapClick }"
        :zoom="zoom"
        :scroll-wheel-zoom="true"
        style="height: 400px; width: 100%; margin-top: 20px"
        id="amap"
      >
        <el-amap-marker
          :position="clickPoint"
          animation="AMAP_ANIMATION_BOUNCE"
          :dragging="true"
        ></el-amap-marker>
      <el-amap ref="map" :center="clickPoint" :events="{ click: mapClick }" :zoom="zoom" :scroll-wheel-zoom="true"
        style="height: 400px; width: 100%; margin-top: 20px" id="amap">
        <el-amap-marker :position="clickPoint" animation="AMAP_ANIMATION_BOUNCE" :dragging="true"></el-amap-marker>
      </el-amap>
      <!--      :scroll-wheel-zoom="true"-->
@@ -255,22 +228,27 @@
  .ant-modal {
    margin-left: 25%;
  }
  .ant-modal-content {
    width: 800px;
  }
}
.BMap_cpyCtrl,
.anchorBL {
  display: none;
}
/* 去除高德地图的logo */
/deep/.amap-logo {
  display: none;
  opacity: 0 !important;
}
/deep/.amap-copyright {
  opacity: 0;
}
.amap-sug-result {
  position: absolute;
  z-index: 9999 !important;
@@ -278,6 +256,7 @@
  border: 1px solid #d1d1d1;
  bottom: auto;
}
#panel {
  z-index: 999;
  position: absolute;