mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Avoid unnecessary Location and Point allocations
This commit is contained in:
parent
f44d2207e5
commit
e268be2948
20 changed files with 205 additions and 172 deletions
|
|
@ -206,7 +206,7 @@ namespace MapControl
|
|||
position.HasValue && !parentMap.InsideViewBounds(position.Value))
|
||||
{
|
||||
var coercedPosition = parentMap.LocationToView(
|
||||
new Location(location.Latitude, parentMap.CoerceLongitude(location.Longitude)));
|
||||
location.Latitude, parentMap.CoerceLongitude(location.Longitude));
|
||||
|
||||
if (coercedPosition.HasValue)
|
||||
{
|
||||
|
|
@ -230,7 +230,7 @@ namespace MapControl
|
|||
if (location != null)
|
||||
{
|
||||
var coercedPosition = parentMap.LocationToView(
|
||||
new Location(location.Latitude, parentMap.CoerceLongitude(location.Longitude)));
|
||||
location.Latitude, parentMap.CoerceLongitude(location.Longitude));
|
||||
|
||||
if (coercedPosition.HasValue)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue