laptop and a wrench

Erro

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

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM036207
EnviadoJune 18, 2008
Última ModificaçãoJune 5, 2024
Aplica-se àNo Product Found
Versão encontrada9.3
Idioma do programaC#
Versão FixaN/A
StatusFixed

Solução Provisória

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

Etapas para Reproduzir

ID do Erro: NIM036207

Software:

  • No Product Found

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download