mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update comments
This commit is contained in:
parent
a0b887fc7c
commit
b253d0696a
|
|
@ -216,20 +216,20 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the scaling factor from cartesian map coordinates to view coordinates,
|
/// Gets the scaling factor from projected map coordinates to view coordinates,
|
||||||
/// i.e. pixels per meter, as a read-only dependency property.
|
/// i.e. pixels per meter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double ViewScale => (double)GetValue(ViewScaleProperty);
|
public double ViewScale => (double)GetValue(ViewScaleProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the ViewTransform instance that is used to transform between cartesian map coordinates
|
/// Gets the ViewTransform instance that is used to transform between projected
|
||||||
/// and view coordinates.
|
/// map coordinates and view coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ViewTransform ViewTransform { get; } = new ViewTransform();
|
public ViewTransform ViewTransform { get; } = new ViewTransform();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the horizontal and vertical scaling factors from cartesian map coordinates to view
|
/// Gets the map scale, i.e. the horizontal and vertical scaling factors from geographic
|
||||||
/// coordinates at the specified location, i.e. pixels per meter.
|
/// coordinates to view coordinates at the specified location, in pixels per meter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Vector GetScale(Location location)
|
public Vector GetScale(Location location)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,8 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the position of an element in view coordinates.
|
/// Gets the position of an element with Location in view coordinates,
|
||||||
|
/// or null when the element has no Location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Point? GetViewPosition(FrameworkElement element)
|
public static Point? GetViewPosition(FrameworkElement element)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A path element with a Data property that holds a Geometry in view coordinates or
|
/// A path element with a Data property that holds a Geometry in view coordinates or
|
||||||
/// cartesian map coordinates that are relative to an origin Location.
|
/// projected map coordinates that are relative to an origin Location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MapPath : IMapElement
|
public partial class MapPath : IMapElement
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +29,7 @@ namespace MapControl
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a Location that is used as
|
/// Gets or sets a Location that is used as
|
||||||
/// - either the origin point of a geometry specified in cartesian map units (meters)
|
/// - either the origin point of a geometry specified in projected map coordinates (meters)
|
||||||
/// - or as an optional value to constrain the view position of MapPaths with multiple
|
/// - or as an optional value to constrain the view position of MapPaths with multiple
|
||||||
/// Locations (like MapPolyline or MapPolygon) to the visible map viewport, as done
|
/// Locations (like MapPolyline or MapPolygon) to the visible map viewport, as done
|
||||||
/// for elements where the MapPanel.Location property is set.
|
/// for elements where the MapPanel.Location property is set.
|
||||||
|
|
|
||||||
|
|
@ -57,18 +57,18 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a Location in geographic coordinates to a Point in cartesian map coordinates.
|
/// Transforms a Location in geographic coordinates to a Point in projected map coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract Point LocationToMap(Location location);
|
public abstract Point LocationToMap(Location location);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a Point in cartesian map coordinates to a Location in geographic coordinates.
|
/// Transforms a Point in projected map coordinates to a Location in geographic coordinates.
|
||||||
/// Returns null when the Point can not be transformed.
|
/// Returns null when the Point can not be transformed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract Location MapToLocation(Point point);
|
public abstract Location MapToLocation(Point point);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a BoundingBox in geographic coordinates to a Rect in cartesian map coordinates.
|
/// Transforms a BoundingBox in geographic coordinates to a Rect in projected map coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Rect BoundingBoxToRect(BoundingBox boundingBox)
|
public virtual Rect BoundingBoxToRect(BoundingBox boundingBox)
|
||||||
{
|
{
|
||||||
|
|
@ -78,7 +78,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a Rect in cartesian map coordinates to a BoundingBox in geographic coordinates.
|
/// Transforms a Rect in projected map coordinates to a BoundingBox in geographic coordinates.
|
||||||
/// Returns null when the Rect can not be transformed.
|
/// Returns null when the Rect can not be transformed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual BoundingBox RectToBoundingBox(Rect rect)
|
public virtual BoundingBox RectToBoundingBox(Rect rect)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ using System.Windows.Media;
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the transformation between cartesian map coordinates in meters
|
/// Defines the transformation between projected map coordinates in meters
|
||||||
/// and view coordinates in pixels.
|
/// and view coordinates in pixels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ViewTransform
|
public class ViewTransform
|
||||||
|
|
@ -33,7 +33,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the scaling factor from cartesian map coordinates to view coordinates,
|
/// Gets the scaling factor from projected map coordinates to view coordinates,
|
||||||
/// i.e. pixels per meter.
|
/// i.e. pixels per meter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Scale { get; private set; }
|
public double Scale { get; private set; }
|
||||||
|
|
@ -44,17 +44,17 @@ namespace MapControl
|
||||||
public double Rotation { get; private set; }
|
public double Rotation { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the transform matrix from cartesian map coordinates to view coordinates.
|
/// Gets the transform matrix from projected map coordinates to view coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Matrix MapToViewMatrix { get; private set; }
|
public Matrix MapToViewMatrix { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the transform matrix from view coordinates to cartesian map coordinates.
|
/// Gets the transform matrix from view coordinates to projected map coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Matrix ViewToMapMatrix { get; private set; }
|
public Matrix ViewToMapMatrix { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a Point from cartesian map coordinates to view coordinates.
|
/// Transforms a Point from projected map coordinates to view coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Point MapToView(Point point)
|
public Point MapToView(Point point)
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +62,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms a Point from view coordinates to cartesian map coordinates.
|
/// Transforms a Point from view coordinates to projected map coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Point ViewToMap(Point point)
|
public Point ViewToMap(Point point)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace MapControl
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the map projection has changed, i.e. if a MapTileLayer or MapImageLayer should
|
/// Indicates if the map projection has changed, i.e. if a MapTileLayer or MapImageLayer should
|
||||||
/// be updated immediately, or MapPath Data in cartesian map coordinates should be recalculated.
|
/// be updated immediately, or MapPath Data in projected map coordinates should be recalculated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ProjectionChanged { get; }
|
public bool ProjectionChanged { get; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ namespace MapControl
|
||||||
return (MapBase)element.GetValue(ParentMapProperty);
|
return (MapBase)element.GetValue(ParentMapProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetViewPosition(FrameworkElement element, Point? viewPosition)
|
private static void SetViewPosition(FrameworkElement element, Point? position)
|
||||||
{
|
{
|
||||||
element.SetValue(ViewPositionPropertyKey, viewPosition);
|
element.SetValue(ViewPositionPropertyKey, position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,9 +67,9 @@ namespace MapControl
|
||||||
return parentMap;
|
return parentMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetViewPosition(FrameworkElement element, Point? viewPosition)
|
private static void SetViewPosition(FrameworkElement element, Point? position)
|
||||||
{
|
{
|
||||||
element.SetValue(ViewPositionProperty, viewPosition);
|
element.SetValue(ViewPositionProperty, position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue