mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Changed struct Location to class
This commit is contained in:
parent
35820aa27e
commit
6429776853
11 changed files with 38 additions and 51 deletions
|
|
@ -23,7 +23,7 @@ namespace MapControl
|
|||
public partial class MapItem : ListBoxItem, IMapElement
|
||||
{
|
||||
public static readonly DependencyProperty LocationProperty =
|
||||
DependencyPropertyHelper.Register<MapItem, Location>(nameof(Location), default,
|
||||
DependencyPropertyHelper.Register<MapItem, Location>(nameof(Location), null,
|
||||
(item, oldValue, newValue) =>
|
||||
{
|
||||
MapPanel.SetLocation(item, newValue);
|
||||
|
|
@ -109,7 +109,7 @@ namespace MapControl
|
|||
|
||||
private void UpdateMapTransform()
|
||||
{
|
||||
if (MapTransform != null && ParentMap != null)
|
||||
if (MapTransform != null && ParentMap != null && Location != null)
|
||||
{
|
||||
MapTransform.Matrix = ParentMap.GetMapToViewTransform(Location);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue