Tanvi
07-23-2008, 05:04 AM
I am building up an Windows application where I need to find place by giving Latitude and Longitute as an input through textboxes. I am using the GetLocation() method to find the places.
I have done this :
LatLong latlong = new LatLong();
latlong.Latitude =Convert.ToDouble(txtLat.Text);
latlong.Longitude = Convert.ToDouble(txtLong.Text);
//Define get info options object
GetInfoOptions options = new GetInfoOptions();
options.IncludeAllEntityTypes = false;
options.EntityTypesToReturn = new string[] { "PopulatedPlace" };
Location[] returnLocation;
returnLocation = findService.GetLocationInfo(latlong, cmbZone.Text, options);
//Get entity information
for (int i = 0; i < returnLocation.Length; i++)
{
MessageBox.Show(returnLocation[i].Entity.DisplayName);
}
But I am getting an error like this:
"The request failed with HTTP status 401: Unauthorized."
Please help me out.
I have done this :
LatLong latlong = new LatLong();
latlong.Latitude =Convert.ToDouble(txtLat.Text);
latlong.Longitude = Convert.ToDouble(txtLong.Text);
//Define get info options object
GetInfoOptions options = new GetInfoOptions();
options.IncludeAllEntityTypes = false;
options.EntityTypesToReturn = new string[] { "PopulatedPlace" };
Location[] returnLocation;
returnLocation = findService.GetLocationInfo(latlong, cmbZone.Text, options);
//Get entity information
for (int i = 0; i < returnLocation.Length; i++)
{
MessageBox.Show(returnLocation[i].Entity.DisplayName);
}
But I am getting an error like this:
"The request failed with HTTP status 401: Unauthorized."
Please help me out.