Hi,
I have a problem when I put tooltips on my SymbolLayer.
I've seen this thread with similar issues:
http://community.infragistics.com/forums/p/48443/257341.aspx
I've tried putting ToolTip on the SymbolElement in different ways:
element.ToolTip = string.Format("Value: {0} ", value);
also with the suggested approach in the other thread
UCToolTip toolTip = new UCToolTip(name); //, bank, metricName, metricValue);
System.Windows.Controls.ToolTip myMapTip = new System.Windows.Controls.ToolTip();
element.ToolTip = myMapTip;
and also with my Own control MapTooltip.
When I zoom in and out on the map, using the mouse scroller, I get regulary a popup stating 'Object reference not set to instance of an object'.
If I comment out the assignment of the ToolTip on the element. I no longer get the popup stating this problem.
Any ideas how to fix these?
Hi Roel,
Here is a sample demo on how can SymbolElement's tooltip be set.XAML: <igMap:XamMap x:Name="map1"> <igMap:XamMap.Layers> <igMap:MapLayer x:Name="statesLayer" DataMapping="Name=CNTRY_NAME; ToolTip=PENETRATIONPERCENT" Imported="statesLayer_Imported"> <igMap:MapLayer.Reader> <igMap:ShapeFileReader Uri="Shapefiles/usa/usa_st" DataMapping="Name=STATE_NAME; Value=POP1997; Caption=STATE_ABBR"/> </igMap:MapLayer.Reader> </igMap:MapLayer> </igMap:XamMap.Layers> </igMap:XamMap>CB:private void statesLayer_Imported(object sender, Infragistics.Controls.Maps.MapLayerImportEventArgs e) { if (e.Action == Infragistics.Controls.Maps.MapLayerImportAction.End) { Point origin = map1.MapProjection.ProjectToMap(new Point(-101.6015625, 42.032974332441405)); SymbolElement element = new SymbolElement() { SymbolOrigin = origin, Caption = "Marker", SymbolType = MapSymbolType.Diamond, SymbolSize = 20 };
string value = "NE"; element.ToolTip = string.Format("Value: {0} ", value);
map1.Layers[0].Elements.Add(element); } }Is this the same approach you are using?
Best regards,Milana Zhileva
I was using another approach
I have two layers, a shp file layer and a symbolLayer
The mapLayer itself is a symbolLayer, so I was not using MapLayerImported event.
I just add elements to the ElementCollection
like this:
control.xamMap.Layers["symbolLayer"].Elements = elementCollection;
Here the elements already have the tooltips set.
I've tried to have it working with the MapLayerImported event (attached to the shp file layer) and then adding the elements (which have tooltips assigned), but I had the same error.
I noticed another thing:
You only get the exception when you zoom in on a symbolelement which has a tooltip associated on it. (so put your cursor on the point, and zoom in or out before the tooltip appears). The SymbolElement I am using is a custom png file.
You do not get the exception when you zoom in on the shape file or on the basemap.
Let me know if this is enough information.
Are you using the latest service release? The issue you are experiencing resembles one that has already been fixed in one of our previous SRs.
Hi Milana,
The version I'm currently trying out is a trial version.
10.3.20103.1006
Since we are still evaluating: is it possible to download a service release this way?
I don't find anything to download under "service releases"
Haven't found the time yet to make a solution for reproduction. Will update you when I have time.
Would you please provide us with a sample application (or a piece of code) where your issue is reproducable, so that we can investigate it?
Thanks,Milana Zhileva
I uninstalled Infragistics NetAdvantage and installed the full netadvantage trial again. After that I installed the service release. Now it works.
Previously I think I had a mixup of the (xammap product only release and the service release for the full netadvantage which messed up).
Coming back to the issue when zooming in on a dot with a pushpin: The problem is a lot harder to reproduce. I get it still sometimes but not consistently anymore.(object reference not set....)
Any idea?
Also, the navigation on the map with ~200 SymbolElements (png files) seems slower than before. I thought there were performance improvements in this service release?!
With the current performance it will be quite hard to sell to the client. They were used to Bing Maps with ~5000 symbolelements rendering quite fluently. If I remove the SymbolElements and only add the shapefile (<100 polygons) the performance is good.
Looking forward to your answer,
Roel
Hi Roel,I tried to reproduce the issue but I wasn't able to do it. The dlls should be located at the same place since the convertion to the latest SR only changes their version.
Please, contact our Developers Support team by the customer support case that have been created for you in order to get further assistance on resolving the issue.
Feel free to post back if you need more information.
I received the service release (thanks for this) but when I install, I don't have a dll anymore for the XamMap. Previously there was a seperate dll for this map.