Projection
Projection.
Hashable
public static func == (lhs: Projection, rhs: Projection) -> Bool
Returns a Boolean value indicating whether two values are equal.
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
hasher
Hasher
Hasher to use when combining the components of this instance.
public func screenToMap(
point: ScreenPoint
) -> GeoPoint?
Calculates a map point at the specified screen point.
The function returns an empty value if the specified screen point is outside the map projection.
public func mapToScreen(
point: GeoPoint
) -> ScreenPoint?
public func mapToScreen(
point: GeoPointWithElevation
) -> ScreenPoint?
Calculates a screen point corresponding to the specified map point with elevation.
The function returns an empty value:
public func screenToMapClipped(
point: ScreenPoint
) -> GeoPoint
Calculates the map point closest to the projection of the specified screen point.
public func distanceOnMap(
fromPoint: ScreenPoint,
toPoint: ScreenPoint
) -> Meter?
Calculates the distance in meters between points on the map that correspond to the specified points on the screen.
Returns an empty value if one or both points on the screen are outside the map projection.
public func distanceOnScreen(
fromGeoPoint: GeoPoint,
toGeoPoint: GeoPoint
) -> LogicalPixel?
Calculates the distance in pixels between points on the screen that correspond to the specified points on the map.
Returns an empty value if one or both points on the map are:
- invalid values (
latitude
is outside the range-90; 90
orlongitude
is outside the range-180; 180
) - above the projection plane of the map on the screen
- far beyond the screen, and the type overflow occurs