Tizen Native API
5.5
|
This provides APIs related to Geographical Coordinates.
Functions | |
int | maps_coordinates_create (const double latitude, const double longitude, maps_coordinates_h *coordinates) |
Creates a new instance of Geographical Coordinates and initiates a handle with it. | |
int | maps_coordinates_destroy (maps_coordinates_h coordinates) |
Destroys the Geographical Coordinates and releases all its resources. | |
int | maps_coordinates_clone (const maps_coordinates_h origin, maps_coordinates_h *cloned) |
Clones the Geographical Coordinates. | |
int | maps_coordinates_get_latitude (const maps_coordinates_h coordinates, double *latitude) |
Gets the latitude of the coordinates. | |
int | maps_coordinates_get_longitude (const maps_coordinates_h coordinates, double *longitude) |
Gets the longitude of the coordinates. | |
int | maps_coordinates_get_latitude_longitude (const maps_coordinates_h coordinates, double *latitude, double *longitude) |
Gets the latitude and longitude of the coordinates. | |
int | maps_coordinates_set_latitude (maps_coordinates_h coordinates, const double latitude) |
Sets the latitude of the coordinates. | |
int | maps_coordinates_set_longitude (maps_coordinates_h coordinates, const double longitude) |
Sets the longitude of the coordinates. | |
int | maps_coordinates_set_latitude_longitude (maps_coordinates_h coordinates, const double latitude, const double longitude) |
Sets the latitude and longitude of the coordinates. | |
int | maps_coordinates_list_create (maps_coordinates_list_h *coordinates_list) |
Creates a coordinates list having a set of coordinates. | |
int | maps_coordinates_list_destroy (maps_coordinates_list_h coordinates_list) |
Frees all of the memory used by a coordinates list. | |
int | maps_coordinates_list_append (maps_coordinates_list_h coordinates_list, maps_coordinates_h coordinates) |
Appends a coordinates to a coordinates list. | |
int | maps_coordinates_list_remove (maps_coordinates_list_h coordinates_list, maps_coordinates_h coordinates) |
Removes a coordinates from a coordinates list. | |
int | maps_coordinates_list_get_length (maps_coordinates_list_h coordinates_list, int *length) |
Gets the number of elements in a coordinates list. | |
int | maps_coordinates_list_foreach (maps_coordinates_list_h coordinates_list, maps_coordinates_cb callback, void *user_data) |
Retrieves all coordinates by invoking a specific callback for each coordinates of coordinates list. | |
Typedefs | |
typedef void * | maps_coordinates_h |
Handle of the Geographical Coordinates. | |
typedef struct _maps_coordinates_s | maps_coordinates_s |
Structure of the Geographical Coordinates. | |
typedef void * | maps_coordinates_list_h |
The coordinates list handle. | |
typedef bool(* | maps_coordinates_cb )(int index, maps_coordinates_h coordinates, void *user_data) |
Called iteratively to get a coordinates information. |
typedef bool(* maps_coordinates_cb)(int index, maps_coordinates_h coordinates, void *user_data) |
Called iteratively to get a coordinates information.
[in] | index | The index of iteration |
[in] | coordinates | The handle of coordinates |
[in] | user_data | The user data passed from the foreach function |
true
to continue with the next iteration of the loop,false
to break out of the loop typedef void* maps_coordinates_h |
Handle of the Geographical Coordinates.
The Geographical Coordinates handle can be obtained via call of maps_coordinates_create().
typedef void* maps_coordinates_list_h |
The coordinates list handle.
The coordinates list handle can be obtained via calling of maps_coordinates_list_create().
typedef struct _maps_coordinates_s maps_coordinates_s |
Structure of the Geographical Coordinates.
This structure represents a Geographical Coordinates, specified with a latitude and longitude values.
The latitude must be in range of [-90.0, 90.0].
The longitude must be in range of [-180.0, 180.0].
int maps_coordinates_clone | ( | const maps_coordinates_h | origin, |
maps_coordinates_h * | cloned | ||
) |
Clones the Geographical Coordinates.
This function makes a clone of the origin Geographical Coordinates of type maps_coordinates_h.
[in] | origin | The original coordinate handle |
[out] | cloned | A cloned coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_OUT_OF_MEMORY | Out of memory |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_create | ( | const double | latitude, |
const double | longitude, | ||
maps_coordinates_h * | coordinates | ||
) |
Creates a new instance of Geographical Coordinates and initiates a handle with it.
This function creates coordinates, a new instance of Geographical Coordinates of type maps_coordinates_h with a specified latitude and longitude.
New handle is assigned with this instance.
[in] | latitude | The latitude [-90.0 ~ 90.0] (degrees) |
[in] | longitude | The longitude [-180.0 ~ 180.0] (degrees) |
[out] | coordinates | The coordinates handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_OUT_OF_MEMORY | Out of memory |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_destroy | ( | maps_coordinates_h | coordinates | ) |
Destroys the Geographical Coordinates and releases all its resources.
This function destroys the Geographical Coordinates maps_coordinates_h and releases all its resources.
[in] | coordinates | The coordinate handle to destroy |
0
on coordinates, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_get_latitude | ( | const maps_coordinates_h | coordinates, |
double * | latitude | ||
) |
Gets the latitude of the coordinates.
This function gets the latitude value of the coordinates handle.
[in] | coordinates | The coordinate handle |
[out] | latitude | The latitude of the coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_get_latitude_longitude | ( | const maps_coordinates_h | coordinates, |
double * | latitude, | ||
double * | longitude | ||
) |
Gets the latitude and longitude of the coordinates.
This function gets the longitude and longitude value of the coordinates handle.
[in] | coordinates | The coordinate handle |
[out] | latitude | The latitude of the coordinate handle |
[out] | longitude | The longitude of the coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_get_longitude | ( | const maps_coordinates_h | coordinates, |
double * | longitude | ||
) |
Gets the longitude of the coordinates.
This function gets the longitude value of the coordinates handle.
[in] | coordinates | The coordinate handle |
[out] | longitude | The longitude of the coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_append | ( | maps_coordinates_list_h | coordinates_list, |
maps_coordinates_h | coordinates | ||
) |
Appends a coordinates to a coordinates list.
[in] | coordinates_list | The coordinates list handle |
[in] | coordinates | The coordinates handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_OUT_OF_MEMORY | Out of memory |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_create | ( | maps_coordinates_list_h * | coordinates_list | ) |
Creates a coordinates list having a set of coordinates.
[out] | coordinates_list | The coordinates list handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_OUT_OF_MEMORY | Out of memory |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_destroy | ( | maps_coordinates_list_h | coordinates_list | ) |
Frees all of the memory used by a coordinates list.
[in] | coordinates_list | The coordinates list handle |
MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_foreach | ( | maps_coordinates_list_h | coordinates_list, |
maps_coordinates_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all coordinates by invoking a specific callback for each coordinates of coordinates list.
[in] | coordinates_list | The coordinates list handle |
[in] | callback | The iteration callback |
[in] | user_data | The user data to be passed to the callback function |
MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_get_length | ( | maps_coordinates_list_h | coordinates_list, |
int * | length | ||
) |
Gets the number of elements in a coordinates list.
[in] | coordinates_list | The coordinates list handle |
[out] | length | The number of elements in the coordinates list |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_list_remove | ( | maps_coordinates_list_h | coordinates_list, |
maps_coordinates_h | coordinates | ||
) |
Removes a coordinates from a coordinates list.
[in] | coordinates_list | The coordinates list handle |
[in] | coordinates | The coordinates handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_set_latitude | ( | maps_coordinates_h | coordinates, |
const double | latitude | ||
) |
Sets the latitude of the coordinates.
This function sets the latitude value of the coordinates handle.
[in] | coordinates | The coordinate handle |
[in] | latitude | The latitude of the coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_set_latitude_longitude | ( | maps_coordinates_h | coordinates, |
const double | latitude, | ||
const double | longitude | ||
) |
Sets the latitude and longitude of the coordinates.
This function sets the latitude and latitude value of the coordinates handle.
[in] | coordinates | The coordinates handle |
[in] | latitude | The latitude [-90.0 ~ 90.0] (degrees) |
[in] | longitude | The longitude [-180.0 ~ 180.0] (degrees) |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |
int maps_coordinates_set_longitude | ( | maps_coordinates_h | coordinates, |
const double | longitude | ||
) |
Sets the longitude of the coordinates.
This function sets the longitude value of the coordinates handle.
[in] | coordinates | The coordinate handle |
[out] | longitude | The longitude of the coordinate handle |
0
on success, otherwise a negative error value MAPS_ERROR_NONE | Successful |
MAPS_ERROR_INVALID_PARAMETER | Invalid parameter |
MAPS_ERROR_NOT_SUPPORTED | Not supported |