Places Class
Places plugin's front end code
Item Index
Methods
- closest static
- distance static
- distanceLabel static
- heading static
- loadCountries static
- loadGoogleMaps static
Methods
closest
(
Object
static
-
point
-
polyline
Use this method to calculate the closest point on a polyline
Parameters:
Returns:
Object:
contains properties "index", "x", "y", "distance", "fraction"
distance
(
Number
static
-
lat1
-
long1
-
lat2
-
long2
Parameters:
Returns:
Number:
The result, in meters, of applying the haversine formula
distanceLabel
(
String
static
-
meters
-
[units]
Use this method to generate a label for a radius based on a distance in meters
Returns:
String:
Returns a label that looks like "x.y km", "x miles" or "x meters"
heading
(
Number
static
-
lat1
-
long1
-
lat2
-
long2
Use this method to calculate the heading from pairs of coordinates
Parameters:
Returns:
Number:
The heading, in degrees
loadCountries
(
static
-
callback
Parameters:
-
callback
FunctionOnce the callback is called, Q.Places.countries and Q.Places.countries is accessible
loadGoogleMaps
(
static
-
callback
Parameters:
-
callback
FunctionOnce the callback is called, google.maps is accessible