mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Avalonia MapPolygon, MapPolyline
This commit is contained in:
parent
bfa70de0cd
commit
cf08a2baae
9 changed files with 40 additions and 25 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Media;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
|
@ -21,7 +20,7 @@ namespace MapControl
|
|||
|
||||
public static readonly StyledProperty<Geometry> DataProperty =
|
||||
DependencyPropertyHelper.AddOwner<MapPath, Geometry>(Path.DataProperty,
|
||||
(path, oldValue, newValue) => path.DataPropertyChanged(oldValue, newValue));
|
||||
(path, oldValue, newValue) => path.UpdateData());
|
||||
|
||||
public Geometry Data
|
||||
{
|
||||
|
|
@ -31,16 +30,6 @@ namespace MapControl
|
|||
|
||||
protected override Geometry CreateDefiningGeometry() => Data;
|
||||
|
||||
private void DataPropertyChanged(Geometry oldData, Geometry newData)
|
||||
{
|
||||
// Check if data is actually a new Geometry.
|
||||
//
|
||||
if (newData != null && !ReferenceEquals(newData, oldData))
|
||||
{
|
||||
UpdateData();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetMapTransform(Matrix matrix)
|
||||
{
|
||||
if (Data.Transform is MatrixTransform transform)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue