1.17 <WebKitGeolocationManager>

Class: <WebKitGeolocationManager>

It derives from <GObject>.

Geolocation manager.

WebKitGeolocationManager provides API to get the geographical position of the user. Once a <WebKitGeolocationPermissionRequest> is allowed, when WebKit needs to know the user location geolocation-manager:start signal is emitted. If the signal is handled and returns #t, the application is responsible for providing the position every time it’s updated by calling geolocation-manager:update-position. The signal geolocation-manager:stop will be emitted when location updates are no longer needed.

Properties

Property: geolocation-manager:enable-high-accuracy self

Whether high accuracy is enabled. This is a read-only property that will be set to #t when a <WebKitGeolocationManager> needs to get accurate position updates. You can connect to notify::enable-high-accuracy signal to monitor it.

Its value is a boolean.

It is read only.

Procedures

Method: geolocation-manager:failed self error-message
Method: failed self error-message

Notify self that determining the position failed.

self

Passed: a <WebKitGeolocationManager>.

a <WebKitGeolocationManager>

error-message

Passed: a string.

the error message

Method: geolocation-manager:get-enable-high-accuracy? self ⇒ %return
Method: get-enable-high-accuracy? self ⇒ %return

Get whether high accuracy is enabled.

self

Passed: a <WebKitGeolocationManager>.

a <WebKitGeolocationManager>

%return

Returned: a boolean.

Whether the setting is enabled.

Method: geolocation-manager:update-position self position
Method: update-position self position

Notify self that position has been updated to position.

self

Passed: a <WebKitGeolocationManager>.

a <WebKitGeolocationManager>

position

Passed: a <WebKitGeolocationPosition>.

a <WebKitGeolocationPosition>

Signals

Signal: geolocation-manager:start

Connect a handler with (connect object geolocation-manager:start handler). It is called as (handler self) ⇒ %return.

The signal is emitted to notify that manager needs to start receiving position updates. After this signal is emitted the user should provide the updates using geolocation-manager:update-position every time the position changes, or use geolocation-manager:failed in case it isn’t possible to determine the current position.

If the signal is not handled, WebKit will try to determine the position using GeoClue if available.

self

Passed: a <WebKitGeolocationManager>.

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: geolocation-manager:stop

Connect a handler with (connect object geolocation-manager:stop handler). It is called as (handler self).

The signal is emitted to notify that manager doesn’t need to receive position updates anymore.

self

Passed: a <WebKitGeolocationManager>.