Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将角度谷歌地图与我的应用程序集成,通过拖动标记来获取某个地方的纬度和经度。我成功返回了一个封装纬度和经度字段的对象,但我不知道如何访问它们并将它们分配给局部变量在我的应用程序中。任何想法?这是我的 chrome 控制台的图片
好吧,你有 a在而不是 a.的末尾会弄乱你的代码。试试这个:lat();
.
lat()
;
this.latitude = $event.latLng.lat(); this.longitude = $event.latLng.lng();