How do I limit Google Maps API's Search Box results to a country?

房东的猫 提交于 2019-12-23 19:24:04

问题


I don't want to use autocomplete, I want to limit search to a country using the Search Box (https://developers.google.com/maps/documentation/javascript/examples/places-searchbox)


回答1:


According to the reference, the only option is bounds. You could limit the result to the bounds of your country of interest.



来源:https://stackoverflow.com/questions/28372821/how-do-i-limit-google-maps-apis-search-box-results-to-a-country

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!