Google maps api search returns unexpected results

自古美人都是妖i 提交于 2019-12-13 01:29:54

问题


Using the example code at: https://developers.google.com/maps/documentation/javascript/examples/places-searchbox

I find that when I type: DePaul University and then choose the third one: DePaul University, North Kenmore Avenue, Chicago, IL, United States

it actually returns me a place named "The Theater School at DePaul University" where I would prefer getting just "DePaul University" which was what was bolded in the textbox.

Also when I type: Herzing University and then choose: Herzing University Madison, Madison, WI, United States

It returns me many places... many of them hotels around the university. (???)


回答1:


Use the Places-Autocomplete instead



来源:https://stackoverflow.com/questions/24894513/google-maps-api-search-returns-unexpected-results

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