[英]How can I get the multiple address list(Geocoding) from search a location using here maps api
I want to get multiple address when I search a location. 搜索位置时,我想获得多个地址。 It will be like "here maps" app.
就像“这里地图”的应用程序。 I am using the here maps api.
我正在使用here maps api。 I only get one or two location when I use the this api
使用此api时,我只会得到一两个位置
" http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&mode=retrieveAddresses&gen=7&searchtext=dhaka " “ http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&mode=retrieveAddresses&gen=7&searchtext=dhaka ”
But I need more results like 10 or 20 that will be defined by me. 但是我需要更多由我定义的结果,例如10或20。 I try a lot but not get any solution.
我尝试了很多但没有任何解决方案。 like "maxresults=10" parameter.
例如“ maxresults = 10”参数。
NB: I want to use only one api call and must use the here maps api and also for windows phone 8 app. 注意:我只想使用一个api调用,并且必须使用here maps api以及Windows Phone 8应用程序。
Thanks 谢谢
To obtain the location of an address, you need to make a geocoding request: 要获取地址的位置,您需要发出地理编码请求:
http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id= YOUR_APPID &app_code= YOUR_APP_CODE &mode=retrieveAreas&gen=7&searchtext= TEXT &locationattributes=none http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id= YOUR_APPID &app_code = YOUR_APP_CODE &mode = retrieveAreas&gen = 7&searchtext = TEXT &locationattributes = none
The important parameters are as follows: 重要参数如下:
mode=retrieveAreas
- this will return areas not addresses mode=retrieveAreas
这将返回区域而不是地址 searchtext=?
- this is your text request locationattributes=none
- this reduces the size of the response to only return a lat/lng locationattributes=none
这会减小响应的大小,只返回lat / lng Thereafter you need to make a reverse geocoding request to find cities nearby: 之后,您需要进行反向地理编码请求以查找附近的城市:
http://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.xml?level=city&minresults=10&prox=23.713,90.399,1000&mode=retrieveAreas&gen=8&app_id= YOUR_APPID &app_code= YOUR_APP_CODE http://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.xml?level=city&minresults=10&prox=23.713,90.399,1000&mode=retrieveAreas&gen=8&app_id= YOUR_APPID &app_code = YOUR_APP_CODE
The important parameters here are as follows: 这里的重要参数如下:
mode=retrieveAreas
- this will return areas not addresses mode=retrieveAreas
这将返回区域而不是地址 level=?
- this reduces the responses to a given level - in this case cities - see the API reference for details minresults=?
- this ensures that ten city level entities are returned. Maybe you are looking for more like suggestions ? 也许您在寻找更喜欢的建议? Places API from HERE might be more helpful in that case, but usually an "at" attribute is required for that
在这种情况下,HERE的Places API可能会更有用,但是通常需要“ at”属性
http://places.demo.api.here.com/places/v1/suggest?at=23.6364%2C91.0803&q=Dhaka&app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg http://places.demo.api.here.com/places/v1/suggest?at=23.6364%2C91.0803&q=Dhaka&app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.