Class GeoLocator

This class manage the geolocation

See theGeoLocator for the one and only one instance of this class

Source : file core/GeoLocator.js at line 39

Constructor

new GeoLocator ( )

The constructor

Source : file core/GeoLocator.js at line 127

Public getters and setters

readonly get status : GEOLOCATION_STATUS

The status of the geolocation

Source : file core/GeoLocator.js at line 136

Public methods

switch ( )

Start or stop the geolocatiion, depending of the status

Source : file core/GeoLocator.js at line 143

Returns

The status after the switch
Type : GEOLOCATION_STATUS

Private properties

#status : GEOLOCATION_STATUS

The current status of the geoLocator.

Source : file core/GeoLocator.js at line 46

#watchId : Number

The id returned by the Geolocation.watchPosition ( ) method

Source : file core/GeoLocator.js at line 55

Private methods

#error ( positionError )

Stop the geolocation because the user don't accept the geolocation or the geolocation is disabled on the device

Source : file core/GeoLocator.js at line 89

Parameters

Name Type Description
positionError GeolocationPositionError

See GeolocationPositionError on mdn

#showPosition ( position )

Send an event to show the current position on the map

Source : file core/GeoLocator.js at line 62

Parameters

Name Type Description
position GeolocationPosition

A JS GeolocationPosition object

#start ( )

Start the geolocation

Source : file core/GeoLocator.js at line 103

#stop ( )

Stop the geolocation

Source : file core/GeoLocator.js at line 70