laptop and a wrench

Error

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

Última publicación: August 25, 2014 No Product Found
Número de ID del error NIM036207
EnviadoJune 18, 2008
Última modificaciónJune 5, 2024
Relacionado conNo Product Found
Versión encontrada9.3
Lenguaje del programaC#
Versión corregidaN/A
EstadoFixed

Solución alternativa

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

Pasos para reproducir

ID del error: NIM036207

Software:

  • No Product Found

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga