派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-28 95aff9b8753b0c916937af0621d30391cd325e54
src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
@@ -37,6 +37,8 @@
import ReportLocationSection from './ReportLocationSection'
import ReportLocationSearch from './ReportLocationSearch'
import iconUrl from '../../../../../public/assets/images/map/loc.png'
export default {
  name: 'ReportLocation',
  components: {
@@ -82,6 +84,16 @@
      console.log(e)
      this.LongLatPos.longPos = e.latlng.lng
      this.LongLatPos.latPos = e.latlng.lat
      const as = [e.latlng.lat, e.latlng.lng]
      // console.log(as)
      const marker = window.L.marker(as, {
        icon: window.L.icon({
          iconUrl: iconUrl,
          iconSize: [30, 30],
          iconAnchor: [15, 15]
        })
      })
      window.map.addLayer(marker)
    },
    // 获得焦点 进行定位
    focusLocation () {