Analysis
analyzeGeometry reads a line you already have, such as a GPX track or a line drawn on a map. It tells you what kind of way each stretch follows, how steep it is, and how long the line takes to travel.
Every routed result already carries this analysis under routes[].analysis. Call analyzeGeometry for a line that came from somewhere else.
Every sample on this page reuses this setup. It mints a session token with your secret key, so run it on your server.
This line climbs a trail toward Montenvers, above Chamonix. Coordinates are [longitude, latitude].
Each entry covers the positions from fromIndex to toIndex in the coordinates you sent. Slopes are in degrees, positive uphill. duration is the travel time in seconds over that ground, with the same model directions uses.
advisories reports any tollway or access-restricted way the line crosses. See hazards and avoidance.
Each routed activity uses a profile tuned to its terrain and movement style. Most activities support turn-by-turn routing, road cycling among them. Backcountry skiing is freehand-line only: no query routes it. Gravel biking and mountain biking are unavailable: the activity catalog does not list them, and every query refuses them, analyzeGeometry included. The GraphQL ActivitySlug enum uses the uppercase value; the Map Studio and Tile APIs use the kebab-case wire form, the same value lowercased with each underscore turned into a hyphen.