Tizen Native API
|
Functions | |
int | maps_service_search_place (const maps_service_h maps, const maps_coordinates_h position, int distance, const maps_place_filter_h filter, maps_preference_h preference, maps_service_search_place_cb callback, void *user_data, int *request_id) |
Queries a Place information by a coordinates position and a distance. The request is asynchronous. | |
int | maps_service_search_place_by_area (const maps_service_h maps, const maps_area_h boundary, const maps_place_filter_h filter, maps_preference_h preference, maps_service_search_place_cb callback, void *user_data, int *request_id) |
Queries a Place information by a coordinates boundary. The request is asynchronous. | |
int | maps_service_search_place_by_address (const maps_service_h maps, const char *address, const maps_area_h boundary, const maps_place_filter_h filter, maps_preference_h preference, maps_service_search_place_cb callback, void *user_data, int *request_id) |
Queries a Place information by a free-formed address string. The request is asynchronous. | |
Typedefs | |
typedef bool(* | maps_service_search_place_cb )(maps_error_e error, int request_id, int index, int total, maps_place_h place, void *user_data) |
Called for each result of Place Search request. |
This provides APIs for Place Service.
The Maps Place API allows to find places that are relevant to user discovery context.
Typedef Documentation
typedef bool(* maps_service_search_place_cb)(maps_error_e error, int request_id, int index, int total, maps_place_h place, void *user_data) |
Called for each result of Place Search request.
The Maps Service invokes this callback while iterating through the set of obtained Place data.
If search is failed, the value of total is 0 and place is NULL
- Since :
- 2.4
- Remarks:
- The parameter place must be released using maps_place_destroy().
- Parameters:
-
[in] error The result of request [in] request_id The request id [in] index The current index of place data in result set, start from 0 [in] total The total number of results [in] place The resulting Place data [in] uesr_data The user data passed from maps_service_search_place(), maps_service_search_place_by_area() or maps_service_search_place_by_address()
- Returns:
true
to continue with the next iteration of the loop,
false
to break out of the loop
- Precondition:
- maps_service_search_place(), maps_service_search_place_by_area() or maps_service_search_place_by_address() will invoke this callback.
Function Documentation
int maps_service_search_place | ( | const maps_service_h | maps, |
const maps_coordinates_h | position, | ||
int | distance, | ||
const maps_place_filter_h | filter, | ||
maps_preference_h | preference, | ||
maps_service_search_place_cb | callback, | ||
void * | user_data, | ||
int * | request_id | ||
) |
Queries a Place information by a coordinates position and a distance. The request is asynchronous.
This function obtains the Place information for a specified distance around a given coordinates position.
- 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 search request use maps_service_cancel_request().
To check if Maps Provider is capable of Place Search and which Place preferences are supported, see the lists of capacities and preferences above.
The distance unit for searching places supports metric but doesn't support imperial. Even though applications set maps_distance_unit_e using maps_preference_set_distance_unit(), the unit of distance is meter.
- Parameters:
-
[in] maps The Maps Service handle [in] position The interested position [in] distance The search area distance in meters [in] filter The filter handle [in] preference The place preference handle [in] callback The result callback [in] user_data The user data to be passed to the callback function [out] request_id The request id
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_NOT_FOUND Result not found MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key MAPS_ERROR_RESOURCE_BUSY Places service busy MAPS_ERROR_CANCELED Places service aborted MAPS_ERROR_UNKNOWN Unknown error
- Precondition:
- Call maps_service_create() to create Maps Service and obtain its handle.
- Postcondition:
- It invokes maps_service_search_place_cb() to deliver obtained Place information.
int maps_service_search_place_by_address | ( | const maps_service_h | maps, |
const char * | address, | ||
const maps_area_h | boundary, | ||
const maps_place_filter_h | filter, | ||
maps_preference_h | preference, | ||
maps_service_search_place_cb | callback, | ||
void * | user_data, | ||
int * | request_id | ||
) |
Queries a Place information by a free-formed address string. The request is asynchronous.
This function obtains the Place information for a specified 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.
boundary is supporting only circle type bounds for search.
To cancel the search request use maps_service_cancel_request().
To check if Maps Provider is capable of Place Search and which Place preferences are supported, see the lists of capacities and preferences above.
- Parameters:
-
[in] maps The Maps Service handle [in] address The interested address [in] boundary The interested area [in] filter The filter handle [in] preference The place preference handle [in] callback The result callback [in] user_data The user data to be passed to the callback function [out] request_id The request id
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_NOT_FOUND Result not found MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key MAPS_ERROR_RESOURCE_BUSY Places service busy MAPS_ERROR_CANCELED Places service aborted MAPS_ERROR_UNKNOWN Unknown error
- Precondition:
- Call maps_service_create() to create Maps Service and obtain its handle.
- Postcondition:
- It invokes maps_service_search_place_cb() to deliver obtained Place information.
int maps_service_search_place_by_area | ( | const maps_service_h | maps, |
const maps_area_h | boundary, | ||
const maps_place_filter_h | filter, | ||
maps_preference_h | preference, | ||
maps_service_search_place_cb | callback, | ||
void * | user_data, | ||
int * | request_id | ||
) |
Queries a Place information by a coordinates boundary. The request is asynchronous.
This function obtains the Place information for a specified coordinates boundary.
- 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.
boundary is supporting only circle type bounds for search.
To cancel the search request use maps_service_cancel_request().
To check if Maps Provider is capable of Place Search and which Place preferences are supported, see the lists of capacities and preferences above.
The distance unit for searching places doesn't support imperial but supports metric. Even though applications set maps_distance_unit_e using maps_preference_set_distance_unit(), the unit of radius of boundary is meter.
- Parameters:
-
[in] maps The Maps Service handle [in] boundary The interested area [in] filter The filter handle [in] preference The place preference handle [in] callback The result callback [in] user_data The user data to be passed to the callback function [out] request_id The request id
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_NOT_FOUND Result not found MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key MAPS_ERROR_RESOURCE_BUSY Places service busy MAPS_ERROR_CANCELED Places service aborted MAPS_ERROR_UNKNOWN Unknown error
- Precondition:
- Call maps_service_create() to create Maps Service and obtain its handle.
- Postcondition:
- It invokes maps_service_search_place_cb() to deliver obtained Place information.