Engine中如何设置pagelayout上的多个数据框的地图显示比例mapscale?

在一个pagelayout对象里放两个Map,如何获取其比例尺,并且让两个map的比例尺一样?
已邀请:

刘峥 - ArcGIS多面手

赞同来自:

【解决办法】:

double presetscale; 
string path; 
IMapDocument mapDocument = new MapDocumentClass(); 
mapDocument.Open(path, ); 

//set first map scale 
IPageLayout pageLayout = mapDocument.PageLayout; 
IActiveView activeView = (IActiveView)pageLayout; 
IMap map = activeView.FocusMap; 

activeView = (IActiveView)mapDocument.PageLayout; 
activeView.Activate(GetDesktopWindow()); 

map.MapScale = presetscale; 
activeView.Refresh(); 

//set next map scale 
pageLayout.FocusNextMapFrame(); 
pageLayout = mapDocument.PageLayout; 
activeView = (IActiveView)pageLayout; 
map = activeView.FocusMap; 

activeView = (IActiveView)mapDocument.PageLayout; 
activeView.Activate(GetDesktopWindow()); 

map.MapScale = presetscale; 
activeView.Refresh(); 

mapDocument.Save(true, true);

要回复问题请先登录注册