H.geo.IProjection
Interface Summary
This interface represents a map projection. It defines functions that transform geographic coordinates to EPSG3857 coordinate reference system, which uses x, y values in range 0..1
[ For full details, see the Interface Details ]
Method Summary
Methods |
---|
This method transforms geographical lat/lng coordinates to a projected point in the range [0...1]. |
This method transforms projected x/y coordinates in the range [0...1] to a geographical point. |
This method transforms a projected point in the range [0...1] to a geographical point. |
This method transforms a geographical point to a projected point in the range [0...1]. |
Interface Description
This interface represents a map projection. It defines functions that transform geographic coordinates to EPSG3857 coordinate reference system, which uses x, y values in range 0..1
Method Details
latLngToPoint (lat, lng, opt_out) : {H.math.Point}
This method transforms geographical lat/lng coordinates to a projected point in the range [0...1].
- Parameters:
-
lat
: -
{number}
- latitude A value indicating the latitude
-
lng
: -
{number}
- longitude A value indicating the longitude
-
opt_out
: -
{H.math.Point=} [optional]
- An optional point to receive the result
- Returns:
-
{H.math.Point}
- An object containing the result of the conversion
xyToGeo (x, y, opt_out, opt_noWrap) : {H.geo.Point}
This method transforms projected x/y coordinates in the range [0...1] to a geographical point.
- Parameters:
-
x
: -
{number}
- A value indicating the x coordinate
-
y
: -
{number}
- A value indicating the y coordinate
-
opt_out
: -
{H.geo.Point=} [optional]
- An optional point object to receive the result
-
opt_noWrap
: -
{boolean=} [optional]
- Indicates whether to treat the world as wrapped along the longitude axis. When set to false, x-coordinates are normalized to the range [0..1]. When set to true, x-coordinates are clamped to the range [0..1]. Default is false.
- Returns:
-
{H.geo.Point}
- An object containing the results of the conversion
pointToGeo (point, opt_out, opt_noWrap) : {H.geo.Point}
This method transforms a projected point in the range [0...1] to a geographical point.
- Parameters:
-
point
: -
{H.math.IPoint}
- An object representing the point to convert
-
opt_out
: -
{H.geo.Point=} [optional]
- An optional geographical point object to receive the results
-
opt_noWrap
: -
{boolean=} [optional]
- Indicates whether to treat the world as wrapped along the longitude axis. When set to false, x-coordinates are normalized to the range [0..1]. When set to true, x-coordinates are clamped to the range [0..1]. Default is false.
- Returns:
-
{H.geo.Point}
- A geographical point object containing the results of the conversion
geoToPoint (geoPoint, opt_out) : {H.math.Point}
This method transforms a geographical point to a projected point in the range [0...1].
- Parameters:
-
geoPoint
: -
{H.geo.IPoint}
- An object containing geographical coordinates
-
opt_out
: -
{H.math.Point=} [optional]
- An optional point to receive the result
- Returns:
-
{H.math.Point}
- An object containing the results of the conversion