laptop and a wrench

漏洞

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

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM036207
已提交June 18, 2008
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.3
编程语言C#
修正版本N/A
状态Fixed

解决办法

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

重现步骤

漏洞 ID: NIM036207

软件:

  • No Product Found

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项