WebKit2.GeolocationPosition

Fields

None

Methods

class

new (latitude, longitude, accuracy)

copy ()

free ()

set_altitude (altitude)

set_altitude_accuracy (altitude_accuracy)

set_heading (heading)

set_speed (speed)

set_timestamp (timestamp)

Details

class WebKit2.GeolocationPosition

An opaque struct to provide position updates to a WebKit2.GeolocationManager.

WebKit2.GeolocationPosition is an opaque struct used to provide position updates to a WebKit2.GeolocationManager using WebKit2.GeolocationManager.update_position().

New in version 2.26.

classmethod new(latitude, longitude, accuracy)
Parameters:
  • latitude (float) – a valid latitude in degrees

  • longitude (float) – a valid longitude in degrees

  • accuracy (float) – accuracy of location in meters

Returns:

a newly created WebKit2.GeolocationPosition

Return type:

WebKit2.GeolocationPosition

Create a new WebKit2.GeolocationPosition.

New in version 2.26.

copy()
Returns:

a copy of self

Return type:

WebKit2.GeolocationPosition

Make a copy of the WebKit2.GeolocationPosition.

New in version 2.26.

free()

Free the WebKit2.GeolocationPosition

New in version 2.26.

set_altitude(altitude)
Parameters:

altitude (float) – altitude in meters

Set the self altitude.

New in version 2.26.

set_altitude_accuracy(altitude_accuracy)
Parameters:

altitude_accuracy (float) – accuracy of position altitude in meters

Set the accuracy of self altitude.

New in version 2.26.

set_heading(heading)
Parameters:

heading (float) – heading in degrees

Set the self heading.

Set the self heading, as a positive angle between the direction of movement and the North direction, in clockwise direction.

New in version 2.26.

set_speed(speed)
Parameters:

speed (float) – speed in meters per second

Set the self speed.

New in version 2.26.

set_timestamp(timestamp)
Parameters:

timestamp (int) – timestamp in seconds since the epoch, or 0 to use current time

Set the self timestamp.

By default it’s the time when the self was created.

New in version 2.26.