Tizen Native API
7.0
|
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 Documentation
typedef bool(* maps_coordinates_cb)(int index, maps_coordinates_h coordinates, void *user_data) |
Called iteratively to get a coordinates information.
- Since :
- 2.3.2
- Parameters:
-
[in] index The index of iteration [in] coordinates The handle of coordinates [in] user_data The user data passed from the foreach function
- Returns:
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().
- Since :
- 2.3.2
- Remarks:
- To release the handle use maps_coordinates_destroy().
To clone the handle use maps_coordinates_clone().
typedef void* maps_coordinates_list_h |
The coordinates list handle.
The coordinates list handle can be obtained via calling of maps_coordinates_list_create().
- Since :
- 2.3.2
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].
- Since :
- 2.3.2
- Remarks:
- maps_coordinates_h is a void pointer to the maps_coordinates_h.
- Do not use maps_coordinates_s directly if you are an application developer. Using maps_coordinates_h is recommended.
- See also:
- maps_coordinates_h
Function Documentation
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.
- Since :
- 2.3.2
- Remarks:
- cloned must be released using maps_coordinates_destroy().
- Parameters:
-
[in] origin The original coordinate handle [out] cloned A cloned coordinate handle
- 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_NOT_SUPPORTED Not supported
- Precondition:
- origin is created using maps_coordinates_create().
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.
- Since :
- 2.3.2
- Remarks:
- coordinates must be released using maps_coordinates_destroy().
coordinates may be cloned using maps_coordinates_clone().
- Parameters:
-
[in] latitude The latitude [-90.0 ~ 90.0] (degrees) [in] longitude The longitude [-180.0 ~ 180.0] (degrees) [out] coordinates The coordinates handle
- 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_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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle to destroy
- Returns:
0
on coordinates, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create_rectangle().
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle [out] latitude The latitude of the coordinate handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle [out] latitude The latitude of the coordinate handle [out] longitude The longitude of the coordinate handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle [out] longitude The longitude of the coordinate handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().
int maps_coordinates_list_append | ( | maps_coordinates_list_h | coordinates_list, |
maps_coordinates_h | coordinates | ||
) |
Appends a coordinates to a coordinates list.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates_list The coordinates list handle [in] coordinates The coordinates handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2
- Parameters:
-
[out] coordinates_list The coordinates list handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_NOT_SUPPORTED Not supported
- See also:
- maps_coordinates_list_destroy()
int maps_coordinates_list_destroy | ( | maps_coordinates_list_h | coordinates_list | ) |
Frees all of the memory used by a coordinates list.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates_list The coordinates list handle
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- See also:
- maps_coordinates_list_create()
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.
- Since :
- 2.3.2
- Parameters:
-
[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
- Return values:
-
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates_list The coordinates list handle [out] length The number of elements in the coordinates list
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates_list The coordinates list handle [in] coordinates The coordinates handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle [in] latitude The latitude of the coordinate handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinates handle [in] latitude The latitude [-90.0 ~ 90.0] (degrees) [in] longitude The longitude [-180.0 ~ 180.0] (degrees)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().
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.
- Since :
- 2.3.2
- Parameters:
-
[in] coordinates The coordinate handle [out] longitude The longitude of the coordinate handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- coordinates are created using maps_coordinates_create().