How to return results for incomplete strings on Nokia Here Maps API?

房东的猫 提交于 2019-12-13 19:26:57

问题


I'm building an application that relies on Here Maps Geocoder API to fetch results based on partial/incomplete strings, in order to give autocomplete suggestions to the user as they start typing something in the search box.

Acording to their documentation, the street field in the query doesnt need to be an exact one, so I expect if i type half the name of the street i would get suggestions for it.

Example street name: Zhibek-Zholy, Almaty, Kazakhstan:

With partial street name Zhib, INCLUDING city name:

It gives no results.

http://geocoder.cit.api.here.com/6.2/geocode.json?prox=43.260204,76.914597,30000&searchtext=Zhib, Almaty&country=KAZ&app_id=MY_APP_ID&app_code=MY_APP_CODE&gen=8&maxresult=100&language=en

With partial street name Zhib, EXCLUDING city name:

It gives no results.

http://geocoder.cit.api.here.com/6.2/geocode.json?prox=43.260204,76.914597,30000&searchtext=Zhib&country=KAZ&app_id=MY_APP_ID&app_code=MY_APP_CODE&gen=8&maxresult=100&language=en

With full street name Zhibek-Zholy, including city name:

It gives me the address.

http://geocoder.cit.api.here.com/6.2/geocode.json?prox=43.260204,76.914597,30000&searchtext=Zhibek-Zholy, Almaty&country=KAZ&app_id=MY_APP_ID&app_code=MY_APP_CODE&gen=8&maxresult=100&language=en

Expected behavior:

So, for an autocomplete feature, i should be able to fetch results on a partial match, but this does not seem to be the case with the API.

Anybody has been through the same problem?


回答1:


The HERE Geocoder API doesn't offer an autocomplete feature. We have a separate API in BETA for this. Happy to provide you access to this in return for feedback how you like it. Philip (PM for HERE Geocoder)

img taken from demo tool



来源:https://stackoverflow.com/questions/31323709/how-to-return-results-for-incomplete-strings-on-nokia-here-maps-api

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