Namespace: Geo

WonderPushSDK. Geo

Methods


fake(location)

Permits to override the geolocation using a fake location. Works even if the browser does not support the Geolocation API, or geolocation has been disabled or permission has been denied.

Parameters:
Name Type Description
location Object | null

The fake geolocation to use, or null to remove.

Properties
Name Type Description
lat number

Fake location latitude in degrees

lon number

Fake location longitude in degrees


useGeolocation(enable)

Dynamically enables or disables the use of the Geolocation API. You can automatically enable it using {"geolocation": true} in the options given to WonderPush.init function

Parameters:
Name Type Description
enable boolean | string

true/false, or "auto" to detect existing permission.