Tizen Native API  6.5

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

Structure of the circular Geographical Area, specified with a center coordinates and a radius.

This structure represents a circular Geographical Area.

Since :
2.4
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.4
See also:
maps_area_create_rectangle()
maps_area_create_circle()
maps_area_destroy()
maps_area_clone()

Structure of the rectangular Geographical Area.

This structure represents a rectangular Geographical Area, specified with left top and right bottom coordinates.

Since :
2.4
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.4
Remarks:
Do not use maps_area_s directly if you are an application developer. Using maps_area_h is recommended.

Enumeration Type Documentation

Enumeration for supported types of the Geographical Area.

This enumeration represents allowed geographical type of Geographical Area: rectangular and circular.

Since :
2.4
Enumerator:
MAPS_AREA_NONE 

Undefined geographical area type.

MAPS_AREA_RECTANGLE 

Rectangular geographical area type.

MAPS_AREA_CIRCLE 

Circle geographical area type.


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.4
Remarks:
cloned must be released using maps_area_destroy().
Parameters:
[in]originThe area maps_area_h to be copied
[out]clonedThe cloned area maps_area_h handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
origin is created using maps_area_create_rectangle() or maps_area_create_circle().
See also:
maps_area_create_rectangle()
maps_area_create_circle()
maps_area_destroy()
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.4
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]centerThe central position of the area
[in]radiusThe radius of the area
[out]areaThe area handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
center is created using maps_coordinates_create().
See also:
maps_area_clone()
maps_area_destroy()
maps_area_create_rectangle()
maps_coordinates_create()
maps_coordinates_destroy()
maps_preference_get_distance_unit()
maps_preference_set_distance_unit()
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.4
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_leftThe left top position
[in]bottom_rightThe right bottom position
[out]areaThe area handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
top_left and bottom_right are created using maps_coordinates_create().
See also:
maps_area_clone()
maps_area_destroy()
maps_area_create_circle()
maps_coordinates_create()
maps_coordinates_destroy()

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.4
Parameters:
[in]areaThe area maps_area_h
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
area can be created using maps_area_create_rectangle() or maps_area_create_circle().
See also:
maps_area_create_rectangle()
maps_area_create_circle()