GeocodeGlib.Reverse¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GeocodeGlib.Reverse(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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
) – aGeocodeGlib.Location
object- Returns:
a new
GeocodeGlib.Reverse
. UseGObject.Object.unref
() when done.- Return type:
Creates a new
GeocodeGlib.Reverse
to perform reverse geocoding with. UseGeocodeGlib.Reverse.resolve_async
() to perform the resolution.
- resolve()¶
- Raises:
- Returns:
A
GeocodeGlib.Place
instance, orNone
in case of errors. Free the returned instance withGObject.Object.unref
() when done.- Return type:
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. SeeGeocodeGlib.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:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
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
) – aGio.AsyncResult
.- Raises:
- Returns:
A
GeocodeGlib.Place
instance, orNone
in case of errors. Free the returned instance withGObject.Object.unref
() when done.- Return type:
Finishes a reverse geocoding operation. See
GeocodeGlib.Reverse.resolve_async
().
- set_backend(backend)¶
- Parameters:
backend (
GeocodeGlib.Backend
orNone
) – aGeocodeGlib.Backend
, orNone
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.