Apache Cordova · Schema

Position

A Position object returned by the Apache Cordova Geolocation plugin containing coordinates and timestamp.

ApacheCross-PlatformHybrid AppsJavaScriptMobileOpen SourcePlugins

Properties

Name Type Description
coords object A set of geographic coordinates.
timestamp integer Creation time for coords as a DOMTimeStamp (milliseconds since UNIX epoch).
View JSON Schema on GitHub

JSON Schema

apache-cordova-geolocation-position-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-cordova/refs/heads/main/json-schema/apache-cordova-geolocation-position-schema.json",
  "title": "Position",
  "description": "A Position object returned by the Apache Cordova Geolocation plugin containing coordinates and timestamp.",
  "type": "object",
  "properties": {
    "coords": {
      "type": "object",
      "description": "A set of geographic coordinates.",
      "$id": "#Coordinates",
      "properties": {
        "latitude": {
          "type": "number",
          "description": "Latitude in decimal degrees.",
          "example": 37.7749
        },
        "longitude": {
          "type": "number",
          "description": "Longitude in decimal degrees.",
          "example": -122.4194
        },
        "altitude": {
          "type": "number",
          "description": "Height of the position in meters above the ellipsoid.",
          "example": 15.0
        },
        "accuracy": {
          "type": "number",
          "description": "Accuracy level of the latitude and longitude coordinates in meters.",
          "example": 10.0
        },
        "altitudeAccuracy": {
          "type": ["number", "null"],
          "description": "Accuracy level of the altitude coordinate in meters. null if not available.",
          "example": 5.0
        },
        "heading": {
          "type": ["number", "null"],
          "description": "Direction of travel, specified in degrees counting clockwise relative to true north. null if not available.",
          "example": 180.0
        },
        "speed": {
          "type": ["number", "null"],
          "description": "Current ground speed of the device, specified in meters per second. null if not available.",
          "example": 1.5
        }
      },
      "required": ["latitude", "longitude", "accuracy"]
    },
    "timestamp": {
      "type": "integer",
      "description": "Creation time for coords as a DOMTimeStamp (milliseconds since UNIX epoch).",
      "example": 1718153645993
    }
  },
  "required": ["coords", "timestamp"]
}