The following code shows how to parse a string into a valid address:
//Create an instance of the MapPoint application class
MapPoint.ApplicationClass app = new MapPoint.ApplicationClass();
//Get the Map object from the application object
MapPoint.Map map = app.ActiveMap;
//Parse the address
MapPoint.StreetAddress address =
map.ParseStreetAddress("498 Broad St, Seattle, WA, 98109");
//Now get the values from the
//StreetAddress properties
string streetName = address.Street;
string city = address.City;
To learn more about this topic and other related topics, please buy
Programming MapPoint in .NET
0 comments
Post a Comment