InformationLayer.GetItemsInLocation wrong Location

2 posts, 0 answers
  1. Volkmar
    Volkmar avatar
    6 posts
    Member since:
    Oct 2010

    Posted 29 Oct 2010 Link to this post

    I have a click event on the map. I do check all InformationLayers and if there is a KML Layer (MapPolygon Items) I select the item.
    However the location from eventArgs. The location does not seam to be the right one. I click on a Polygon but a Polygon somewhere on the roght top corner of the image gets selected and so on.
    Why is there a shift of the location? Any hints? Thanks for any replies..

    ApMap_MapMouseClick(object sender, MapMouseRoutedEventArgs eventArgs)
               switch (_activeTool.ToolType)
                   case ToolType.Pan:
                   case ToolType.Zoomin:
                   case ToolType.Zoomout:
                   case ToolType.Info:
                   case ToolType.Select:
                       foreach (var serviceLayer in ServiceLayers)
                           if (serviceLayer.Visible && serviceLayer.TypeId==1)
                               var iLyr = ApMap.Items.OfType<InformationLayer>().Where(rv => rv.Name == serviceLayer.Name).First();
                               var items = iLyr.GetItemsInLocation(eventArgs.Location);
                               if (items.Count()>0)
                                   ((MapPolygon) items.First()).Fill = new SolidColorBrush(Color.FromArgb(127, 255, 25, 0));
                                   ((MapPolygon) items.First()).Stroke = new SolidColorBrush(Colors.Red);
                       throw new ArgumentOutOfRangeException();
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 02 Nov 2010 Link to this post

    Hello Volkmar,

    It looks like you are using Beta version of the 2010.Q3 release. If it is so, we aware about this problem and it will be fixed in the official 2010.Q3 release.

    All the best,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top