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))); }
private bool Check(float radius, Way way) { return(way.Coordinates.Any(geoCoordinate => GeoProjection.Distance(geoCoordinate, _geoPositionObserver.CurrentPosition) <= radius)); }
private bool Check(float radius, Node node) { return(GeoProjection.Distance(node.Coordinate, _geoPositionObserver.CurrentPosition) <= radius); }