GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Reverse Geocode FindNearestAddress  XML
Forum Index -> General
Author Message
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!
mcupryk



Joined: 22/02/2011 05:04:53
Messages: 4
Offline

use var address
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team