Select to view content in your preferred language

Maptips throwing errors

721
3
12-06-2011 12:03 PM
Yen-ShengPan
Emerging Contributor
I'm trying to bind a different maptip to each of my graphics that I have but sometimes i get this error when I mouse over the graphic in my map.

Value does not fall within the expected range.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
   at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh)
   at System.Windows.Controls.Primitives.Popup.set_Child(UIElement value)
   at ESRI.ArcGIS.Client.GraphicsLayer.element_MouseHover(Object sender, Graphic g, MouseEventArgs e)
   at ESRI.ArcGIS.Client.Symbols.GraphicElement.hoverTimer_Tick(Object sender, EventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)


This error occurs in about 5% of my graphics when I mouse over it. When I mouse over the same graphic after this error is thrown, the MapTip behaves normally, when I move to another maptip (broken or not) and come back to it, it throws this error again.

Any thoughts?
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
This error can happen when using a non shareable UIElement as MapTip.
The most frequent case is when the maptip is defined as a resource : this is not supported.

Please check that it's not your case. The workaround may be either to create the maptips by code, or to create your own maptip control with a template defined as resource (that's supported)
0 Kudos
Yen-ShengPan
Emerging Contributor
I've created a new maptip which is a UserControl.

With layers, i've just set the layer.maptip = myMaptip and that sometimes throws errors.

I don't know how much more detail I can provide.

Any more suggestions?
0 Kudos
DominiqueBroux
Esri Frequent Contributor

I've created a new maptip which is a UserControl.


How is created this maptip?

Difficult to guess the issue.
If you could share a simple project allowing to reproduce the issue, you could try to reproduce and debug it here.
0 Kudos