检索给定位置的半径?

时间:2013-10-31 13:06:55

标签: google-maps google-api google-places-api

有没有办法使用google API检索给定位置的半径?

我想使用上述信息,以便当用户执行与某个位置相关的搜索时,我可以根据位置的大小设置距离半径,而不是在所有搜索中都有固定的半径。

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

Google Places API response in the Google Maps Javascript API v3包含viewport,其中包含:

viewport | LatLngBounds | The preferred viewport when displaying this Place on a map. This property will be null if the preferred viewport for the Place is not known.

如果您需要或者直接作为要搜索的区域,可用于计算半径。

相关问题