PDA

View Full Version : GetLocationInfo throws an exception



Pratibha_Pillai
03-20-2009, 01:27 AM
Hi,

I am new to Mappoint web service.My requirement is to get address like city,state,country given the latitude and longitude values.Thus i made use of GetLocationInfo .....but it throws a web exception ...I don't knw whats really the issue.Please help me in resolving this issue.

FindServiceSoap findService = new FindServiceSoap();
LatLong myLatLong = new LatLong();
myLatLong.Latitude = 47.682;
myLatLong.Longitude = -122.132;

Location[] returnedLocations;
returnedLocations = findService.GetLocationInfo(myLatLong, "MapPoint.NA", null); //Throws a Web exception

for(int i = 0; i < returnedLocations.Length; i++)
{
Console.WriteLine(returnedLocations[i].Entity.DisplayName);
}

Thanks in advance.

Eric Frost
03-20-2009, 09:05 AM
I don't know.. looks correct. That's exactly what's in the documentation.

Can you get anything to work?

I'd recommend to start back at the beginning and make sure your credentials and references are correct.

Getting Started with the MapPoint Web Service SDK (http://msdn.microsoft.com/en-us/library/cc534850.aspx)

Eric