自动完成Google Maps Place by Cities [英] Autocomplete Google Maps Place by Cities

查看:99
本文介绍了自动完成Google Maps Place by Cities的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Google地图的自动完成位置存在问题,我想限制迈阿密等城市的结果,并仅显示来自迈阿密的地点,我尝试使用经度和纬度,但不是每个城市都有一个常规区域

解决方案

表示有一个边界选项,并表示:


结果偏向于(但不限于)包含在这些范围内的地方。

如果这种偏好是可以接受的,而不是完全限制城市中的地方,那么你可以提供覆盖大部分城市或市中心或城市及周边地区的边界。

I have a problem with the autocomplete places of Google maps, I want to restrict the results by cities such as Miami, and show only places from Miami, I try using longitude and latitude, but not every city has a regular area

The docs for Autocomplete in the Places API indicates that there is a bounds option and says:

The results are biased towards, but not restricted to, Places contained within these bounds.

If that sort of biasing is acceptable, rather than an outright restriction to places in the city, then you can supply a bounds that covers most of the city or the city center or the city and surrounding area.

这篇关于自动完成Google Maps Place by Cities的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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