Sunday 16 May 2010

WP7 and CivicAddressResolver

After having a play with some of the different namespaces and classes within a WP7 project, I tried the CivicAddressResolver.

The following code was taken from Mike Taulty's UK TechDays presentation :-

CivicAddressResolver resolver = new CivicAddressResolver();
GeoCoordinate location = new GeoCoordinate(40.71448, -74.00734);

resolver.ResolveAddressCompleted += (sender, args) =>
{
if (args.Error == null)
{
string line1 = args.Address.AddressLine1;
string line2 = args.Address.AddressLine2;
string city = args.Address.City;
}
};

resolver.ResolveAddressAsync(location);

Currently the ResolveAddress and ResolveAddressAsync methods are not implemented, as detailed in the following forum post :-
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/110ed7a5-d734-4d5c-937d-f0a29334c7e8

No comments:

Post a Comment