![]() |
![]() |
![]() |
geocode-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <geocode-glib/geocode-glib.h> struct GeocodeReverse; struct GeocodeReverseClass; GeocodeReverse * geocode_reverse_new_for_location (GeocodeLocation *location
); void geocode_reverse_set_backend (GeocodeReverse *object
,GeocodeBackend *backend
); void geocode_reverse_resolve_async (GeocodeReverse *object
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GeocodePlace * geocode_reverse_resolve_finish (GeocodeReverse *object
,GAsyncResult *res
,GError **error
); GeocodePlace * geocode_reverse_resolve (GeocodeReverse *object
,GError **error
);
struct GeocodeReverse;
All the fields in the GeocodeReverse structure are private and should never be accessed directly.
struct GeocodeReverseClass { };
All the fields in the GeocodeReverseClass structure are private and should never be accessed directly.
GeocodeReverse * geocode_reverse_new_for_location (GeocodeLocation *location
);
Creates a new GeocodeReverse to perform reverse geocoding with.
Use geocode_reverse_resolve_async()
to perform the resolution.
|
a GeocodeLocation object |
Returns : |
a new GeocodeReverse. Use g_object_unref() when done. |
void geocode_reverse_set_backend (GeocodeReverse *object
,GeocodeBackend *backend
);
Specifies the backend to use in the reverse geocoding operation.
If none is given, the default GNOME Nominatim server is used.
|
a GeocodeReverse representing a query |
|
a GeocodeBackend, or NULL to use the default one. [nullable]
|
Since 3.23.1
void geocode_reverse_resolve_async (GeocodeReverse *object
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously gets the result of a reverse geocoding
query using a web service. Use geocode_reverse_resolve()
to do the same
thing synchronously.
When the operation is finished, callback
will be called. You can then call
geocode_reverse_resolve_finish()
to get the result of the operation.
|
a GeocodeReverse representing a query |
|
optional GCancellable object, NULL to ignore. |
|
a GAsyncReadyCallback to call when the request is satisfied |
|
the data to pass to callback function |
GeocodePlace * geocode_reverse_resolve_finish (GeocodeReverse *object
,GAsyncResult *res
,GError **error
);
Finishes a reverse geocoding operation. See geocode_reverse_resolve_async()
.
|
a GeocodeReverse representing a query |
|
a GAsyncResult. |
|
a GError. |
Returns : |
A GeocodePlace instance, or NULL in case of
errors. Free the returned instance with #g_object_unref() when done. [transfer full]
|
GeocodePlace * geocode_reverse_resolve (GeocodeReverse *object
,GError **error
);
Gets the result of a reverse geocoding
query using the current backend (see geocode_reverse_set_backend()
). By
default the GNOME Nominatim server is used. See GeocodeBackend for more
information.
If no result could be found, a GEOCODE_ERROR_NOT_SUPPORTED
error will be
returned. This typically happens if the coordinates to geocode are in the
middle of the ocean.
|
a GeocodeReverse representing a query |
|
a GError |
Returns : |
A GeocodePlace instance, or NULL in case of
errors. Free the returned instance with #g_object_unref() when done. [transfer full]
|