---
title: "getCardinalDirection | Weather SDK | JavaScript maps SDK"
description: "Documentation for Weather JS"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs-qmgv.pages.dev/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Function getCardinalDirection

-   getCardinalDirection(angle: number): string[](#getcardinaldirection)
    
    Get the cardinal direction based on an angle with
    
    -   `0°`: true north
    -   `90°`: east
    -   `180°`: south
    -   `270°`: west
    
    #### Parameters
    
    -   angle: number
    
    #### Returns string
