Get Zip code from Address?

Topics: Help
Dec 28, 2011 at 4:34 PM

Hi, I am looking for a way to put mapping in my application, so this looks like it is a great control for doing that.  I was wondering though if there was any way to use this control to get the zip code from an address.  In addition to mapping I want to be able to complete the zip code field without showing a map and thought that it would be something that this control might be able to provide.

 

Thanks,

Coordinator
Jan 9, 2012 at 11:40 AM

List<Placemark> plc = null;
var st = GMapProviders.GoogleMap.GetPlacemarks(new PointLatLng(54.6961334816182, 25.2985095977782), out plc);
if(st == GeoCoderStatusCode.G_GEO_SUCCESS && plc != null)
{
foreach(var pl in plc)
{
if(!string.IsNullOrEmpty(pl.PostalCodeNumber))
{
Debug.WriteLine("Accuracy: " + pl.Accuracy + ", " + pl.Address + ", PostalCodeNumber: " + pl.PostalCodeNumber);
}
}
}