laptop and a wrench

漏洞

Error displays when changing the MapResourceManager dynamically.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM012578
已提交October 24, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
编程语言C#
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

1)Change the "ImageBlendingMode" property of the map control to "WebTier" and remove the “GraphicsLayer” resource from the MapResourceManager2. The MapResourceManager2 should contain only one resource Item. However after changing to MapResourceManager2 you will still encounter the problem of the cache levels from Europe preventing the Continent map from being zoomed out to view the continent map.2)The following code works well. It not only takes care of more than 1 resourceitem in MapResourceManager2 but also avoid setting the ImageBlendingMode property to “webtier”. In addition the cache levels from Mapresourcemanager1 does not lock the map scale.private void swapResourceItems(MapResourceManager mrm1, MapResourceManager mrm2) { // make a copy of the resource items in mrm1 and mrm2 MapResourceItem[] mriArray = new MapResourceItem[mrm1.ResourceItems.Count]; mrm1.ResourceItems.CopyTo(mriArray, 0); MapResourceItem[] mriArray2 = new MapResourceItem[mrm2.ResourceItems.Count]; mrm2.ResourceItems.CopyTo(mriArray2, 0); // copy the items from mrm2 to mrm1, then remove mrm1's current items // (must add items first; if no items remain, removing the last one causes // an exception when the disposal of the resource item is attempted) MapResourceItem mriTemp; foreach (MapResourceItem mri in mrm2.ResourceItems) { mrm1.ResourceItems.Add(mri); } // Note: use .Remove, not .RemoveAt (RemoveAt does not call the OnResourceItemRemoved // event; that event adds a callback result that tells the browser to remove // the resource--without it, get an error when re-add the old resource name) for (int i = 0; i < mriArray.Length; i++) mrm1.ResourceItems.Remove(mriArray[i]); // copy the items from the temporary collection to mrm2, using the // same method as for mrm1 foreach (MapResourceItem mri in mriArray) mrm2.ResourceItems.Add(mri); for (int i = 0; i < mriArray2.Length; i++) mrm2.ResourceItems.Remove(mriArray2[i]); }

重现步骤

漏洞 ID: NIM012578

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项