Computer Science, asked by GADAM3624, 1 year ago

How to use geolocation coordinates in HTML5?

Answers

Answered by Yogesh0970
0

Tutorialspoint

Search your favorite tutorials...

How to use geolocation coordinates in HTML5?

I want to use geolocation coordinates in HTML5 to show the geographic location. For my website, I want to retrieve the current geographic location of the device so that I can easily give results to users on the basis of current location. How can I use geolocation coordinates in HTML?

Follow Answer 96

1 Answer

Nishtha Thakur

Nishtha Thakur

Answered on 24th Jan, 2018

HTML5 Geolocation API lets you share your location with your favorite websites. A Javascript can capture your latitude and longitude and can be sent to backend web server and do fancy location-aware things like finding local businesses or showing your location on a map. The geolocation coordinates specifies the geographic location of the device.

Geolocation methods getCurrentPosition() and getPositionUsingMethodName() specify the callback method that retrieves the location information. These methods are called asynchronously to an object Position which stores the complete location information.

The Position object specifies the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed.

The properties of the position object include:

Similar questions