General map graticule for WPF

This commit is contained in:
Clemens 2022-03-04 22:28:18 +01:00
parent c998f19fe5
commit a07948be02
11 changed files with 414 additions and 122 deletions

View file

@ -147,9 +147,11 @@ namespace MapControl
if (parentMap.MapProjection.IsNormalCylindrical && IsOutsideViewport(position))
{
var location = parentMap.MapProjection.MapToLocation(center);
location.Longitude = parentMap.ConstrainedLongitude(location.Longitude);
position = parentMap.LocationToView(location);
if (location != null)
{
location.Longitude = parentMap.ConstrainedLongitude(location.Longitude);
position = parentMap.LocationToView(location);
}
}
var width = rect.Width * parentMap.ViewTransform.Scale;