laptop and a wrench

Bug

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

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM036207
SubmittedJune 18, 2008
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.3
Program languageC#
Version FixedN/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 })); }*********************************************************

Steps to Reproduce

Bug ID: NIM036207

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options