Interface: IProjection

H.geo.IProjection

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

Methods

geoToPoint (geoPoint, opt_out)H.math.Point

This method transforms a geographical point to a projected point in the range [0...1].

Name Type Description
geoPoint H.geo.IPoint

An object containing geographical coordinates

opt_out H.math.Point optional

An optional point to receive the result

Returns:
Type Description
H.math.Point An object containing the results of the conversion

latLngToPoint (lat, lng, opt_out)H.math.Point

This method transforms geographical lat/lng coordinates to a projected point in the range [0...1].

Name Type Description
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:
Type Description
H.math.Point An object containing the result of the conversion

pointToGeo (point, opt_out)H.geo.Point

This method transforms a projected point in the range [0...1] to a geographical point.

Name Type Description
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

Returns:
Type Description
H.geo.Point A geographical point object containing the results of the conversion

xyToGeo (x, y, opt_out)H.geo.Point

This method transforms projected x/y coordinates in the range [0...1] to a geographical point.

Name Type Description
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

Returns:
Type Description
H.geo.Point An object containing the results of the conversion