mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 4.10.0: Simplified MapProjection.
This commit is contained in:
parent
bbd952b955
commit
b06c9065af
11 changed files with 41 additions and 101 deletions
|
|
@ -338,16 +338,7 @@ namespace MapControl
|
|||
if (TargetZoomLevel != zoomLevel)
|
||||
{
|
||||
SetTransformCenter(center);
|
||||
|
||||
if (MapProjection.IsAzimuthal)
|
||||
{
|
||||
ZoomLevel = zoomLevel;
|
||||
ResetTransformCenter();
|
||||
}
|
||||
else
|
||||
{
|
||||
TargetZoomLevel = zoomLevel;
|
||||
}
|
||||
TargetZoomLevel = zoomLevel;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -417,11 +408,8 @@ namespace MapControl
|
|||
|
||||
private void ProjectionCenterPropertyChanged()
|
||||
{
|
||||
if (MapProjection.IsAzimuthal)
|
||||
{
|
||||
ResetTransformCenter();
|
||||
UpdateTransform();
|
||||
}
|
||||
ResetTransformCenter();
|
||||
UpdateTransform();
|
||||
}
|
||||
|
||||
private void AdjustCenterProperty(DependencyProperty property, ref Location center)
|
||||
|
|
@ -463,7 +451,7 @@ namespace MapControl
|
|||
|
||||
if (!targetCenter.Equals(Center))
|
||||
{
|
||||
var targetCenterLongitude = MapProjection.IsContinuous
|
||||
var targetCenterLongitude = MapProjection.IsCylindrical
|
||||
? Location.NearestLongitude(targetCenter.Longitude, Center.Longitude)
|
||||
: targetCenter.Longitude;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue