July 10, 2020
How does getCurrentPosition() work in the HTML5 geolocation API?
NI
How does getCurrentPosition() work in the HTML5 geolocation API?
GT
Answer
by Geo Targetly
The getCurrentPosition() method obtains the current position of the device. It works by entering the following syntax navigator.geolocation.getCurrentPosition(success[,error[, [options]]). The code can trigger three different conditions: A successful callback, an error callback and an optional PostionsOptions object.
Tags: