mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-02-20 06:34:35 +01:00
MapItem
This commit is contained in:
parent
085154c614
commit
0696441a4e
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
public static readonly StyledProperty<Location> LocationProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapItem, Location>(MapPanel.LocationProperty, null,
|
||||
(item, oldValue, newValue) => item.UpdateMapTransform(newValue));
|
||||
(item, oldValue, newValue) => item.UpdateMapTransform());
|
||||
|
||||
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MapControl
|
|||
//
|
||||
parentMap.ViewportChanged += OnViewportChanged;
|
||||
|
||||
UpdateMapTransform(Location);
|
||||
UpdateMapTransform();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ namespace MapControl
|
|||
{
|
||||
parentMap.ViewportChanged += OnViewportChanged;
|
||||
|
||||
UpdateMapTransform(Location);
|
||||
UpdateMapTransform();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,14 +91,14 @@ namespace MapControl
|
|||
|
||||
private void OnViewportChanged(object sender, ViewportChangedEventArgs e)
|
||||
{
|
||||
UpdateMapTransform(Location);
|
||||
UpdateMapTransform();
|
||||
}
|
||||
|
||||
private void UpdateMapTransform(Location location)
|
||||
private void UpdateMapTransform()
|
||||
{
|
||||
if (mapTransform != null && parentMap != null && location != null)
|
||||
if (mapTransform != null && parentMap != null && Location != null)
|
||||
{
|
||||
mapTransform.Matrix = parentMap.GetMapTransform(location);
|
||||
mapTransform.Matrix = parentMap.GetMapTransform(Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace MapControl
|
|||
|
||||
public static readonly DependencyProperty LocationProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapItem, Location>(MapPanel.LocationProperty, null,
|
||||
(item, oldValue, newValue) => item.UpdateMapTransform(newValue));
|
||||
(item, oldValue, newValue) => item.UpdateMapTransform());
|
||||
|
||||
static MapItem()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace MapControl
|
|||
(item, oldValue, newValue) =>
|
||||
{
|
||||
MapPanel.SetLocation(item, newValue);
|
||||
item.UpdateMapTransform(newValue);
|
||||
item.UpdateMapTransform();
|
||||
});
|
||||
|
||||
private Windows.Foundation.Point? pointerPressedPosition;
|
||||
|
|
|
|||
Loading…
Reference in a new issue