laptop and a wrench

Bug

The MapTips control does not work as expected when MapTips for different layers are switched at the runtime programmatically.

Zuletzt veröffentlicht: August 25, 2014 No Product Found
Bug-ID-Nummer NIM036207
EingereichtJune 18, 2008
Zuletzt geändertJune 5, 2024
Gilt fürNo Product Found
Gefunden in Version9.3
ProgrammspracheC#
Behoben in VersionN/A
StatusFixed

Workaround

Derek on 7\1\8 - Here is an alternative work around that can be added to the test application.// Get the MapTips' resource item from the MapResourceManagerMapResourceItem mapResourceItem = Map1.MapResourceManagerInstance.ResourceItems.Find(MapTips1.ResourceName);// Create a dictionary to store the IDs and LayerFormats of the layers in the MapTips' resourceSystem.Collections.Generic.Dictionary<string, LayerFormat> layerFormatDictionary = new System.Collections.Generic.Dictionary<string, LayerFormat>();// Iterate through the resource's layer definitions and add each one's ID and LayerFormat to the// dictionaryforeach (LayerDefinition layerDefinition in mapResourceItem.LayerDefinitions) layerFormatDictionary.Add(layerDefinition.ID, layerDefinition.LayerFormat);// Set the resource's layer definitions to null to force full re-initializationmapResourceItem.LayerDefinitions = null;// Since the re-initialization will revert the layers to their default LayerFormats, explicitly// re-apply the stored LayerFormatsforeach (string layerID in layerFormatDictionary.Keys) mapResourceItem.LayerDefinitions[layerID].LayerFormat = layerFormatDictionary[layerID]; MapTips1.RefreshMapTips();Map1.RefreshResource(MapTips1.ResourceName); --------------------------------------Original work around from Support:In the meantime, you can emulate what the MapTips control does by managing graphics layers explicitly. Please see Common _AddGraphics sample for the workaround. In the sample code, add the following code to remove a graphicslayer from the client side and this code can go right before graphicsMapFunctionality.GraphicsDataSet.Tables.Clear() is called. ************************************************************if (graphicsMapFunctionality.GraphicsDataSet.Tables.Count > 0) { ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsLayer oldFeatureGraphicsLayer = (ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsLayer)graphicsMapFunctionality.GraphicsDataSet.Tables[0]; string oldGraphicsClientID = Map1.GetGraphicsLayerClientID(oldFeatureGraphicsLayer).Replace(Map1.ID + "_", ""); Map1.CallbackResults.Add(new CallbackResult(Map1, "removeGraphicsLayer", new object[] { oldGraphicsClientID })); }*********************************************************

Schritte zur Reproduzierung

Bug-ID: NIM036207

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