com.r3corda.core.node / WorldCoordinate / project

project

fun project(screenWidth: Double, screenHeight: Double, topLatitude: Double, bottomLatitude: Double, leftLongitude: Double, rightLongitude: Double): <ERROR CLASS><Double, Double>

Convert to screen coordinates using the Mercator projection. You should have a world map image that you know the precise extents of for this function to work.

Note that no world map ever has latitude extents of -90 to 90 because at these extremes the mapping tends to infinity. Google Maps, for example, uses a square map image, and square maps yield latitude extents of 85.0511 to -85.0511 = arctan(sinh(π)).