Update comments

This commit is contained in:
ClemensFischer 2022-11-05 17:32:29 +01:00
parent a0b887fc7c
commit b253d0696a
8 changed files with 26 additions and 25 deletions

View file

@ -216,20 +216,20 @@ namespace MapControl
}
/// <summary>
/// Gets the scaling factor from cartesian map coordinates to view coordinates,
/// i.e. pixels per meter, as a read-only dependency property.
/// Gets the scaling factor from projected map coordinates to view coordinates,
/// i.e. pixels per meter.
/// </summary>
public double ViewScale => (double)GetValue(ViewScaleProperty);
/// <summary>
/// Gets the ViewTransform instance that is used to transform between cartesian map coordinates
/// and view coordinates.
/// Gets the ViewTransform instance that is used to transform between projected
/// map coordinates and view coordinates.
/// </summary>
public ViewTransform ViewTransform { get; } = new ViewTransform();
/// <summary>
/// Gets the horizontal and vertical scaling factors from cartesian map coordinates to view
/// coordinates at the specified location, i.e. pixels per meter.
/// Gets the map scale, i.e. the horizontal and vertical scaling factors from geographic
/// coordinates to view coordinates at the specified location, in pixels per meter.
/// </summary>
public Vector GetScale(Location location)
{

View file

@ -98,7 +98,8 @@ namespace MapControl
}
/// <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>
public static Point? GetViewPosition(FrameworkElement element)
{
@ -152,7 +153,7 @@ namespace MapControl
{
var location = GetLocation(element);
Point? position = null;
if (location != null)
{
position = GetViewPosition(location);

View file

@ -17,7 +17,7 @@ namespace MapControl
{
/// <summary>
/// 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>
public partial class MapPath : IMapElement
{
@ -29,7 +29,7 @@ namespace MapControl
/// <summary>
/// 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
/// Locations (like MapPolyline or MapPolygon) to the visible map viewport, as done
/// for elements where the MapPanel.Location property is set.

View file

@ -57,18 +57,18 @@ namespace MapControl
}
/// <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>
public abstract Point LocationToMap(Location location);
/// <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.
/// </summary>
public abstract Location MapToLocation(Point point);
/// <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>
public virtual Rect BoundingBoxToRect(BoundingBox boundingBox)
{
@ -78,7 +78,7 @@ namespace MapControl
}
/// <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.
/// </summary>
public virtual BoundingBox RectToBoundingBox(Rect rect)

View file

@ -17,7 +17,7 @@ using System.Windows.Media;
namespace MapControl
{
/// <summary>
/// Defines the transformation between cartesian map coordinates in meters
/// Defines the transformation between projected map coordinates in meters
/// and view coordinates in pixels.
/// </summary>
public class ViewTransform
@ -33,7 +33,7 @@ namespace MapControl
}
/// <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.
/// </summary>
public double Scale { get; private set; }
@ -44,17 +44,17 @@ namespace MapControl
public double Rotation { get; private set; }
/// <summary>
/// Gets the transform matrix from cartesian map coordinates to view coordinates.
/// Gets the transform matrix from projected map coordinates to view coordinates.
/// </summary>
public Matrix MapToViewMatrix { get; private set; }
/// <summary>
/// Gets the transform matrix from view coordinates to cartesian map coordinates.
/// Gets the transform matrix from view coordinates to projected map coordinates.
/// </summary>
public Matrix ViewToMapMatrix { get; private set; }
/// <summary>
/// Transforms a Point from cartesian map coordinates to view coordinates.
/// Transforms a Point from projected map coordinates to view coordinates.
/// </summary>
public Point MapToView(Point point)
{
@ -62,7 +62,7 @@ namespace MapControl
}
/// <summary>
/// Transforms a Point from view coordinates to cartesian map coordinates.
/// Transforms a Point from view coordinates to projected map coordinates.
/// </summary>
public Point ViewToMap(Point point)
{

View file

@ -16,7 +16,7 @@ namespace MapControl
/// <summary>
/// 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>
public bool ProjectionChanged { get; }

View file

@ -39,9 +39,9 @@ namespace MapControl
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);
}
}
}

View file

@ -67,9 +67,9 @@ namespace MapControl
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);
}
}
}