Tizen Native API  6.5

This provides APIs related to Place Segment information, used in Route Search.

Functions

int maps_route_segment_destroy (maps_route_segment_h segment)
 Destroys the route segment handle and releases all its resources.
int maps_route_segment_clone (const maps_route_segment_h origin, maps_route_segment_h *cloned)
 Clones the route segment handle.
int maps_route_segment_get_origin (const maps_route_segment_h segment, maps_coordinates_h *origin)
 Gets the route segment origin.
int maps_route_segment_get_destination (const maps_route_segment_h segment, maps_coordinates_h *destination)
 Gets the route segment destination.
int maps_route_segment_get_bounding_box (const maps_route_segment_h segment, maps_area_h *bounding_box)
 Gets the route segment bounding box.
int maps_route_segment_get_distance (const maps_route_segment_h segment, double *distance)
 Gets the route segment distance.
int maps_route_segment_get_duration (const maps_route_segment_h segment, long *duration)
 Gets the route segment duration.
int maps_route_segment_foreach_path (const maps_route_segment_h segment, maps_route_segment_path_cb callback, void *user_data)
 Retrieves all coordinates of the path.
int maps_route_segment_foreach_maneuver (const maps_route_segment_h segment, maps_route_segment_maneuver_cb callback, void *user_data)
 Retrieves all Maneuvers of the path.

Typedefs

typedef void * maps_route_segment_h
 The Route Segment handle.
typedef bool(* maps_route_segment_path_cb )(int index, int total, maps_coordinates_h coordinates, void *user_data)
 Called when requesting the path of the Route Segment.
typedef bool(* maps_route_segment_maneuver_cb )(int index, int total, maps_route_maneuver_h maneuver, void *user_data)
 Called when requesting the Maneuvers of the Route Segment.

Typedef Documentation

typedef void* maps_route_segment_h

The Route Segment handle.

The handle of Route Segment instance.

Since :
2.4
Remarks:
To release the handle use maps_route_segment_destroy().
To clone the handle use maps_route_segment_clone().
See also:
maps_route_segment_destroy()
maps_route_segment_clone()
typedef bool(* maps_route_segment_maneuver_cb)(int index, int total, maps_route_maneuver_h maneuver, void *user_data)

Called when requesting the Maneuvers of the Route Segment.

This callback is invoked while iterating through the list of Maneuvers, composing the Route Segment.

Since :
2.4
Remarks:
Maneuver is valid only in this function and must be released using maps_route_maneuver_destroy().
To use Maneuver outside this function, clone it with maps_route_maneuver_clone().
Parameters:
[in]indexThe current index of Maneuvers list
[in]totalThe total amount of Maneuvers
[in]maneuverThe Maneuver of route
[in]user_dataThe user data passed from maps_route_segment_foreach_maneuver()
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
maps_route_segment_foreach_maneuver() will invoke this callback.
See also:
maps_route_segment_foreach_maneuver()
maps_route_maneuver_h
typedef bool(* maps_route_segment_path_cb)(int index, int total, maps_coordinates_h coordinates, void *user_data)

Called when requesting the path of the Route Segment.

This callback is invoked while iterating through the list of coordinates, composing the Route Segment.

Since :
2.4
Remarks:
coordinates must be released using maps_coordinates_destroy().
To use coordinates outside this function, clone it with maps_coordinates_clone().
Parameters:
[in]indexThe current index of coordinates list
[in]totalThe total amount of coordinates
[in]coordinatesThe current coordinates
[in]user_dataThe user data passed from maps_route_segment_foreach_path()
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
maps_route_segment_foreach_path() will invoke this callback.
See also:
maps_route_segment_foreach_path()
maps_coordinates_h

Function Documentation

Clones the route segment handle.

This function clones the route handle origin and all its resources.

Since :
2.4
Remarks:
cloned must be released using maps_route_segment_destroy().
Parameters:
[in]originThe original segment handle
[out]clonedA cloned segment 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
See also:
maps_route_segment_destroy()

Destroys the route segment handle and releases all its resources.

This function destroys the route segment handle and releases all its resources.

Since :
2.4
Parameters:
[in]segmentThe segment handle to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_route_segment_clone()
int maps_route_segment_foreach_maneuver ( const maps_route_segment_h  segment,
maps_route_segment_maneuver_cb  callback,
void *  user_data 
)

Retrieves all Maneuvers of the path.

This function retrieves all Maneuvers of the route segment path.

Since :
2.4
Remarks:
The coordinates will be delivered via maps_route_segment_maneuver_cb().
Parameters:
[in]segmentThe segment handle
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_NOT_SUPPORTEDNot supported
Postcondition:
This function invokes maps_route_segment_maneuver_cb() repeatedly to retrieve each coordinate point.
See also:
maps_route_segment_maneuver_cb()
int maps_route_segment_foreach_path ( const maps_route_segment_h  segment,
maps_route_segment_path_cb  callback,
void *  user_data 
)

Retrieves all coordinates of the path.

This function retrieves all coordinates of the route segment path.

Since :
2.4
Remarks:
The coordinates will be delivered via maps_route_segment_path_cb().
Parameters:
[in]segmentThe segment handle
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_FOUNDResult not found
MAPS_ERROR_NOT_SUPPORTEDNot supported
Postcondition:
This function invokes maps_route_segment_path_cb() repeatedly to retrieve each coordinate point.
See also:
maps_route_segment_path_cb()
int maps_route_segment_get_bounding_box ( const maps_route_segment_h  segment,
maps_area_h bounding_box 
)

Gets the route segment bounding box.

This function gets the route segment bounding box.

Since :
2.4
Remarks:
bounding_box must be released using maps_area_destroy().
Parameters:
[in]segmentThe segment handle
[out]bounding_boxThe bounding box of segment
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_area_h

Gets the route segment destination.

This function gets the route segment destination.

Since :
2.4
Remarks:
destination must be released using maps_coordinates_destroy().
Parameters:
[in]segmentThe segment handle
[out]destinationThe destination of segment
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_coordinates_h
int maps_route_segment_get_distance ( const maps_route_segment_h  segment,
double *  distance 
)

Gets the route segment distance.

This function gets the route segment distance.

Since :
2.4
Parameters:
[in]segmentThe segment handle
[out]distanceThe distance of segment
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
int maps_route_segment_get_duration ( const maps_route_segment_h  segment,
long *  duration 
)

Gets the route segment duration.

This function gets the route segment duration.

Since :
2.4
Parameters:
[in]segmentThe segment handle
[out]durationThe distance of segment
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported

Gets the route segment origin.

This function gets the route segment origin.

Since :
2.4
Remarks:
origin must be released using maps_coordinates_destroy().
Parameters:
[in]segmentThe segment handle
[out]originThe origin of segment
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
See also:
maps_coordinates_h