预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共16页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingESRI.ArcGIS.AnalysisTools; usingESRI.ArcGIS.Analyst3D; usingESRI.ArcGIS.Carto; usingESRI.ArcGIS.Controls; usingESRI.ArcGIS.Display; usingESRI.ArcGIS.DisplayUI; usingESRI.ArcGIS.esriSystem; usingESRI.ArcGIS.Geodatabase; usingESRI.ArcGIS.Geometry; usingESRI.ArcGIS.GlobeCore; usingESRI.ArcGIS.Output; usingESRI.ArcGIS.SystemUI; usingESRI.ArcGIS.DataSourcesRaster; usingESRI.ArcGIS.DataSourcesRasterUI; usingSystem.Windows.Forms; usingSystem.Drawing; usingESRI.ArcGIS.DataSourcesFile; namespaceAEExercise { publicclassGeoMapLoad { publicstaticIMapDocumentpMapDocument;//定义地图文档接口变量 publicstaticintcount=0; publicstaticIRgbColorpColor;//设置颜色 publicstaticstringtext="空";//标注内容 publicstaticvoidCreateMeasuredGrid(AxPageLayoutControlaxPageLayoutControl1) { //设置格网点 ISnapGridpSnapGrid; IPageLayoutpPageLayout=axPageLayoutControl1.PageLayout; pSnapGrid=pPageLayout.SnapGrid;//获取PageLayout的SnapGrid对象 pSnapGrid.VerticalSpacing=2;//设置垂直间距 pSnapGrid.HorizontalSpacing=1; pSnapGrid.IsVisible=true;//设置为可见 axPageLayoutControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics,null,null); } publicstaticvoidoperatePageLayout(AxPageLayoutControlaxPageLayoutControl1,stringopt,IEnvelopepEnv,intstrBarType=0) { switch(opt) { case"AddScale": { if(count>0) return; IScaleBarpScaleBar; IMapFramepMapFrame; IMapSurroundFramepMapSurroundFrame; IMapSurroundpMapSurround; IElementPropertiespElementPro; //产生一个UID对象,使用它产生不同的MapSurround对象􁇍􄈵 UIDpUID=newUIDClass(); pUID.Value="esriCarto.scalebar"; IPageLayoutpPageLayout; pPageLayout=axPageLayoutControl1.PageLayout; IGraphicsContainerpGraphicsContainer; pGraphicsContainer=pPageLayoutasIGraphicsContainer; IActiveViewpActiveView; pActiveView=pGraphicsContainerasIActiveView; IMappMap; pMap=pActiveView.FocusMap; //获得于地图相关的MapFrame pMapFrame=pGraphicsContainer.FindFrame(pMap)asIMapFrame; //产生MapsurroundFrame pMapSurroundFrame=pMapFrame.CreateSurroundFrame(pUID,null); //依据传入参