扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
//Add MapPoint namespace using MapPoint; |
//Define an application instance ApplicationClass app = null; //Create an application class instance app = new ApplicationClass(); |
//Now get the location FindResults frs = app.ActiveMap.FindAddressResults(" ", " ", string.Empty, "WA", "", null); |
//Get an enumerator IEnumerator ienum = frs.GetEnumerator(); //Loop through the enumerator while(ienum.MoveNext()) { Location loc = ienum.Current as Location; if(loc != null) { //process the location string s = loc.StreetAddress.Value; } } |
//Define an index object index = 1; //Access the location item using the accessor method location = frs.get_Item(ref index) as Location; |
//Quit the application if(app != null) app.Quit(); app = null; |
//Define an application instance ApplicationClass app = null; //Define a location instance Location location = null; //Define a FindResults instance FindResults frs = null; try { //Create an application class app = new ApplicationClass(); //Now get the location frs = app.ActiveMap.FindAddressResults(" ", " ", string.Empty, "WA", "", null); //Check if the find query is succesfull if(frs != null && frs.Count > 0) { object index = 1; location = frs.get_Item(ref index) as Location; //Male the MapPoint 2004 application visible //and go to that location app.Visible = true; location.GoTo(); //Do your processing with the location MessageBox.Show(location.StreetAddress.Value); } } catch(Exception ex) { string message = ex.Message; } finally { if(app != null) { try { app.Quit(); } catch { //This means your app has already quit! } finally { app = null; } } } |
DisplayDataMap([DataMapType], [DataField], [ShowDataBy], [CombineDataBy], [DataRangeType], [DataRangeOrder], [ColorScheme], [DataRangeCount], [ArrayOfCustomValues], [ArrayOfCustomNames], [DivideByField], [ArrayOfDataFieldLabels], [ArrayOfPushpinSymbols]) |
//Define a missing value type object missing = System.Reflection.Missing.Value; //Use the missing type for optional parameters that are not needed DataMap mydatamap = mydataset.DisplayDataMap(GeoDataMapType.geoDataMapTypeShadedArea, field, GeoShowDataBy.geoShowByRegion1, GeoCombineDataBy.geoCombineByDefault, GeoDataRangeType.geoRangeTypeDiscreteLogRanges, GeoDataRangeOrder.geoRangeOrderDefault, 15, 3, missing, missing, missing, missing, missing); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者