Projection
Projection.
Uses the Mercator spherical projection (EPSG:3857), looped in longitude. Displayed data is limited in latitude from -85.06° to 85.06°.
ru.dgis.sdk.NativeObject
fun 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.
fun mapToScreen(point: GeoPointWithElevation): ScreenPoint?
Calculates the screen point corresponding to the specified map point.
The function returns an empty value:
fun screenToMapClipped(point: ScreenPoint): GeoPoint
Calculates the nearest map point to the projection of the specified screen point.
fun 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.
fun 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