Tizen Native API

Functions

int maps_service_geocode (const maps_service_h maps, const char *address, const maps_preference_h preference, maps_service_geocode_cb callback, void *user_data, int *request_id)
 Gets the position coordinates for a given address. The request is asynchronous.
int maps_service_geocode_inside_area (const maps_service_h maps, const char *address, const maps_area_h bounds, const maps_preference_h preference, maps_service_geocode_cb callback, void *user_data, int *request_id)
 Gets the position for a given address, within the specified bounding box. The request is asynchronous.
int maps_service_geocode_by_structured_address (const maps_service_h maps, const maps_address_h address, const maps_preference_h preference, maps_service_geocode_cb callback, void *user_data, int *request_id)
 Gets the position coordinates for a given address. The request is asynchronous.
int maps_service_reverse_geocode (const maps_service_h maps, double latitude, double longitude, const maps_preference_h preference, maps_service_reverse_geocode_cb callback, void *user_data, int *request_id)
 Gets the address for a given position coordinates. The request is asynchronous.

Typedefs

typedef bool(* maps_service_geocode_cb )(maps_error_e result, int request_id, int index, int total, maps_coordinates_h coordinates, void *user_data)
 Called once for each position coordinates converted from the given address information.
typedef void(* maps_service_reverse_geocode_cb )(maps_error_e result, int request_id, int index, int total, maps_address_h address, void *user_data)
 Called when the address information is converted from position information.

This provides APIs for Geocoder Service.

The Maps Geocoding API allows mapping an address to its geographical location defined in terms of latitude and longitude; the input can be a qualified, structured address or a free form single search text with full or partial address information.
The Maps Reverse Geocoding API allows to inverse mapping a geographical location (longitude, latitude) to an address; it can be used to answer the question "Where am I?".


Typedef Documentation

typedef bool(* maps_service_geocode_cb)(maps_error_e result, int request_id, int index, int total, maps_coordinates_h coordinates, void *user_data)

Called once for each position coordinates converted from the given address information.

The Maps Service invokes this callback while iterating through the list of obtained coordinates of the specified place.
If search is failed, the value of total is 0 and coordinates is NULL

Since :
2.4
Remarks:
The parameter coordinates must be released using maps_coordinates_destroy().
Parameters:
[in]resultThe result of request
[in]request_idThe id of request
[in]indexThe current index of coordinates in result set, start from 0
[in]totalThe total number of results
[in]coordinatesThe coordinates of the place
[in]user_dataThe user data passed from maps_service_geocode() or maps_service_geocode_inside_area()
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
maps_service_geocode() or maps_service_geocode_inside_area() will invoke this callback.
See also:
maps_service_geocode()
maps_service_geocode_inside_area()
maps_service_cancel_request()
typedef void(* maps_service_reverse_geocode_cb)(maps_error_e result, int request_id, int index, int total, maps_address_h address, void *user_data)

Called when the address information is converted from position information.

The Maps Service invokes this callback when the address is obtained from the specified coordinates.
If search is failed, the value of total is 0 and address is NULL

Remarks:
The parameter address must be released using maps_address_destroy().
Since :
2.4
Parameters:
[in]resultThe result of request
[in]request_idThe id of request
[in]indexThe current index of address data in result set, start from 0
[in]totalThe total number of results
[in]addressThe requested address information
[in]user_dataThe user data passed from maps_service_reverse_geocode()
Precondition:
maps_service_reverse_geocode() will invoke this callback.
See also:
maps_service_reverse_geocode()
maps_service_cancel_request()

Function Documentation

int maps_service_geocode ( const maps_service_h  maps,
const char *  address,
const maps_preference_h  preference,
maps_service_geocode_cb  callback,
void *  user_data,
int *  request_id 
)

Gets the position coordinates for a given address. The request is asynchronous.

This function obtains position coordinates for a given free-formed address string.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
http://tizen.org/privilege/internet is needed to access internet.
To cancel the request, use maps_service_cancel_request().
To check if Maps Provider is capable of geocoding and which preferences of geocoding are supported, see the lists of capacities and preferences above.
Parameters:
[in]mapsThe Maps Service handle
[in]addressThe free-formed address
[in]preferenceThe set of preferences for processing geocoding
[in]callbackThe callback which will receive position coordinates
[in]user_dataThe user data to be passed to the callback function
[out]request_idThe id of request
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NETWORK_UNREACHABLENetwork connection failed
MAPS_ERROR_SERVICE_NOT_AVAILABLEService not available
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_KEY_NOT_AVAILABLEInvalid key
MAPS_ERROR_UNKNOWNUnknown error
Precondition:
Call maps_service_create() to create Maps Service and obtain its handle.
Postcondition:
It invokes maps_service_geocode_cb() to deliver obtained position coordinates.
See also:
maps_service_geocode_inside_area()
maps_service_geocode_cb()
maps_service_cancel_request()
maps_service_reverse_geocode()
int maps_service_geocode_by_structured_address ( const maps_service_h  maps,
const maps_address_h  address,
const maps_preference_h  preference,
maps_service_geocode_cb  callback,
void *  user_data,
int *  request_id 
)

Gets the position coordinates for a given address. The request is asynchronous.

This function obtains position coordinates for a given structured address.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
http://tizen.org/privilege/internet is needed to access internet.
To cancel the request, use maps_service_cancel_request().
To check if Maps Provider is capable of geocoding and which preferences of geocoding are supported, see the lists of capacities and preferences above.
Parameters:
[in]mapsThe Maps Service handle
[in]addressThe structured address
[in]preferenceThe set of preferences for processing geocoding
[in]callbackThe callback which will receive position coordinates
[in]user_dataThe user data to be passed to the callback function
[out]request_idThe id of request
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NETWORK_UNREACHABLENetwork connection failed
MAPS_ERROR_SERVICE_NOT_AVAILABLEService not available
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_KEY_NOT_AVAILABLEInvalid key
MAPS_ERROR_UNKNOWNUnknown error
Precondition:
Call maps_service_create() to create Maps Service and obtain its handle.
Postcondition:
It invokes maps_service_geocode_cb() to deliver obtained position coordinates.
See also:
maps_service_geocode()
maps_service_geocode_inside_area()
maps_service_geocode_cb()
maps_service_cancel_request()
maps_service_reverse_geocode()
int maps_service_geocode_inside_area ( const maps_service_h  maps,
const char *  address,
const maps_area_h  bounds,
const maps_preference_h  preference,
maps_service_geocode_cb  callback,
void *  user_data,
int *  request_id 
)

Gets the position for a given address, within the specified bounding box. The request is asynchronous.

This function obtains position coordinates for a given free-formed address string within the specified bounding box.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
http://tizen.org/privilege/internet is needed to access internet.
Polygonal bounding box is not supported.
To cancel the request, use maps_service_cancel_request().
To check if Maps Provider is capable of geocoding and which preferences of geocoding are supported, see the lists of capacities and preferences above.
Parameters:
[in]mapsThe Maps Service handle
[in]addressThe free-formed address
[in]boundsThe bounding box
[in]preferenceThe set of preferences for processing geocoding
[in]callbackThe callback which will receive position coordinates
[in]user_dataThe user data to be passed to the callback function
[out]request_idThe id of request
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NETWORK_UNREACHABLENetwork connection failed
MAPS_ERROR_SERVICE_NOT_AVAILABLEService not available
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
MAPS_ERROR_KEY_NOT_AVAILABLEInvalid key
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_KEY_NOT_AVAILABLEInvalid key
MAPS_ERROR_UNKNOWNUnknown error
Precondition:
Call maps_service_create() to create Maps Service and obtain its handle.
Postcondition:
It invokes maps_service_geocode_cb() to deliver obtained position coordinates.
See also:
maps_service_geocode_by_structured_address()
maps_service_geocode_inside_area()
maps_service_geocode_cb()
maps_service_geocode()
maps_service_cancel_request()
maps_service_reverse_geocode()
int maps_service_reverse_geocode ( const maps_service_h  maps,
double  latitude,
double  longitude,
const maps_preference_h  preference,
maps_service_reverse_geocode_cb  callback,
void *  user_data,
int *  request_id 
)

Gets the address for a given position coordinates. The request is asynchronous.

This function obtains structured address information for a given position coordinates.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
http://tizen.org/privilege/internet is needed to access internet.
To cancel the request, use maps_service_cancel_request().
To check if Maps Provider is capable of reverse geocoding and which preferences of reverse geocoding are supported, see the lists of capacities and preferences above.
Parameters:
[in]mapsThe Maps Service handle
[in]latitudeThe latitude [-90.0 ~ 90.0] (degrees)
[in]longitudeThe longitude [-180.0 ~ 180.0] (degrees)
[in]preferenceThe set of preferences for processing reverse geocoding
[in]callbackThe callback which will receive address information
[in]user_dataThe user data to be passed to the callback function
[out]request_idThe id of request
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NETWORK_UNREACHABLENetwork connection failed
MAPS_ERROR_SERVICE_NOT_AVAILABLEService not available
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_KEY_NOT_AVAILABLEInvalid key
MAPS_ERROR_UNKNOWNUnknown error
Precondition:
Call maps_service_create() to create Maps Service and obtain its handle.
Postcondition:
This function invokes maps_service_reverse_geocode_cb().
See also:
maps_service_reverse_geocode_cb()
maps_service_cancel_request()
maps_service_geocode()