【问题标题】:Using Agm mps and i want to get the lat lng on map click in angular 10使用 Agm mps,我想在地图上点击角度 10 获得纬度 lng
【发布时间】:2020-09-29 16:58:46
【问题描述】:

这是我的代码,但它不起作用。当我点击地图时,它显示错误:无法读取未定义的属性“纬度”

 <agm-map
          style="height: 700px"
          [latitude]="lat"
          [longitude]="lng"
          [zoom]="zoom"
          (mapClick)="placeMarker($event)"
        >

Ts file


placeMarker($event) {
    console.log($event.coords.lat);
    console.log($event.coords.lng);
  }```

【问题讨论】:

    标签: angular angular10 angular-maps


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-09
      • 1970-01-01
      • 2016-06-30
      • 1970-01-01
      相关资源
      最近更新 更多