This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

longitude

Summary

Geographic longitude specified in decimal degrees.

Property of apis/geolocation/Coordinatesapis/geolocation/Coordinates

Syntax

Note: This property is read-only.

var result = Coordinates.longitude;

Return Value

Returns an object of type NumberNumber

Examples

alert('Current coordinates are latitude: ' + position.coords.latitude + ' and longitude: ' + position.coords.longitude);

Related specifications

W3C Geolocation Specification
W3C Editor’s Draft

Attributions