Navigation Functions (Heading)  |  Maps JavaScript API  |  Google for Developers (original) (raw)

Navigation Functions (Heading)

Stay organized with collections Save and categorize content based on your preferences.

This example demonstrates computing the heading between two coordinates using the Geometry library. Drag the markers on the map to see the origin, destination and heading change accordingly.

Read the documentation.

TypeScript

// This example requires the Geometry library. Include the libraries=geometry // parameter when you first load the API. For example: //