core.addons.CoreLocation Class
The main class that implements HTML5 Geolocation functions.
Constructor
core.addons.CoreLocation
-
opts
Parameters:
-
optsObjectAn object containing configurations required by the Core derived class.
-
elHTMLElementThe 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:
-
pointObjectAn object containing latitude and longitude properties.
-
latitudeNumberThe latitude of the value to calculate distance.
-
longitudeNumberThe longitude of the value to calculate distance.
-
getDistanceFromLocations
-
point1 -
point2
Calculates the distance between 2 coordinates.
Parameters:
-
point1ObjectAn object containing latitude and longitude properties.
-
latitudeNumberThe latitude of the value to calculate distance.
-
longitudeNumberThe longitude of the value to calculate distance.
-
-
point2ObjectAn object containing latitude and longitude properties.
-
latitudeNumberThe latitude of the value to calculate distance.
-
longitudeNumberThe longitude of the value to calculate distance.
-
update
()
Refreshes current location and last known location. Runs geolocation check again.
