mil23
Joined: 18/05/2009 20:38:17
Messages: 1
Offline
|
Hello,
I have a mobile device where I am trying to develop an app that takes a photo, gets the GPS location, and returns an address on where I am or where the picture was taken. I have added Myren.GeoNames.Client.dll into my Visual Studio project and I have the following:
String Latitude = "40.68913";
String Longitude = "-74.0446";
String Address = getAddress(Latitude, Longitude);
private String getAddress(String Latitude, String Longitude)
{
String address = "";
address = client.FindNearestAddress(Double.Parse(Latitude),Double.Parse(Longitude)).Address;
return (address);
}
which gives me a compilation address: Cannot implicitly convert type 'Myren.GeoNames.Client.GeoStreetAddressResponse' to 'string'
when I have :
address = client.FindNearestAddress(Double.Parse(Latitude),Double.Parse(Longitude)).Address.ToString();
which gives me NullReferenceEception error
Can somebody please tell me what type does .Address return or maybe what I am missing in order to get this to work.
Are there any other libraries that I have to add to my project, or do i have to download anything else. Or any other usefull information on FindNearestAddress would help
Thanks!
|