PartialRefresh方法是部分刷新,效率方面比单纯的Refresh方法高很多。调用Refresh总是绘画毎一个对象。这是非常低效的。所以应该多使用PartialRefresh方法而少用Refresh。

刷新图层:
pMap.PartialRefresh(esriViewGeography, pLayer, null);

刷新所有图层:
pMap.PartialRefresh(esriViewGeography, null, null);

刷新所选择的对象:
pMap.PartialRefresh(esriViewGeoSelection, null, null);

刷新标注:
pMap.PartialRefresh(esriViewGraphics, null, null);

刷新图元
pLayout.PartialRefresh(esriViewGraphics, pElement, null);

刷新所有图元
pLayout.PartialRefresh(esriViewGraphics, null, null);

刷新所选择的图元
pLayout.PartialRefresh(esriViewGraphicSelection, null, null);

特殊的对于清除选择集,要在清除前后均进行一次刷新

void ClearSelectedMapFeatures(ESRI.ArcGIS.Carto.IActiveView activeView, ESRI.ArcGIS.Carto.IFeatureLayer featureLayer)
   2: {
null)
   4:   {
return;
   6:   }
// Dynamic Cast
// Invalidate only the selection cache. Flag the original selection
null);
// Clear the selection
  11:   featureSelection.Clear();
// Flag the new selection
null);
  14: }

相关文章:

  • 2021-03-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案