Hi!I'm new to programming with this API and I'm trying to add MapTip's dynamically where the user clicks.I want to do everything in the code-behind since I'm working with the viewer and can't initialize any new maps in the XAML.Here's what I got so far, code is executed in the order below:Creating the layer:GraphicsLayer mapTipLayer = new GraphicsLayer(); mapTipLayer.ID = "mapTipLayer"; MapApplication.Current.Map.Layers.Add(mapTipLayer); MapApplication.SetLayerName(mapTipLayer, "MapTip Layer");
Setting a DefaultSymbol where the user clicks:ESRI.ArcGIS.Client.Graphic g = new ESRI.ArcGIS.Client.Graphic() { Geometry = mapPoint, Symbol = LayoutRoot.Resources["DefaultMapTipSymbol"] as Symbol, }; mapTipLayer.Graphics.Add(g);Everything works fine so far, the problems start when I try to use the MapTip-class. The graphic I addshows up but there's no hover function that displays anything.ESRI.ArcGIS.Client.Toolkit.MapTip mapTip = new ESRI.ArcGIS.Client.Toolkit.MapTip(); mapTip.GraphicsLayer = mapTipLayer; mapTip.Title = "Some content"; mapTipLayer.MapTip = mapTip;
Am I doing it in the wrong order? Am I missing something? If I understood the API reference correctly this should be enough to display a MapTip. Should I add all MapTips before I add the layer to the current map? Should I use a FeatureLayer instead?I've also tried this instead for the first code block:mapTipLayer = new GraphicsLayer(); mapTipLayer.ID = "mapTipLayer"; mapTipLayer.MapTip = new ESRI.ArcGIS.Client.Toolkit.MapTip() { Title = "test" }; MapApplication.Current.Map.Layers.Add(mapTipLayer); MapApplication.SetLayerName(mapTipLayer, "MapTip Layer");Any suggestions, tips or references to similiar problems would be greatly appreciated.RegardsJohan Carlsson