Maps API for JavaScript

Maps API for JavaScript Developer's Guide

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

Table 1. Methods
Methods

` latLngToPoint (lat, lng, opt_out) : {H.math.Point}`

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

` xyToGeo (x, y, opt_out) : {H.geo.Point}`

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

` pointToGeo (point, opt_out) : {H.geo.Point}`

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

` geoToPoint (geoPoint, opt_out) : {H.math.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) : {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
Returns:

`{H.geo.Point}`
An object containing the results 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.

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
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