GeocodeGlib.Reverse

g GObject.Object GObject.Object GeocodeGlib.Reverse GeocodeGlib.Reverse GObject.Object->GeocodeGlib.Reverse

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new_for_location (location)

resolve ()

resolve_async (cancellable, callback, *user_data)

resolve_finish (res)

set_backend (backend)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GeocodeGlib.Reverse(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GeocodeGlib.ReverseClass

All the fields in the GeocodeGlib.Reverse structure are private and should never be accessed directly.

classmethod new_for_location(location)
Parameters:

location (GeocodeGlib.Location) – a GeocodeGlib.Location object

Returns:

a new GeocodeGlib.Reverse. Use GObject.Object.unref() when done.

Return type:

GeocodeGlib.Reverse

Creates a new GeocodeGlib.Reverse to perform reverse geocoding with. Use GeocodeGlib.Reverse.resolve_async() to perform the resolution.

resolve()
Raises:

GLib.Error

Returns:

A GeocodeGlib.Place instance, or None in case of errors. Free the returned instance with GObject.Object.unref() when done.

Return type:

GeocodeGlib.Place

Gets the result of a reverse geocoding query using the current backend (see GeocodeGlib.Reverse.set_backend()). By default the GNOME Nominatim server is used. See GeocodeGlib.Backend for more information.

If no result could be found, a GeocodeGlib.Error.NOT_SUPPORTED error will be returned. This typically happens if the coordinates to geocode are in the middle of the ocean.

resolve_async(cancellable, callback, *user_data)
Parameters:

Asynchronously gets the result of a reverse geocoding query using a web service. Use GeocodeGlib.Reverse.resolve() to do the same thing synchronously.

When the operation is finished, callback will be called. You can then call GeocodeGlib.Reverse.resolve_finish() to get the result of the operation.

resolve_finish(res)
Parameters:

res (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

A GeocodeGlib.Place instance, or None in case of errors. Free the returned instance with GObject.Object.unref() when done.

Return type:

GeocodeGlib.Place

Finishes a reverse geocoding operation. See GeocodeGlib.Reverse.resolve_async().

set_backend(backend)
Parameters:

backend (GeocodeGlib.Backend or None) – a GeocodeGlib.Backend, or None to use the default one.

Specifies the backend to use in the reverse geocoding operation.

If none is given, the default GNOME Nominatim server is used.

New in version 3.23.1.