Firefox seems to be leading the way with their position interface, as the current standard does not include support for an address property.
Check out the Geolocation API specifications here.
The Position interface serves as the container for geolocation information provided by this API. The current version of the specification includes one attribute of type Coordinates and a timestamp. Future iterations of the API may introduce additional attributes that offer more details about a given position, such as street addresses.
When using the getCurrentPosition()
Method, the position object returned contains a coordinate property with latitude and longitude values.
navigator.geolocation.getCurrentPosition(function(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
// perform actions based on lat and lng
});
If you require specific street address information, you'll need to utilize a geocoding service like Google Maps Geocoder, which is what Firefox uses to retrieve addresses.