Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
860
GeographicPolylineSeries - Mouse enter
posted

Hello

I am listening on the event MouseEnter on my GeographicPolylineSeries:

polylineSeries.MouseEnter += polylineSeries_MouseEnter;



I want to get the Item at the mouse position:

        void polylineSeries_MouseEnter(object sender, MouseEventArgs e)
        {
            var mousePosition = e.GetPosition(mapControl);
           
            var item = (sender as GeographicPolylineSeries).GetItem(mousePosition);

            var item1 = (sender as GeographicPolylineSeries).GetItemFromSeriesPixel(mousePosition);

            var item2 = (sender as GeographicPolylineSeries).GetExactItemIndexFromSeriesPixel(mousePosition);
        }

I've tried the above combinations (and more of the GetItem methods) but nothing will get me the item behind.

What am I doing wrong?

Parents
  • 34810
    Verified Answer
    Offline posted

    Hello logimatic,

    Thank you for your post.

    Currently, you aren't doing anything wrong on this matter. The GetItem-related methods are currently not implemented on the geographic series. These methods are reserved for use with the series that are used with the XamDataChart instead.

    Instead, there is a different event that I would recommend using for this. The XamGeographicMap has a SeriesMouseMove event that you can handle to get your data item when the mouse moves over it. From the event arguments of this SeriesMouseMove event, you can obtain the map, data item and series that your mouse has moved over by using the e.Chart, e.Item, and e.Series properties, respectively.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Reply Children
No Data