Tizen Native API
3.0
|
This provides APIs related to geographical area.
Functions | |
int | maps_area_create_rectangle (const maps_coordinates_h top_left, const maps_coordinates_h bottom_right, maps_area_h *area) |
Creates a rectangular type of new Geographical Area with a specified information. | |
int | maps_area_create_circle (const maps_coordinates_h center, const double radius, maps_area_h *area) |
Creates a circular type of new Geographical Area with a specified information. | |
int | maps_area_destroy (maps_area_h area) |
Destroys the Geographical Area and releases all its resources. | |
int | maps_area_clone (const maps_area_h origin, maps_area_h *cloned) |
Clones the Geographical Area. | |
Typedefs | |
typedef void * | maps_area_h |
Handle of the Geographical Area. | |
typedef struct _maps_area_rectangle_s | maps_area_rectangle_s |
Structure of the rectangular Geographical Area. | |
typedef struct _maps_area_circle_s | maps_area_circle_s |
Structure of the circular Geographical Area, specified with a center coordinates and a radius. | |
typedef struct _maps_area_s | maps_area_s |
Structure of the Geographical Area. |
Typedef Documentation
typedef struct _maps_area_circle_s maps_area_circle_s |
Structure of the circular Geographical Area, specified with a center coordinates and a radius.
This structure represents a circular Geographical Area.
- Since :
- 2.3.2
- Remarks:
- Do not use maps_area_circle_s directly if you are an application developer.
typedef void* maps_area_h |
Handle of the Geographical Area.
The Geographical Area handle can be obtained via call of maps_area_create_rectangle() or maps_area_create_circle().
To release the handle use maps_area_destroy().
To clone the handle use maps_area_clone().
- Since :
- 2.3.2
typedef struct _maps_area_rectangle_s maps_area_rectangle_s |
Structure of the rectangular Geographical Area.
This structure represents a rectangular Geographical Area, specified with left top and right bottom coordinates.
- Since :
- 2.3.2
- Remarks:
- Do not use maps_area_rectangle_s directly if you are an application developer.
typedef struct _maps_area_s maps_area_s |
Structure of the Geographical Area.
This structure represents a Geographical Area, specified with a type, circular or rectangular, and appropriate coordinates and radius.
- Since :
- 2.3.2
- Remarks:
- Do not use maps_area_s directly if you are an application developer. Using maps_area_h is recommended.
Enumeration Type Documentation
enum maps_area_type_e |
Enumeration for supported types of the Geographical Area.
This enumeration represents allowed geographical type of Geographical Area: rectangular and circular.
- Since :
- 2.3.2
Function Documentation
int maps_area_clone | ( | const maps_area_h | origin, |
maps_area_h * | cloned | ||
) |
Clones the Geographical Area.
This function makes a clone of the origin Geographical Area of type maps_area_h.
- Since :
- 2.3.2
- Remarks:
- cloned must be released using maps_area_destroy().
- Parameters:
-
[in] origin The area maps_area_h to be copied [out] cloned The cloned area maps_area_h 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_area_create_rectangle() or maps_area_create_circle().
int maps_area_create_circle | ( | const maps_coordinates_h | center, |
const double | radius, | ||
maps_area_h * | area | ||
) |
Creates a circular type of new Geographical Area with a specified information.
This function creates a circular type of new maps_area_h Geographical Area with a specified center coordinates and a radius.
- Since :
- 2.3.2
- Remarks:
- area must be released using maps_area_destroy().
center must be released using maps_coordinates_destroy().
The radius is specified in units, listed in maps_distance_unit_e.
To get and set distance units use maps_preference_get_distance_unit() and maps_preference_set_distance_unit() respectively.
- Parameters:
-
[in] center The central position of the area [in] radius The radius of the area [out] area The area 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:
- center is created using maps_coordinates_create().
int maps_area_create_rectangle | ( | const maps_coordinates_h | top_left, |
const maps_coordinates_h | bottom_right, | ||
maps_area_h * | area | ||
) |
Creates a rectangular type of new Geographical Area with a specified information.
This function creates a rectangular type of new maps_area_h with a specified left top and right bottom coordinates.
- Since :
- 2.3.2
- Remarks:
- area must be released using maps_area_destroy().
area may be cloned using maps_area_clone().
top_left and bottom_right must be released using maps_coordinates_destroy().
- Parameters:
-
[in] top_left The left top position [in] bottom_right The right bottom position [out] area The area 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:
- top_left and bottom_right are created using maps_coordinates_create().
int maps_area_destroy | ( | maps_area_h | area | ) |
Destroys the Geographical Area and releases all its resources.
This function destroys the Geographical Area maps_area_h and releases all its resources.
- Since :
- 2.3.2
- Parameters:
-
[in] area The area maps_area_h
- 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:
- area can be created using maps_area_create_rectangle() or maps_area_create_circle().