Mic*_*ael 5 javascript google-maps autocomplete
Google Maps Places Autocomplete 不再按预期工作。
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
在地图中插入搜索字符串(例如“ZKM”)时,它会在下拉列表中给出一些建议。在这种情况下,它将是“ZKM | Zentrum für Kunst und Medientechnologie Karlsruhe, Lorenzstraße, Karlsruhe, Deutschland”。点击此项目时,地图上不会放置任何标记!
但是当搜索“Karlsruhe”并点击第一个搜索结果“Karlsruhe, Deutschland”时,标记被正确放置。
在代码中调用了一个名为 getPlace() 的函数。
var place = autocomplete.getPlace();
Run Code Online (Sandbox Code Playgroud)
这个地方应该包含一个对象“几何”,但它没有。
这个问题有什么解决方法吗?
| 归档时间: |
|
| 查看次数: |
4752 次 |
| 最近记录: |