services.geolocation.geolocation
Summary
Item Index
Methods
Methods
geolocation
Syntax
Summary
Very simple geolocation method based on https://freegeoip.net free geoip service (may not be the most accurate nor the most fast or available, but it's only to have some xhr in the code example).
Example:
geolocation()
.then((result) => {
console.log(result);//there you are
})
.catch(e => {
console.error(e);
});
Parameters:
-
[ipAddress]
String optionalYou can pass a specific IP address to geoloc if you want.