ClearSelectedMapFeatures 接口的使用? 5C
 public void ClearSelectedMapFeatures(ESRI.ArcGIS.Carto.IActiveView activeView, ESRI.ArcGIS.Carto.IFeatureLayer featureLayer)
        {
            if (activeView == null || featureLayer == null)
            {
                return;
            }
            ESRI.ArcGIS.Carto.IFeatureSelection featureSelection = featureLayer as ESRI.ArcGIS.Carto.IFeatureSelection; // Dynamic Cast

            // Invalidate only the selection cache. Flag the original selection
            activeView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);

            // Clear the selection
            featureSelection.Clear();

            // Flag the new selection
            activeView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);
        }

看到官方给的清除地图已选元素,但是不知道这个接口要怎么用?
函数的两个实参要怎么写呢?比如我要在一个mousedown函数里调用这个接口,具体实参应该写什么呢?
不是很理解两个参数的含义,有哪位大神可以帮忙解答下?

5个回答

OIOPHLK MBJLK sS

        if (activeView == null || featureLayer == null)
        {
            return;
        }
        ESRI.ArcGIS.Carto.IFeatureSelection featureSelection = featureLayer as ESRI.ArcGIS.Carto.IFeatureSelection; // Dynamic Cast

        // Invalidate only the selection cache. Flag the original selection
        activeView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);

if (activeView == null || featureLayer == null)
{
return;
}
ESRI.ArcGIS.Carto.IFeatureSelection featureSelection = featureLayer as ESRI.ArcGIS.Carto.IFeatureSelection; // Dynamic Cast

    // Invalidate only the selection cache. Flag the original selection
    activeView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);

JHDSJDHJHFUIASDHR5FWSUG6YGT65TG5HG654YVHTC65CYHGDCZDCWWEDC

????????????????????????????????

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问