Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Maps API getHeading() Method

Maps API getHeading() Method

Map() Constructor Map() Constructor

Example

Returns the compass heading of the aerial image:

map.getHeading();

Try it »


Definition and Usage

The getHeading() method returns the compass heading of the aerial image.

The getHeading() method can only be used with SATELLITE or HYBRID map types, which support 45 degree angle image viewports at specific locations at high zoom levels.


Syntax

mapvariable

.getHeading();


Return Value

Value Description
number Compass heading in degrees.

Map() Constructor Map() Constructor