Skip to content

Latest commit

 

History

History
124 lines (70 loc) · 4.45 KB

spherical.md

File metadata and controls

124 lines (70 loc) · 4.45 KB

See html formatted version

spherical namespace

google.maps.geometry.spherical namespace

Utility functions for computing geodesic angles, distances and areas. The default radius is Earth's radius of 6378137 meters.

Library

geometry

Static Methods

undefined

computeArea(path[, radius])

Parameters: 

Return Value:  number

Returns the area of a closed path. The computed area uses the same units as the radius. The radius defaults to the Earth's radius in meters, in which case the area is in square meters.

undefined

computeDistanceBetween(from, to[, radius])

Parameters: 

Return Value:  number

Returns the distance, in meters, between two LatLngs. You can optionally specify a custom radius. The radius defaults to the radius of the Earth.

undefined

computeHeading(from, to)

Parameters: 

Return Value:  number

Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).

undefined

computeLength(path[, radius])

Parameters: 

Return Value:  number

Returns the length of the given path.

undefined

computeOffset(from, distance, heading[, radius])

Parameters: 

  • from:  LatLng
  • distance:  number
  • heading:  number
  • radius:  number optional

Return Value:  LatLng

Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).

undefined

computeOffsetOrigin(to, distance, heading[, radius])

Parameters: 

  • to:  LatLng
  • distance:  number
  • heading:  number
  • radius:  number optional

Return Value:  LatLng

Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.

undefined

computeSignedArea(loop[, radius])

Parameters: 

Return Value:  number

Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path. The computed area uses the same units as the radius. The radius defaults to the Earth's radius in meters, in which case the area is in square meters.

undefined

interpolate(from, to, fraction)

Parameters: 

Return Value:  LatLng

Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.