Name

Geoposition — a timestamped position report

Synopsis

A Geoposition object represents the user’s geographical position at a specific time. Objects of this type have only two properties: a timestamp and a reference to a Geocoordinates object that holds the actual position properties.

Properties

readonly Geocoordinates coords

This property refers to a Geocoordinates object whose properties specify the user’s latitude, longitude, etc.

readonly unsigned long timestamp

The time at which those coordinates were valid, in milliseconds since the epoch. You can use this value to create a Date object if desired.

Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.