-
<static> computeBoundingBoxIntersection(width, height, centreX, centreY, heading) → {object}
-
Parameters:
Name |
Type |
Description |
width |
number
|
The width of the bounding box. |
height |
number
|
The height of the bounding box. |
centreX |
number
|
The x coordinate of the centre of the bounding box. |
centreY |
number
|
The y coordinate of the centre of the bounding box. |
heading |
number
|
The heading, in degrees, measured clockwise from North. Must be in the range 0 to 360. |
- Source:
Returns:
An object containing the x and y coordinates of the intersection on the edge of the bounding box.
-
Type
-
object
-
<static> computeBoundingBoxIntersectionAtAngle(width, height, centreX, centreY, angle) → {object}
-
Parameters:
Name |
Type |
Description |
width |
number
|
The width of the bounding box. |
height |
number
|
The height of the bounding box. |
centreX |
number
|
The x coordinate of the centre of the bounding box. |
centreY |
number
|
The y coordinate of the centre of the bounding box. |
angle |
number
|
The angle, in radians, measured anti-clockwise from the right (East). Must be in the range 0 to 2PI. |
- Source:
Returns:
An object containing the x and y coordinates of the intersection on the edge of the bounding box.
-
Type
-
object
-
<static> computeBounds(poly) → {google.maps.LatLngBounds}
-
Parameters:
Name |
Type |
Description |
poly |
google.maps.Polygon
|
google.maps.Polyline
|
The polygon or polyline. |
- Source:
Returns:
The bounding box for the polygon or polyline.
-
Type
-
google.maps.LatLngBounds
-
<static> computeLatLngBoundsIntersection(boundingBox, heading) → {google.maps.LatLng}
-
Parameters:
Name |
Type |
Description |
boundingBox |
google.maps.LatLngBounds
|
The bounding box. |
heading |
number
|
The heading from the centre of the bounding box. The heading must be normalised (i.e. in the range 0 to 360). |
- Source:
Returns:
The point on the edge of the bounding box that is on the given heading.
-
Type
-
google.maps.LatLng
-
<static> computeNormalisedHeading(from, to) → {google.maps.LatLng}
-
Parameters:
Name |
Type |
Description |
from |
google.maps.LatLng
|
The point the heading is measured from. |
to |
google.maps.LatLng
|
The point the heading is measured to. |
- Source:
Returns:
The heading from one LatLng to the other, normalised into the range 0 to 360.
-
Type
-
google.maps.LatLng
-
<static> convertHeadingToAngle(heading) → {number}
-
Convert a heading from degrees to radians.
Parameters:
Name |
Type |
Description |
heading |
number
|
The heading, in degrees, measured clockwise from North. |
- Source:
Returns:
The mathematical angle, in radians, measured anti-clockwise from the right (East).
-
Type
-
number
-
<static> convertToRadians(angle) → {number}
-
Convert an angle from degrees to radians.
Parameters:
Name |
Type |
Description |
angle |
number
|
The angle in degrees. |
- Source:
Returns:
The angle in radians.
-
Type
-
number
-
<static> normaliseAngle(angle) → {number}
-
Parameters:
Name |
Type |
Description |
angle |
number
|
The angle, measured in radians. |
- Source:
Returns:
The angle normalised into the range 0 to 2PI.
-
Type
-
number
-
<static> normaliseHeading(heading) → {number}
-
Parameters:
Name |
Type |
Description |
heading |
number
|
The heading, measured in degrees. |
- Source:
Returns:
The heading normalised into the range 0 to 360.
-
Type
-
number
-
<static> tiltedAngle(angle, tilt) → {number}
-
Adjust an angle to account for the view of the map being tilted.
Parameters:
Name |
Type |
Description |
angle |
number
|
The angle, in radians, measured anti-clockwise from the right (East). |
tilt |
number
|
The angle of incidence of the map, in degrees from the viewport plane to the map plane. An angle of 0 indicates the map is being viewed from directly overhead. |
- Source:
Returns:
The angle the initial angle makes with the viewport.
-
Type
-
number
-
<static> tiltedHeading(heading, tilt) → {number}
-
Adjust a heading to account for the view of the map being tilted.
Parameters:
Name |
Type |
Description |
heading |
number
|
The heading, in degrees, measured clockwise from North. |
tilt |
number
|
The angle of incidence of the map, in degrees from the viewport plane to the map plane. An angle of 0 indicates the map is being viewed from directly overhead. |
- Source:
Returns:
The angle the heading makes with the viewport.
-
Type
-
number