mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Reworked MapPath and derived classes
This commit is contained in:
parent
414389513e
commit
49d508b3f5
9 changed files with 106 additions and 84 deletions
|
|
@ -151,9 +151,9 @@ namespace MapControl
|
|||
(pos.X < 0d || pos.X > parentMap.RenderSize.Width ||
|
||||
pos.Y < 0d || pos.Y > parentMap.RenderSize.Height))
|
||||
{
|
||||
pos = parentMap.LocationToView(new Location(
|
||||
location.Latitude,
|
||||
Location.NearestLongitude(location.Longitude, parentMap.Center.Longitude)));
|
||||
location = new Location(location.Latitude, parentMap.ConstrainedLongitude(location.Longitude));
|
||||
|
||||
pos = parentMap.LocationToView(location);
|
||||
}
|
||||
|
||||
var rect = new Rect(pos, element.DesiredSize);
|
||||
|
|
@ -208,7 +208,7 @@ namespace MapControl
|
|||
pos.Y < 0d || pos.Y > parentMap.RenderSize.Height))
|
||||
{
|
||||
var location = projection.MapToLocation(center);
|
||||
location.Longitude = Location.NearestLongitude(location.Longitude, parentMap.Center.Longitude);
|
||||
location.Longitude = parentMap.ConstrainedLongitude(location.Longitude);
|
||||
|
||||
pos = parentMap.LocationToView(location);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue