mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-31 12:54:15 +01:00
Removing these projections - which were never really well implemented - greatly simplifies the code. There is no ProjectionCenter anymore and MapProjection methods do not return null Locations or Points.
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using Avalonia;
|
|
|
|
namespace MapControl
|
|
{
|
|
public partial class MapPanel
|
|
{
|
|
public static readonly AttachedProperty<bool> AutoCollapseProperty =
|
|
DependencyPropertyHelper.RegisterAttached<bool>("AutoCollapse", typeof(MapPanel));
|
|
|
|
public static readonly AttachedProperty<Location> LocationProperty =
|
|
DependencyPropertyHelper.RegisterAttached<Location>("Location", typeof(MapPanel));
|
|
|
|
public static readonly AttachedProperty<BoundingBox> BoundingBoxProperty =
|
|
DependencyPropertyHelper.RegisterAttached<BoundingBox>("BoundingBox", typeof(MapPanel));
|
|
|
|
public static readonly AttachedProperty<Rect?> MapRectProperty =
|
|
DependencyPropertyHelper.RegisterAttached<Rect?>("MapRect", typeof(MapPanel));
|
|
|
|
static MapPanel()
|
|
{
|
|
AffectsParentArrange<MapPanel>(LocationProperty, BoundingBoxProperty, MapRectProperty);
|
|
}
|
|
|
|
public static MapBase GetParentMap(FrameworkElement element)
|
|
{
|
|
return (MapBase)element.GetValue(ParentMapProperty);
|
|
}
|
|
}
|
|
}
|