Google Maps Places 自动补全缺失的几何图形 [英] Google Maps Places Autocomplete missing geometry

查看:41
本文介绍了Google Maps Places 自动补全缺失的几何图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google 地图地点自动完成功能不再按预期工作.

The Google Maps Places Autocomplete does not work as expected anymore.

https://developers.google.com/maps/documentation/javascript/examples/places-自动完成

在地图中插入搜索字符串(例如ZKM")时,它会在下拉列表中给出一些建议.在这种情况下,它将是ZKM | Zentrum für Kunst und Medientechnologie Karlsruhe, Lorenzstraße, Karlsruhe, Deutschland".点击此项目时,地图上不会放置任何标记!

When inserting a search string in the map (for example "ZKM"), it will give some recommendations in the drop down list. In this case it will be "ZKM | Zentrum für Kunst und Medientechnologie Karlsruhe, Lorenzstraße, Karlsruhe, Deutschland". When clicking this item, no marker will be placed on the map!

但是当搜索Karlsruhe"并点击第一个搜索结果Karlsruhe, Deutschland"时,标记被正确放置.

But when searching for "Karlsruhe" and clicking the first search result "Karlsruhe, Deutschland" the marker is placed correctly.

在代码中调用了一个名为 getPlace() 的函数.

In the code a function called getPlace() ist called.

var place = autocomplete.getPlace();

这个地方应该包含一个对象几何",但它没有.

The place should contain an object "geometry", but it does not.

是否有解决此问题的方法?

Is there any workaround for this problem?

推荐答案

看起来已经被 Google 修复了 :)

Looks like it has been fixed by Google :)

这篇关于Google Maps Places 自动补全缺失的几何图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆