Esempio n. 1
0
        private void mainMapControl_OnViewRefreshed(object sender, IMapControlEvents2_OnViewRefreshedEvent e)
        {
            var visiblelayers   = LayerUtil.GetVisibleLayers(mainMapControl.Map);
            var nowvisiblecount = visiblelayers.Count();

            if (nowvisiblecount != _visibleLayerCount)//可见图层变化重新加载目标图层
            {
                createFeatureControl1.RefreshTreeListData();
            }
            if (nowvisiblecount == 0)
            {
                TargetLayerChanged(new TargetLayerChangedEvent(null));
            }
            _visibleLayerCount = nowvisiblecount;
        }