mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
- moved tile rect calculation from MapBase to TileLayer - added TileLayer.ZoomLevelOffset property - Windows Universal sample application in solution MapControl VS2015
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
|
// © 2015 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
#if NETFX_CORE
|
|
using Windows.UI.Xaml.Media;
|
|
#else
|
|
using System.Windows.Media;
|
|
#endif
|
|
|
|
namespace MapControl
|
|
{
|
|
/// <summary>
|
|
/// Base class for map shapes. The shape geometry is given by the Data property,
|
|
/// which must contain a Geometry defined in cartesian (projected) map coordinates.
|
|
/// The Stretch property is meaningless for MapPath, it will be reset to None.
|
|
/// </summary>
|
|
public partial class MapPath : IMapElement
|
|
{
|
|
private MapBase parentMap;
|
|
|
|
public MapBase ParentMap
|
|
{
|
|
get { return parentMap; }
|
|
set
|
|
{
|
|
parentMap = value;
|
|
UpdateData();
|
|
}
|
|
}
|
|
|
|
protected virtual void UpdateData()
|
|
{
|
|
if (Data != null)
|
|
{
|
|
if (parentMap != null)
|
|
{
|
|
Data.Transform = ParentMap.ViewportTransform;
|
|
}
|
|
else
|
|
{
|
|
Data.ClearValue(Geometry.TransformProperty);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|