Esempio n. 1
0
 private double GetDistance(Element element)
 {
     if (element is Node)
     {
         return(GeoProjection.Distance((element as Node).Coordinate, _position));
     }
     if (element is Way)
     {
         return((element as Way).Coordinates.Min(geoCoordinate =>
                                                 GeoProjection.Distance(geoCoordinate, _position)));
     }
     return((element as Relation).Members.Min(member => GetDistance(member.Member)));
 }
Esempio n. 2
0
 private bool Check(float radius, Way way)
 {
     return(way.Coordinates.Any(geoCoordinate =>
                                GeoProjection.Distance(geoCoordinate, _geoPositionObserver.CurrentPosition) <= radius));
 }
Esempio n. 3
0
 private bool Check(float radius, Node node)
 {
     return(GeoProjection.Distance(node.Coordinate, _geoPositionObserver.CurrentPosition) <= radius);
 }