core.addons.CoreLocation Class
The main class that implements HTML5 Geolocation functions.
Constructor
core.addons.CoreLocation
-
opts
Parameters:
-
opts
ObjectAn object containing configurations required by the Core derived class.
-
el
HTMLElementThe node element included in the class composition.
-
Item Index
Methods
getDistanceFromCurrentLocation
-
point
Retrieves the distance from the last detected position. Returns distance result in km.
Parameters:
-
point
ObjectAn object containing latitude and longitude properties.
-
latitude
NumberThe latitude of the value to calculate distance.
-
longitude
NumberThe longitude of the value to calculate distance.
-
getDistanceFromLocations
-
point1
-
point2
Calculates the distance between 2 coordinates.
Parameters:
-
point1
ObjectAn object containing latitude and longitude properties.
-
latitude
NumberThe latitude of the value to calculate distance.
-
longitude
NumberThe longitude of the value to calculate distance.
-
-
point2
ObjectAn object containing latitude and longitude properties.
-
latitude
NumberThe latitude of the value to calculate distance.
-
longitude
NumberThe longitude of the value to calculate distance.
-
update
()
Refreshes current location and last known location. Runs geolocation check again.