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.Reversestructure are private and should never be accessed directly.- classmethod new_for_location(location)¶
- Parameters:
location (
GeocodeGlib.Location) – aGeocodeGlib.Locationobject- Returns:
a new
GeocodeGlib.Reverse. UseGObject.Object.unref() when done.- Return type:
Creates a new
GeocodeGlib.Reverseto perform reverse geocoding with. UseGeocodeGlib.Reverse.resolve_async() to perform the resolution.
- resolve()¶
- Raises:
- Returns:
A
GeocodeGlib.Placeinstance, orNonein 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.Backendfor more information.If no result could be found, a
GeocodeGlib.Error.NOT_SUPPORTEDerror 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.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – 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.Placeinstance, orNonein 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.BackendorNone) – aGeocodeGlib.Backend, orNoneto 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.