Places location Class
Allows the logged-in user to add his own locations and select among these locations
Constructor
Places location
-
[options]
Parameters:
-
[options]
Object optionalused to pass options
-
[publisherId=Q.Users.loggedInUserId()]
String optionalOverride the publisherId for saving new locations.
-
[geocode]
Object optionalDefault google location object, if available
-
[location]
Places.Coordinates optionalProvide a location to start off with. Can be anything that is accepted by Places.Coordinates constructor.
-
[showCurrent=true]
Boolean optionalWhether to allow user to select current location
-
[showLocations=true]
Boolean optionalWhether to allow user to select their saved locations
-
[showAddress=true]
Boolean optionalWhether to allow user to enter a custom address
-
[showAreas=false]
Boolean optionalWhether to show Places/areas tool for selected location
-
[onChoose]
Q.Event optionalUser selected some valid location. First parameter is Places.Coordinates object.
-
Item Index
Methods
getCurrentPosition
-
[success]
-
[fail]
Get current geolocation
refresh
()
Refresh the display
selectLocation
()
Render template with locations, so user can select one of them
toggle
-
elem
Make some needed actions when user select some other location.
Parameters:
-
elem
HTMLElementSelected currently element