laptop and a wrench

Bug

Error displays when changing the MapResourceManager dynamically.

Zuletzt veröffentlicht: August 25, 2014 No Product Found
Bug-ID-Nummer NIM012578
EingereichtOctober 24, 2007
Zuletzt geändertJune 5, 2024
Gilt fürNo Product Found
Gefunden in Version9.2
ProgrammspracheC#
StatusWill Not Be Addressed

Zusätzliche Informationen

No Public Explanation

Workaround

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]); }

Schritte zur Reproduzierung

Bug-ID: NIM012578

Software:

  • No Product Found

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln