mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Changed item in geometry check in MapItemsControl.
This commit is contained in:
parent
ac6f9d5647
commit
841683f198
1 changed files with 3 additions and 17 deletions
|
|
@ -99,24 +99,10 @@ namespace MapControl
|
|||
private bool IsItemInGeometry(object item, Geometry geometry)
|
||||
{
|
||||
var container = ContainerFromItem(item);
|
||||
if (container == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var location = MapPanel.GetLocation(container);
|
||||
if (location == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var parentMap = MapPanel.GetParentMap(container);
|
||||
if (parentMap == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return geometry.FillContains(parentMap.LocationToViewportPoint(location));
|
||||
return container != null &&
|
||||
container.RenderTransform != null &&
|
||||
geometry.FillContains(new Point(container.RenderTransform.Value.OffsetX, container.RenderTransform.Value.OffsetY));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue