arcEngine部分hignlight重新整理問題

2021-08-02 12:17:13 字數 922 閱讀 6587

(一)使用mapcontrol.refresh()

(二)在選擇要素處使用

esri.arcgis.carto.ilayer layer = axmapcontrol1.get_layer(0);

esri.arcgis.carto.ifeatureselection selection = layer as esri.arcgis.carto.ifeatureselection;

esri.arcgis.geodatabase.iqueryfilter filter = new esri.arcgis.geodatabase.queryfilterclass();

filter.whereclause = "id in ('p0038', 'p0039')";//要高亮的feature的id

axmapcontrol1.activeview.partialrefresh(esri.arcgis.carto.esriviewdrawphase.esriviewgeoselection, layer, null);//重新整理feature所在的圖層

selection.clear();//清除以前的高亮

selection.selectfeatures(filter, esri.arcgis.carto.esriselectionresultenum.esriselectionresultnew, false);//新的高亮

axmapcontrol1.activeview.partialrefresh(esri.arcgis.carto.esriviewdrawphase.esriviewgeoselection, layer, null);//重新整理feature所在的圖層

需要注意的是,我在程式中呼叫了兩次partialrefresh(),這個不是多餘,因為要selection.clear()的前後分別執行一次partialrefresh(),才能清除以前的高亮

arcEngine部分重新整理問題

esri.arcgis.carto.ilayer layer axmapcontrol1.get layer 0 esri.arcgis.carto.ifeatureselection selection layer as esri.arcgis.carto.ifeatureselection es...

arcEngine部分重新整理問題

esri.arcgis.carto.ilayer layer axmapcontrol1.get layer 0 esri.arcgis.carto.ifeatureselection selection layer as esri.arcgis.carto.ifeatureselection es...

arcEngine 路徑規劃

作者 瘋狂的烏龜 2015 5 26 arcengine 10.1 功能 路徑規劃 using system using system.collections.generic using system.linq using system.text using esri.arcgis.geodatab...