mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Updated TransverseMercatorProjection
This commit is contained in:
parent
90cb418a41
commit
043b48d1d6
2 changed files with 145 additions and 105 deletions
|
|
@ -212,30 +212,19 @@ namespace MapControl
|
|||
var latPoints = latSegments * interpolationCount;
|
||||
|
||||
var centerLon = Math.Round(ParentMap.Center.Longitude / lineDistance) * lineDistance;
|
||||
var westLimit = centerLon - 180d;
|
||||
var eastLimit = centerLon + 180d;
|
||||
|
||||
if (ParentMap.MapProjection.Type == MapProjectionType.TransverseCylindrical)
|
||||
{
|
||||
westLimit = ParentMap.MapProjection.Center.Longitude - 15d;
|
||||
eastLimit = ParentMap.MapProjection.Center.Longitude + 15d;
|
||||
westLimit = Math.Floor(westLimit / lineDistance) * lineDistance;
|
||||
eastLimit = Math.Ceiling(eastLimit / lineDistance) * lineDistance;
|
||||
}
|
||||
|
||||
var minLon = centerLon - lineDistance;
|
||||
var maxLon = centerLon + lineDistance;
|
||||
|
||||
if (DrawMeridian(figures, centerLon, minLat, interpolationDistance, latPoints))
|
||||
{
|
||||
while (DrawMeridian(figures, minLon, minLat, interpolationDistance, latPoints) &&
|
||||
minLon > westLimit)
|
||||
minLon > centerLon - 180d)
|
||||
{
|
||||
minLon -= lineDistance;
|
||||
}
|
||||
|
||||
while (DrawMeridian(figures, maxLon, minLat, interpolationDistance, latPoints) &&
|
||||
maxLon < eastLimit)
|
||||
maxLon < centerLon + 180d)
|
||||
{
|
||||
maxLon += lineDistance;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue