C# SDK

◆ GetAddressList()

static int GetAddressList ( out SError  Error,
string  strAddress,
bool  bPostal,
int  nMaxCount,
out SWayPoint []  List,
Int32  MaxTime 
)
inlinestatic

The function returns list of founded items from NameHierarchy.

Parameters
ErrorAdditional error information returned from DriveMe.
strAddressAddress in format "Country,City/ ZIP,Street"
bPostalFlag determining whether City parameter represents city or ZIP code.
true - ZIP code.
false - City.
nMaxCountMaximum count of founded items.
ListArray of SWayPoint which contains retrieved items.
MaxTimeMaximum time (in milliseconds) function can take. If MaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

Possible error codes returned from Drive are:

  • 0 - Function not succeeded.
  • 1 - Function succeeded.
  • 2 - Drive not succeeded.
  • 3 - Function reached timeout.



SError err;
SWayPoint[] list;
string strAddress = "Slovakia,Bratislava,Koz";
if (CApplicationAPI.GetAddressList(out err, strAddress, false, 100, out list, 0) != 1)
{
MessageBox.Show( err.GetDescription() );
}
/*
for example:
string strAddress = "Slovakia,Brat";
function return array of cities
Location = {0,0} GetAddress() = Bratislava
Location = {0,0} GetAddress() = Bratislava - �unovo
Location = {0,0} GetAddress() = Bratislava - Dev�n
Location = {0,0} GetAddress() = Bratislava - Dev�nska Nov� Ves
Location = {0,0} GetAddress() = Bratislava - D�bravka
Location = {0,0} GetAddress() = Bratislava - Jarovce
Location = {0,0} GetAddress() = Bratislava - Karlova Ves
Location = {0,0} GetAddress() = Bratislava - Lama�
Location = {0,0} GetAddress() = Bratislava - Nov� Mesto
Location = {0,0} GetAddress() = Bratislava - Petr�alka
Location = {0,0} GetAddress() = Bratislava - Podunajsk� Biskupice
Location = {0,0} GetAddress() = Bratislava - Ra�a
Location = {0,0} GetAddress() = Bratislava - Rusovce
Location = {0,0} GetAddress() = Bratislava - Ru�inov
Location = {0,0} GetAddress() = Bratislava - Star� Mesto
Location = {0,0} GetAddress() = Bratislava - Vajnory
Location = {0,0} GetAddress() = Bratislava - Vraku�a
Location = {0,0} GetAddress() = Bratislava - Z�horsk� Bystrica
Location = {0,0} GetAddress() = Most Pri Bratislave
string strAddress = "Slovakia,Bratislava,Koz";
function return array of streets
Location = {1265212,5349795} GetAddress() = Kozia
Location = {1255883,5352644} GetAddress() = Kozi�ova
Location = {1269423,5351573} GetAddress() = Kozmonautick�
Location = {1267815,5340703} GetAddress() = Ko�u�n�cka
or if string strAddress = "Slovakia,Bratislava,Kozia";
function return array of house numbers
Location = {1265212,5349795} GetAddress() = Any
Location = {1265415,5349649} GetAddress() = 11 - 7
Location = {1265323,5349716} GetAddress() = 21 - 13
Location = {1265212,5349795} GetAddress() = 29 - 23
*/

References SError.SizeOf().