mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Updated MapGraticule
This commit is contained in:
parent
0696441a4e
commit
5a681d3580
4 changed files with 16 additions and 57 deletions
|
|
@ -40,11 +40,17 @@ namespace MapControl
|
|||
|
||||
private const double LineInterpolationResolution = 2d;
|
||||
|
||||
public static readonly DependencyProperty StrokeThicknessProperty =
|
||||
DependencyPropertyHelper.Register<MapGraticule, double>(nameof(StrokeThickness), 0.5);
|
||||
|
||||
public static readonly DependencyProperty MinLineDistanceProperty =
|
||||
DependencyPropertyHelper.Register<MapGraticule, double>(nameof(MinLineDistance), 150d);
|
||||
|
||||
private double lineDistance;
|
||||
private string labelFormat;
|
||||
public double StrokeThickness
|
||||
{
|
||||
get => (double)GetValue(StrokeThicknessProperty);
|
||||
set => SetValue(StrokeThicknessProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Minimum graticule line distance in pixels. The default value is 150.
|
||||
|
|
@ -55,6 +61,9 @@ namespace MapControl
|
|||
set => SetValue(MinLineDistanceProperty, value);
|
||||
}
|
||||
|
||||
private double lineDistance;
|
||||
private string labelFormat;
|
||||
|
||||
private void SetLineDistance()
|
||||
{
|
||||
var minDistance = MinLineDistance / PixelPerLongitudeDegree(ParentMap.Center);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue