GeocodeGlib.Backend

g GObject.GInterface GObject.GInterface GeocodeGlib.Backend GeocodeGlib.Backend GObject.GInterface->GeocodeGlib.Backend

Implementations:

GeocodeGlib.MockBackend, GeocodeGlib.Nominatim

Methods

forward_search (params, cancellable)

forward_search_async (params, cancellable, callback, *user_data)

forward_search_finish (result)

reverse_resolve (params, cancellable)

reverse_resolve_async (params, cancellable, callback, *user_data)

reverse_resolve_finish (result)

Virtual Methods

do_forward_search (params, cancellable)

do_forward_search_async (params, cancellable, callback, *user_data)

do_forward_search_finish (result)

do_reverse_resolve (params, cancellable)

do_reverse_resolve_async (params, cancellable, callback, *user_data)

do_reverse_resolve_finish (result)

Properties

None

Signals

None

Fields

None

Class Details

class GeocodeGlib.Backend
Bases:

GObject.GInterface

Structure:

GeocodeGlib.BackendInterface

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

New in version 3.23.1.

Parameters:
Raises:

GLib.Error

Returns:

A list of places or None in case of errors. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Gets the result of a forward geocoding query using the self.

If no results are found, a GeocodeGlib.Error.NO_MATCHES error is returned.

This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version (GeocodeGlib.Backend.forward_search_async()) is more appropriate. See its documentation for more information on usage.

New in version 3.23.1.

forward_search_async(params, cancellable, callback, *user_data)
Parameters:

Asynchronously performs a forward geocoding query using the self. Use GeocodeGlib.Backend.forward_search() to do the same thing synchronously.

The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.

See also: XEP-0080 specification.

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

New in version 3.23.1.

forward_search_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

A list of places or None in case of errors. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Finishes a forward geocoding operation. See GeocodeGlib.Backend.forward_search_async().

New in version 3.23.1.

reverse_resolve(params, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

A list of GeocodeGlib.Place instances, or None in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Gets the result of a reverse geocoding query using the self.

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.

This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version, GeocodeGlib.Backend.forward_search_async(), is more appropriate. See its documentation for more information on usage.

New in version 3.23.1.

reverse_resolve_async(params, cancellable, callback, *user_data)
Parameters:

Asynchronously gets the result of a reverse geocoding query using the backend.

Typically, a single result will be returned representing the place at a given latitude and longitude (the lat and lon keys to params); but in some cases the results will be ambiguous and *multiple* results will be returned. They will be returned in order of relevance, with the most relevant result first in the list.

The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.

See also: XEP-0080 specification.

Use GeocodeGlib.Backend.reverse_resolve() to do the same thing synchronously.

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

New in version 3.23.1.

reverse_resolve_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

A list of GeocodeGlib.Place instances, or None in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Finishes a reverse geocoding operation. See GeocodeGlib.Backend.reverse_resolve_async().

New in version 3.23.1.

Parameters:
Returns:

A list of places or None in case of errors. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Gets the result of a forward geocoding query using the backend.

If no results are found, a GeocodeGlib.Error.NO_MATCHES error is returned.

This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version (GeocodeGlib.Backend.forward_search_async()) is more appropriate. See its documentation for more information on usage.

New in version 3.23.1.

do_forward_search_async(params, cancellable, callback, *user_data) virtual
Parameters:

Asynchronously performs a forward geocoding query using the backend. Use GeocodeGlib.Backend.forward_search() to do the same thing synchronously.

The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.

See also: XEP-0080 specification.

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

New in version 3.23.1.

do_forward_search_finish(result) virtual
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Returns:

A list of places or None in case of errors. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Finishes a forward geocoding operation. See GeocodeGlib.Backend.forward_search_async().

New in version 3.23.1.

do_reverse_resolve(params, cancellable) virtual
Parameters:
Returns:

A list of GeocodeGlib.Place instances, or None in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Gets the result of a reverse geocoding query using the backend.

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.

This is a synchronous function, which means it may block on network requests. In most situations, the asynchronous version, GeocodeGlib.Backend.forward_search_async(), is more appropriate. See its documentation for more information on usage.

New in version 3.23.1.

do_reverse_resolve_async(params, cancellable, callback, *user_data) virtual
Parameters:

Asynchronously gets the result of a reverse geocoding query using the backend.

Typically, a single result will be returned representing the place at a given latitude and longitude (the lat and lon keys to params); but in some cases the results will be ambiguous and *multiple* results will be returned. They will be returned in order of relevance, with the most relevant result first in the list.

The params hash table is in the format used by Telepathy, and documented in the Telepathy specification.

See also: XEP-0080 specification.

Use GeocodeGlib.Backend.reverse_resolve() to do the same thing synchronously.

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

New in version 3.23.1.

do_reverse_resolve_finish(result) virtual
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Returns:

A list of GeocodeGlib.Place instances, or None in case of errors. The list is ordered by relevance, with most relevant results first. Free the returned instances with GObject.Object.unref() and the list with g_list_free() when done.

Return type:

[GeocodeGlib.Place]

Finishes a reverse geocoding operation. See GeocodeGlib.Backend.reverse_resolve_async().

New in version 3.23.1.