The Navigator geolocation property is used to return a geolocation object by the browser which can be used to locate a user’s position.
It is a read-only property and is only available on the approval of the user since it can compromise the user’s privacy.
Below program illustrates the Navigator geolocation Property :
Checking the user’s geolocation.
After clicking the button
Supported Browsers: The browser supported by Navigator geolocation are listed below:
- Google Chrome
- Internet Explorer
- HTML | DOM Geolocation position Property
- HTML | DOM Geolocation coordinates Property
- HTML | Navigator userAgent Property
- HTML | Navigator appVersion Property
- HTML | Navigator cookieEnabled Property
- HTML | Navigator onLine Property
- HTML | Navigator platform Property
- HTML | Navigator appName Property
- HTML | Navigator appCodeName Property
- HTML | Navigator product Property
- HTML | Navigator language Property
- HTML | Geolocation
- HTML | DOM Navigator taintEnabled() Method
- HTML | Navigator javaEnabled( ) Method
- How to get city name by using geolocation ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.