How do I know if geolocation is enabled?

Duyên Trương

New member
How do I know if geolocation is enabled?
Answer
Check if Geolocation is supported. If supported,
run the getCurrentPosition() method. If not, display a message to the user. If the getCurrentPosition() method is successful, it returns a coordinates object to the function specified in the parameter (showPosition)
 

Tìm kiếm

Back
Top