开发者

getFromLocationName() can't find streets in Android

I have this method that get's the street names for Ambassy's out of a XML file and shows them on the map.

This is the method that I'm using:

locatie = gc.getFromLocationName(gevondenland.getAdresamba(),5);

and I open an MapActivity with the location (locatie) i get.

This does work, but only for some countries.

Here is a sample from the XML file:

<land>
   <naam>Angola</naam>
   <code>AO</code>
   <politie>110</politie>
   <ambulance>118</ambulance>
   <brandweer>118</brandweer>
   <telamba>00244222310686</telamba>
   <adresamba>Edificio Secil, Avenida 4 de Fevereiro 42-6� en 10�, Luanda</adresamba>
</land>
<land>
   <naam>Antigua en Barbuda</naam>
   <code>AG</code>
   <politie>911</politie>
   <ambulance>911</ambulance>
   <brandweer>911</brandweer>
   <telamba>00126848118开发者_Python百科57</telamba>
   <adresamba>High Street, Sint John�s, Antigua</adresamba>
</land>
<land>
   <naam>Argentini�</naam>
   <code>AR</code>
   <politie>101</politie>
   <ambulance>107</ambulance>
   <brandweer>100</brandweer>
   <telamba>00541143380050</telamba>
   <adresamba>Edificio Porte�o II, Olga Cossettini 831, piso 3, Buenos Aires</adresamba>
</land>

Antigua en Barbuda works, but Argentinia and Angola don't.

When I search the exact same address on Google Maps, it finds it.

What can be the reason it can't find the addresses in Android?


For your first address line (Angola) I don't get a loaction on google maps. I had to remove Edificio Secil, and the street numbers from the string to get an result.

To me, the problem is not related to countries but to the content of the adress strings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜