mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Added MapProjection.Type
This commit is contained in:
parent
a07948be02
commit
16fb98ac86
15 changed files with 126 additions and 77 deletions
|
|
@ -118,7 +118,7 @@ namespace MapControl
|
|||
|
||||
var position = parentMap.LocationToView(location);
|
||||
|
||||
if (parentMap.MapProjection.IsNormalCylindrical && IsOutsideViewport(position))
|
||||
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical && IsOutsideViewport(position))
|
||||
{
|
||||
location = new Location(location.Latitude, parentMap.ConstrainedLongitude(location.Longitude));
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ namespace MapControl
|
|||
var center = new Point(rect.X + rect.Width / 2d, rect.Y + rect.Height / 2d);
|
||||
var position = parentMap.ViewTransform.MapToView(center);
|
||||
|
||||
if (parentMap.MapProjection.IsNormalCylindrical && IsOutsideViewport(position))
|
||||
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical && IsOutsideViewport(position))
|
||||
{
|
||||
var location = parentMap.MapProjection.MapToLocation(center);
|
||||
if (location != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue