http://blog.csdn.net/zdb330906531
设置左边和右边的地图分别为axMapLeft、axMapRight,在平移的时候出现联动效果。
要实现联动效果,需要使用OnViewRefreshed事件,关键代码
private void axMapLeft_OnViewRefreshed(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnViewRefreshedEvent e)
{
axMapRight.Extent = axMapLeft.Extent;
axMapRight.ActiveView.Refresh();
}
实现这一步,可以使右边的地图跟随左边的地图联动,如果需要左边的地图也跟随右边的地图联动的话,怎么做呢?
1、判断当前鼠标在哪个地图中,并且标识
2、根据标识,选择相应的联动
private string mapName = string.Empty;
private void axMapLe