location module
Interfaces
Location | |
LocationProps |
Type Aliases
getLocationCallbackFunctionType |
Get location callback function type |
showLocationCallbackFunctionType |
Show location callback function type |
Functions
get |
|
is |
|
show |
Function Details
getLocation(LocationProps, getLocationCallbackFunctionType)
Warning
This API is now deprecated.
As of 2.1.0, please use one of the following functions:
- geoLocation.getCurrentLocation(): Promise<Location> to get the current location.
- geoLocation.map.chooseLocation(): Promise<Location> to choose location on map.
Fetches user location
function getLocation(props: LocationProps, callback: getLocationCallbackFunctionType)
Parameters
- props
- LocationProps
LocationProps - Specifying how the location request is handled
- callback
- getLocationCallbackFunctionType
Callback to invoke when current user location is fetched
isSupported()
Warning
This API is now deprecated.
As of 2.1.0, please use geoLocation namespace, and use geoLocation.isSupported: boolean to check if geoLocation is supported.
Checks if Location capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether Location is supported
showLocation(Location, showLocationCallbackFunctionType)
Warning
This API is now deprecated.
As of 2.1.0, please use geoLocation.map.showLocation(location: Location): Promise<void> instead.
Shows the location on map corresponding to the given coordinates
function showLocation(location: Location, callback: showLocationCallbackFunctionType)
Parameters
- location
- Location
Location to be shown on the map
- callback
- showLocationCallbackFunctionType
Callback to invoke when the location is opened on map