Top | ![]() |
![]() |
![]() |
![]() |
GeoclueReverseGeocode contains reverse geocoding methods. It is part of the Geoclue public C client API which uses D-Bus to communicate with the actual provider.
After a GeoclueReverseGeocode is created with
geoclue_reverse_geocode_new()
, the
geoclue_reverse_geocode_position_to_address()
and
geoclue_reverse_geocode_position_to_address_async()
method can be used to
obtain the address of a known position.
void (*GeoclueReverseGeocodeCallback) (GeoclueReverseGeocode *revgeocode
,GHashTable *details
,GeoclueAccuracy *accuracy
,GError *error
,gpointer userdata
);
Callback function for geoclue_reverse_geocode_position_to_address_async()
.
see geoclue-types.h for the
hashtable keys used in details
.
revgeocode |
A GeoclueReverseGeocode object |
|
details |
Address details as GHashTable. |
|
accuracy |
Accuracy of measurement as GeoclueAccuracy |
|
error |
Error as Gerror (may be |
|
userdata |
User data pointer set in |
GeoclueReverseGeocode * geoclue_reverse_geocode_new (const char *service
,const char *path
);
Creates a GeoclueReverseGeocode with given D-Bus service name and path.
gboolean geoclue_reverse_geocode_position_to_address (GeoclueReverseGeocode *revgeocode
,double latitude
,double longitude
,GeoclueAccuracy *position_accuracy
,GHashTable **details
,GeoclueAccuracy **address_accuracy
,GError **error
);
Obtains an address for the position defined by latitude
and longitude
.
details
is a GHashTable with the returned address data, see
If the caller is not interested in some values, the pointers can be
left NULL
. If accuracy of the position is not known, an accuracy with
GeoclueAccuracyLevel GEOCLUE_ACCURACY_DETAILED should be used.
latitude |
latitude in degrees |
|
longitude |
longitude in degrees |
|
position_accuracy |
Accuracy of the given latitude and longitude |
|
details |
Pointer to returned GHashTable with address details or |
|
address_accuracy |
Pointer to accuracy of the returned address or |
|
error |
Pointer to returned Gerror or |
void geoclue_reverse_geocode_position_to_address_async (GeoclueReverseGeocode *revgeocode
,double latitude
,double longitude
,GeoclueAccuracy *accuracy
,GeoclueReverseGeocodeCallback callback
,gpointer userdata
);
Function returns (essentially) immediately and calls callback
when the reverse-geocoded
address data is available or when D-Bus timeouts.
latitude |
Latitude in degrees |
|
longitude |
Longitude in degrees |
|
accuracy |
Accuracy of the given position as GeoclueAccuracy |
|
callback |
A GeoclueAddressCallback function that should be called when return values are available |
|
userdata |
pointer for user specified data |