Geolocation Yahoo Placefinder API-city返回它不应该返回的邻居';T

Geolocation Yahoo Placefinder API-city返回它不应该返回的邻居';T,geolocation,geocoding,yahoo-api,yahoo-maps,Geolocation,Geocoding,Yahoo Api,Yahoo Maps,我想使用Yahoo Placefinder API进行城市输入(自动建议)的用户注册。基于我可以向以下GET请求: http://where.yahooapis.com/geocode?city=falenty&country=poland&appid=yourappid 如果您将其放在浏览器中,它将为您提供一些XML: ... <line1/> <line2>05-090 Falenty</line2> <line3/> <

我想使用Yahoo Placefinder API进行城市输入(自动建议)的用户注册。基于我可以向以下GET请求:

http://where.yahooapis.com/geocode?city=falenty&country=poland&appid=yourappid
如果您将其放在浏览器中,它将为您提供一些XML:

...
<line1/>
<line2>05-090 Falenty</line2>
<line3/>
<line4>Poland</line4>
<house/>
<street/>
<xstreet/>
<unittype/>
<unit/>
<postal>05-090</postal>
<neighborhood>Falenty</neighborhood>
<city>Raszyn</city>
<county>Pruszkow County</county>
...
。。。
05-090法兰蒂
波兰
05-090
虚假的
拉辛
普鲁斯科夫县
...
但如果我是按城市搜索,我不想按社区搜索。如果没有这个名字的城市,我不想得到任何结果

有没有人知道这是否可行,或者我是否需要循环搜索结果并排除城市与URI中发送的结果不同的结果?这不是一个优雅的解决方案,因为有时它会给我10个以上的结果,甚至不是我搜索的城市的1个