Tizen Native API  7.0

This provides APIs related to operations, used in View.

Supported View API features include:

  • Creating and destroying the View port, moving and resizing it
  • Changing zoom, and orientation
  • Changing properties: theme (day, satellite, terrain), language (English, Russian, Chinese, Italian, German, Spanish, etc.)
  • Converting screen coordinates to geographical and vise versa
  • Managing user's gestures: receiving user's gesture events, enabling or disabling specified user gestures, assigning View actions, which must be taken in response on user gestures.

Functions

int maps_view_create (maps_service_h maps, Evas_Object *obj, maps_view_h *view)
 Creates the View and link it to the instance of maps service.
int maps_view_destroy (maps_view_h view)
 Destroys the View.
int maps_view_set_center (maps_view_h view, maps_coordinates_h coordinates)
 Centers the map on a given geographical coordinates.
int maps_view_get_center (const maps_view_h view, maps_coordinates_h *coordinates)
 Gets the central coordinates of a map.
int maps_view_set_zoom_level (maps_view_h view, int level)
 Sets zoom level of the map.
int maps_view_get_zoom_level (const maps_view_h view, int *level)
 Gets zoom level of the map.
int maps_view_set_min_zoom_level (maps_view_h view, int level)
 Sets the minimal zoom level of the map.
int maps_view_get_min_zoom_level (const maps_view_h view, int *min_zoom_level)
 Gets the minimal zoom level of the map.
int maps_view_set_max_zoom_level (maps_view_h view, int level)
 Sets the maximal zoom level of the map.
int maps_view_get_max_zoom_level (const maps_view_h view, int *max_zoom_level)
 Gets the maximal zoom level of the map.
int maps_view_set_orientation (maps_view_h view, double angle)
 Sets the orientation on the View.
int maps_view_get_orientation (const maps_view_h view, double *rotation_angle)
 Gets the orientation.
int maps_view_screen_to_geolocation (maps_view_h view, int x, int y, maps_coordinates_h *coordinates)
 Converts screen coordinates to the geographical coordinates.
int maps_view_geolocation_to_screen (maps_view_h view, const maps_coordinates_h coordinates, int *x, int *y)
 Converts geographical coordinates to the screen coordinates.
int maps_view_set_type (maps_view_h view, maps_view_type_e type)
 Sets View type.
int maps_view_get_type (const maps_view_h view, maps_view_type_e *type)
 Gets View type.
int maps_view_set_buildings_enabled (maps_view_h view, bool enable)
 Indicates whether the map should show the 3D buildings layer.
int maps_view_get_buildings_enabled (const maps_view_h view, bool *enable)
 Queries whether the map has the 3D buildings layer enabled.
int maps_view_set_traffic_enabled (maps_view_h view, bool enable)
 Indicates whether the map should show the traffic layer.
int maps_view_get_traffic_enabled (const maps_view_h view, bool *enable)
 Queries whether the map has the traffic layer enabled.
int maps_view_set_public_transit_enabled (maps_view_h view, bool enable)
 Indicates whether the map should show the public transit layer.
int maps_view_get_public_transit_enabled (const maps_view_h view, bool *enable)
 Queries whether the map has the public transit layer enabled.
int maps_view_set_language (maps_view_h view, const char *language)
 Sets View language.
int maps_view_get_language (const maps_view_h view, char **language)
 Gets View language.
int maps_view_set_scalebar_enabled (maps_view_h view, bool enable)
 Enables or disables scalebar.
int maps_view_get_scalebar_enabled (const maps_view_h view, bool *enabled)
 Gets whether the scalebar is enabled or not.
int maps_view_get_viewport (const maps_view_h view, Evas_Object **viewport)
 Gets the View port.
int maps_view_set_screen_location (maps_view_h view, int x, int y, int width, int height)
 Sets geometry of View port.
int maps_view_get_screen_location (const maps_view_h view, int *x, int *y, int *width, int *height)
 Gets geometry of View port.
int maps_view_move (maps_view_h view, int x, int y)
 Moves the View.
int maps_view_resize (maps_view_h view, int width, int height)
 Resizes the View.
int maps_view_set_visibility (maps_view_h view, bool visible)
 Shows or hides the View.
int maps_view_get_visibility (const maps_view_h view, bool *visible)
 Gets the View visibility.
int maps_view_set_event_cb (maps_view_h view, maps_view_event_type_e type, maps_view_on_event_cb callback, void *user_data)
 Sets the event callback.
int maps_view_unset_event_cb (maps_view_h view, maps_view_event_type_e type)
 Unsets the event callback.
int maps_view_set_gesture_enabled (maps_view_h view, maps_view_gesture_e gesture, bool enabled)
 Enables or disables the map gesture.
int maps_view_get_gesture_enabled (const maps_view_h view, maps_view_gesture_e gesture, bool *enabled)
 Checks whether the map gesture is enabled or not.
int maps_view_add_object (maps_view_h view, maps_view_object_h object)
 Adds a visual object on the map.
int maps_view_remove_object (maps_view_h view, maps_view_object_h object)
 Removes a visual object from the map.
int maps_view_remove_all_objects (maps_view_h view)
 Removes all visual objects from the map.
int maps_view_foreach_object (const maps_view_h view, maps_view_object_cb callback, void *user_data)
 Retrieves all visual objects on the map.

Typedefs

typedef enum _maps_view_type_e maps_view_type_e
 Enumeration for View types (themes).
typedef bool(* maps_view_object_cb )(int index, int total, maps_view_object_h object, void *user_data)
 Called when requesting the list of visual objects of the View.
typedef void(* maps_view_on_event_cb )(maps_view_event_type_e type, maps_view_event_data_h event_data, void *user_data)
 Called when the View event occurs.

Typedef Documentation

typedef bool(* maps_view_object_cb)(int index, int total, maps_view_object_h object, void *user_data)

Called when requesting the list of visual objects of the View.

This callback is invoked while iterating through the list of visual objects added to the View.

Since :
3.0
Parameters:
[in]indexThe current index of the visual object starts from 0
[in]totalThe total amount of visual objects
[in]objectThe visual object
[in]user_dataThe user data pointer passed from maps_view_foreach_object()
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
maps_view_foreach_object() will invoke this callback.
See also:
maps_view_object_h
maps_view_foreach_object()
typedef void(* maps_view_on_event_cb)(maps_view_event_type_e type, maps_view_event_data_h event_data, void *user_data)

Called when the View event occurs.

The View Panel invokes this callback when the map event occurs.

Since :
3.0
Remarks:
event_data will be released automatically after this callback is terminated.
To use event_data outside this function, clone it with maps_view_event_data_clone().
Parameters:
[in]typeThe new type of callback, listed in maps_view_event_type_e
[in]event_dataThe event data
[in]user_dataThe user data pointer registered in maps_view_set_event_cb()
Precondition:
maps_view_set_event_cb() sets the callback.
maps_view_set_center(), maps_view_set_zoom_level(), maps_view_set_orientation(), invoke the callback with the type MAPS_VIEW_EVENT_ACTION.
See also:
maps_view_set_event_cb()
maps_view_set_center()
maps_view_set_zoom_level()
maps_view_set_orientation()

Enumeration for View types (themes).

Since :
3.0

Enumeration Type Documentation

Enumeration for View types (themes).

Since :
3.0
Enumerator:
MAPS_VIEW_TYPE_NORMAL 

Indicates the normal street theme

MAPS_VIEW_TYPE_SATELLITE 

Indicates the satellite theme

MAPS_VIEW_TYPE_TERRAIN 

Indicates the terrain theme

MAPS_VIEW_TYPE_HYBRID 

Indicates the hybrid theme which is the satellite and normal street theme


Function Documentation

Adds a visual object on the map.

This function adds a visual object on the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Remarks:
The object handle will be released automatically when the view is destroyed in the maps_view_destroy().
Parameters:
[in]viewThe view handle
[in]objectThe handle of the object to add
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
object is created using maps_view_object_create_marker(), maps_view_object_create_polygon(), maps_view_object_create_polyline() or maps_view_object_create_group().
See also:
maps_view_object_h
maps_view_object_create_marker()
maps_view_object_create_polygon()
maps_view_object_create_polyline()
maps_view_remove_object()
maps_view_remove_all_objects()
maps_view_create()
int maps_view_create ( maps_service_h  maps,
Evas_Object obj,
maps_view_h view 
)

Creates the View and link it to the instance of maps service.

This function creates a new View widget, allocates all needed resources and issues its handle.
The newly created View is linked to the specified map's service.
The View by default is resized to fill whole parent area.
To center the map on a specific geographical coordinates with a desired zoom level and rotation angle, use maps_view_set_center(), maps_view_set_zoom_level() and maps_view_set_orientation() respectively.
To change View theme, size and visibility properties use maps_view_set_type() and maps_view_set_visibility() respectively.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Remarks:
The View must be released using maps_view_destroy().
Parameters:
[in]mapsThe maps service handle
[in]objThe evas object to be drawn
[out]viewThe handle pointer to a maps_view_h, in which to store the newly created View 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_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
maps is created using maps_service_create().
obj is recommended using a smart object.
See also:
maps_view_destroy()
maps_service_create()
maps_view_set_center()
maps_view_set_zoom_level()
maps_view_set_orientation()
maps_view_set_type()
maps_view_set_visibility()
elm_layout_add()

Destroys the View.

This function destroys the View, releases its handle and all allocated resources, unlinks the View from the instance of maps service.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Parameters:
[in]viewThe View handle to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
View is created using maps_view_create().
See also:
maps_view_create()
int maps_view_foreach_object ( const maps_view_h  view,
maps_view_object_cb  callback,
void *  user_data 
)

Retrieves all visual objects on the map.

This function retrieves all visual objects previously added to the map.

Since :
3.0
Remarks:
The objects will be delivered via maps_view_object_cb().
Parameters:
[in]viewThe view handle
[in]callbackThe callback function to invoke
[in]user_dataThe user data pointer 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
Precondition:
view is created using maps_view_create().
objects are added using maps_view_add_object().
Postcondition:
This function invokes maps_view_object_cb() repeatedly to retrieve each visual object.
See also:
maps_view_object_h
maps_view_object_cb()
maps_view_add_object()
maps_view_remove_object()
maps_view_remove_all_objects()
maps_view_create()
int maps_view_geolocation_to_screen ( maps_view_h  view,
const maps_coordinates_h  coordinates,
int *  x,
int *  y 
)

Converts geographical coordinates to the screen coordinates.

This function converts geographical coordinates to the screen coordinates accordingly to the current map zoom and orientation.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Parameters:
[in]viewThe view handle
[in]coordinatesThe geographical coordinates
[out]xThe pointer to an integer in which to store the x coordinate on the screen, corresponding to given geographical coordinates
[out]yThe pointer to an integer in which to store the y coordinate on the screen, corresponding to given geographical coordinates
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
coordinates is created using maps_coordinates_create().
See also:
maps_view_screen_to_geolocation()
maps_coordinates_h
maps_coordinates_create()
maps_view_create()
int maps_view_get_buildings_enabled ( const maps_view_h  view,
bool *  enable 
)

Queries whether the map has the 3D buildings layer enabled.

This function checks whether the map is set to show the 3D buildings layer.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]enableThe pointer to a boolean in which to store the enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_set_buildings_enabled()
maps_service_provider_is_data_supported()
int maps_view_get_center ( const maps_view_h  view,
maps_coordinates_h coordinates 
)

Gets the central coordinates of a map.

This function gets the current central coordinates of a map.

Since :
3.0
Remarks:
The coordinates must be released using maps_coordinates_destroy().
Parameters:
[in]viewThe view handle
[out]coordinatesThe pointer to maps_coordinates_h in which to store the geographical coordinates of the central position of the map
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:
view is created using maps_view_create().
See also:
maps_view_set_center()
maps_view_get_zoom_level()
maps_view_get_orientation()
maps_coordinates_destroy()
maps_view_create()
int maps_view_get_gesture_enabled ( const maps_view_h  view,
maps_view_gesture_e  gesture,
bool *  enabled 
)

Checks whether the map gesture is enabled or not.

This function checks whether the map gesture is enabled or not.

Since :
3.0
Parameters:
[in]viewThe view handle
[in]gestureThe user gesture, one of listed in maps_view_gesture_e
[out]enabledThe pointer to a boolean in which to store the enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
enabled status set ad default or modified using maps_view_set_gesture_enabled().
See also:
maps_view_gesture_e
maps_view_set_gesture_enabled()
maps_view_create()
int maps_view_get_language ( const maps_view_h  view,
char **  language 
)

Gets View language.

This function gets the language set to the View.
Note that map display language is different from places and route language.

Since :
3.0
Remarks:
The language should be freed using free().
Parameters:
[in]viewThe view handle
[out]languageThe pointer to a char* in which to store the language string value
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:
view is created using maps_view_create().
See also:
maps_view_set_language()
maps_view_get_type()
maps_view_create()
int maps_view_get_max_zoom_level ( const maps_view_h  view,
int *  max_zoom_level 
)

Gets the maximal zoom level of the map.

This function gets the maximally allowed zoom level of the map.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]max_zoom_levelThe pointer to an integer in which to store the maximally allowed zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_min_zoom_level()
maps_view_get_zoom_level()
maps_view_set_zoom_level()
maps_view_create()
int maps_view_get_min_zoom_level ( const maps_view_h  view,
int *  min_zoom_level 
)

Gets the minimal zoom level of the map.

This function gets the minimally allowed zoom level of the map.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]min_zoom_levelThe pointer to an integer in which to store the minimally allowed zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_max_zoom_level()
maps_view_get_zoom_level()
maps_view_set_zoom_level()
maps_view_create()
int maps_view_get_orientation ( const maps_view_h  view,
double *  rotation_angle 
)

Gets the orientation.

This function gets the current map rotation angle on the View.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]rotation_angleThe pointer to a double in which to store the current rotation angle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_orientation()
maps_view_get_zoom_level()
maps_view_create()
int maps_view_get_public_transit_enabled ( const maps_view_h  view,
bool *  enable 
)

Queries whether the map has the public transit layer enabled.

This function checks whether the map is set to show the public transit routes layer.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]enableThe pointer to a boolean in which to store the enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_set_public_transit_enabled()
maps_service_provider_is_data_supported()
int maps_view_get_scalebar_enabled ( const maps_view_h  view,
bool *  enabled 
)

Gets whether the scalebar is enabled or not.

This function gets whether the scalebar is enabled or not.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]enabledThe pointer to a boolean in which to store the enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_set_scalebar_enabled()
int maps_view_get_screen_location ( const maps_view_h  view,
int *  x,
int *  y,
int *  width,
int *  height 
)

Gets geometry of View port.

This function retrieves the position and (rectangular) size of the given View.
The position, naturally, will be relative to the top left corner of the parent window.

Since :
3.0
Remarks:
Use NULL pointers on the geometry components you're not interested in.
Parameters:
[in]viewThe view handle
[out]xX screen coordinate for the top left corner of View
[out]yY screen coordinate for the left top corner of View
[out]widthThe pointer to an integer in which to store the width of the view
[out]heightThe pointer to an integer in which to store the height of the view
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_screen_location()
maps_view_resize()
maps_view_get_visibility()
maps_view_create()
int maps_view_get_traffic_enabled ( const maps_view_h  view,
bool *  enable 
)

Queries whether the map has the traffic layer enabled.

This function checks whether the map is set to show the traffic layer.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]enableThe pointer to a boolean in which to store the enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_set_traffic_enabled()
maps_service_provider_is_data_supported()
int maps_view_get_type ( const maps_view_h  view,
maps_view_type_e type 
)

Gets View type.

This function gets the type of the given View.
The type options are defined in the maps_view_type_e enumeration.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]typeThe pointer to a maps_view_type_e in which to store current view type
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_type_e
maps_view_set_type()
maps_view_get_language()
maps_view_create()
int maps_view_get_viewport ( const maps_view_h  view,
Evas_Object **  viewport 
)

Gets the View port.

This function gets the View port as a pointer on Evas_Object.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]viewportThe pointer to Evas_Object in which to store the View port
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
Evas_Object
int maps_view_get_visibility ( const maps_view_h  view,
bool *  visible 
)

Gets the View visibility.

This function retrieves whether or not the given View is visible.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]visibleThe pointer to a boolean in which to store the visibility of the View
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_visibility()
maps_view_set_screen_location()
maps_view_create()
int maps_view_get_zoom_level ( const maps_view_h  view,
int *  level 
)

Gets zoom level of the map.

This function gets the current integer zoom level of the map.

Since :
3.0
Parameters:
[in]viewThe view handle
[out]levelThe pointer to an integer in which to store the current zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_zoom_level()
maps_view_get_min_zoom_level()
maps_view_get_max_zoom_level()
maps_view_create()
int maps_view_move ( maps_view_h  view,
int  x,
int  y 
)

Moves the View.

This function moves View.

Since :
3.0
Remarks:
Newly created View port has the size of its parent.
Parameters:
[in]viewThe view handle
[in]xThe new x position, in screen units
[in]yThe new y position, in screen units
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_screen_location()
maps_view_get_screen_location()
maps_view_set_visibility()
maps_view_create()

Removes all visual objects from the map.

This function removes all visual object from the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Remarks:
All object handles will be released automatically by the View.
Parameters:
[in]viewThe view handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
objects are added using maps_view_add_object().
See also:
maps_view_object_h
maps_view_add_object()
maps_view_create()

Removes a visual object from the map.

This function removes a visual object from the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Remarks:
The object handle will be released automatically by the View.
Parameters:
[in]viewThe view handle
[in]objectThe object to remove
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
object is added using maps_view_add_object().
See also:
maps_view_add_object()
maps_view_remove_all_objects()
maps_view_object_h
maps_view_create()
int maps_view_resize ( maps_view_h  view,
int  width,
int  height 
)

Resizes the View.

This function changes the size of the given View.

Since :
3.0
Remarks:
Newly created View port has the size of its parent.
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]widthThe new new width in screen units
[in]heightThe new new height in screen units
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_screen_location()
maps_view_get_screen_location()
maps_view_set_visibility()
maps_view_create()
int maps_view_screen_to_geolocation ( maps_view_h  view,
int  x,
int  y,
maps_coordinates_h coordinates 
)

Converts screen coordinates to the geographical coordinates.

This function converts screen coordinates to the geographical coordinates accordingly to the current map zoom and orientation.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Remarks:
The coordinates must be released using maps_coordinates_destroy().
Parameters:
[in]viewThe view handle
[in]xThe x coordinate on the screen
[in]yThe y coordinate on the screen
[out]coordinatesThe pointer to a maps_coordinates_h in which to store the handle of geographical coordinates, corresponding to given screen coordinates
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_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_geolocation_to_screen()
maps_coordinates_h
maps_coordinates_destroy()
maps_view_create()
int maps_view_set_buildings_enabled ( maps_view_h  view,
bool  enable 
)

Indicates whether the map should show the 3D buildings layer.

This function is called to indicate whether 3D buildings should be shown as a layer on the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
To check if Maps Provider is capable of drawing 3D buildings, use maps_service_provider_is_data_supported() with MAPS_VIEW_BUILDING passed as a service data parameter.
Parameters:
[in]viewThe view handle
[in]enableThe enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_get_buildings_enabled()
maps_service_provider_is_data_supported()
int maps_view_set_center ( maps_view_h  view,
maps_coordinates_h  coordinates 
)

Centers the map on a given geographical coordinates.

This function centers the map on a given geographical coordinates using current zoom and orientation.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]coordinatesThe geographical coordinates of the position to be centered on the View
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
coordinates are created using maps_coordinates_create().
See also:
maps_view_get_center()
maps_view_set_zoom_level()
maps_view_set_orientation()
maps_coordinates_create()
maps_view_create()
int maps_view_set_event_cb ( maps_view_h  view,
maps_view_event_type_e  type,
maps_view_on_event_cb  callback,
void *  user_data 
)

Sets the event callback.

This function sets the callback which will be invoked every time the View processes the user's gesture, action and objects over the map.

Since :
3.0
Remarks:
To unregister the callback use maps_view_unset_event_cb().
Parameters:
[in]viewThe view handle
[in]typeThe event type
[in]callbackThe callback, matching the maps_view_on_event_cb() prototype
[in]user_dataThe user data pointer to be passed to the callback
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_unset_event_cb()
maps_view_on_event_cb()
maps_view_set_gesture_enabled()
maps_view_create()
int maps_view_set_gesture_enabled ( maps_view_h  view,
maps_view_gesture_e  gesture,
bool  enabled 
)

Enables or disables the map gesture.

This function enables or disables the map gesture.

Since :
3.0
Parameters:
[in]viewThe view handle
[in]gestureThe user gesture, one of listed in maps_view_gesture_e
[in]enabledThe enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_gesture_e
maps_view_get_gesture_enabled()
maps_view_create()
int maps_view_set_language ( maps_view_h  view,
const char *  language 
)

Sets View language.

This function sets the language to the given View.
Note that map display language is different from places and route language.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
If specific language wasn't set explicitly or map tile doesn't support the requested language, the default language of your Maps Provider is used.
In general, Map Provider set the default language as the mother tongue of the country or English.
Parameters:
[in]viewThe view handle
[in]languageThe display language in the map. A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. Each language tag is composed of one or more "subtags" separated by hyphens (-). Each subtag is composed of basic Latin letters or digits only. For example, "ko-KR" for Korean, "en-US" for American English
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_language()
maps_view_set_type()
maps_view_create()
int maps_view_set_max_zoom_level ( maps_view_h  view,
int  level 
)

Sets the maximal zoom level of the map.

This function sets the maximally allowed zoom level of the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Parameters:
[in]viewThe view handle
[out]levelThe new maximal zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_set_min_zoom_level()
maps_view_get_min_zoom_level()
maps_view_get_max_zoom_level()
maps_view_get_zoom_level()
maps_view_set_zoom_level()
maps_view_create()
int maps_view_set_min_zoom_level ( maps_view_h  view,
int  level 
)

Sets the minimal zoom level of the map.

This function sets the minimally allowed zoom level of the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
Parameters:
[in]viewThe view handle
[out]levelThe new minimal zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_INVALID_OPERATIONOperation is not valid
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_min_zoom_level()
maps_view_set_max_zoom_level()
maps_view_get_max_zoom_level()
maps_view_get_zoom_level()
maps_view_set_zoom_level()
maps_view_create()
int maps_view_set_orientation ( maps_view_h  view,
double  angle 
)

Sets the orientation on the View.

This function sets the rotation angle of the View.
If the specified rotation angle exceeds the [0..360] range, the function returns MAPS_ERROR_INVALID_PARAMETER error.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]angleThe new orientation angle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_orientation()
maps_view_set_zoom_level()
maps_view_create()
int maps_view_set_public_transit_enabled ( maps_view_h  view,
bool  enable 
)

Indicates whether the map should show the public transit layer.

This function is called to indicate whether public transit routes should be shown as a layer on the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
To check if Maps Provider is capable of drawing public transit routes, use maps_service_provider_is_data_supported() with MAPS_VIEW_PUBLIC_TRANSIT passed as a service data parameter.
Parameters:
[in]viewThe view handle
[in]enableThe enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_get_public_transit_enabled()
maps_service_provider_is_data_supported()
int maps_view_set_scalebar_enabled ( maps_view_h  view,
bool  enable 
)

Enables or disables scalebar.

This function enables or disables scalebar.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]enableThe enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_get_scalebar_enabled()
int maps_view_set_screen_location ( maps_view_h  view,
int  x,
int  y,
int  width,
int  height 
)

Sets geometry of View port.

This function set the position and (rectangular) size of the given View.
The position, naturally, will be relative to the top left corner of the parent window.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]xX screen coordinate for the top left corner of View
[in]yY screen coordinate for the top left corner of View
[in]widthThe new width of View in screen units
[in]heightThe new height of View in screen units
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_screen_location()
maps_view_resize()
maps_view_set_visibility()
maps_view_create()
int maps_view_set_traffic_enabled ( maps_view_h  view,
bool  enable 
)

Indicates whether the map should show the traffic layer.

This function is called to indicate whether traffic conditions should be shown as a layer on the map.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Remarks:
To check if Maps Provider is capable of drawing traffic conditions, use maps_service_provider_is_data_supported() with MAPS_VIEW_TRAFFIC passed as a service data parameter.
Parameters:
[in]viewThe view handle
[in]enableThe enable status
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_create()
maps_view_get_traffic_enabled()
maps_service_provider_is_data_supported()

Sets View type.

This function switches the View to a specified type, one of listed in maps_view_type_e enumeration.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]typeThe view type, one of listed in maps_view_type_e
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_type_e
maps_view_get_type()
maps_view_set_language()
maps_view_create()
int maps_view_set_visibility ( maps_view_h  view,
bool  visible 
)

Shows or hides the View.

This function changes the visibility of View on the screen.

Since :
3.0
Parameters:
[in]viewThe view handle
[in]visibleThe new visibility of the View
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_visibility()
maps_view_set_screen_location()
maps_view_create()
int maps_view_set_zoom_level ( maps_view_h  view,
int  level 
)

Sets zoom level of the map.

This function sets the integer zoom level of the map.
If the specified zoom level exceeds the maps Provider allowed zoom range, the function returns MAPS_ERROR_INVALID_PARAMETER error.
To check the range of allowed zoom level use maps_view_get_min_zoom_level() and maps_view_get_max_zoom_level().

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mapservice
http://tizen.org/privilege/internet
http://tizen.org/privilege/network.get
Parameters:
[in]viewThe view handle
[in]levelThe new zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_PERMISSION_DENIEDPermission Denied
MAPS_ERROR_CONNECTION_TIME_OUTTimeout error, no answer
MAPS_ERROR_NETWORK_UNREACHABLENetwork unavailable
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
See also:
maps_view_get_zoom_level()
maps_view_set_orientation()
maps_view_get_min_zoom_level()
maps_view_get_max_zoom_level()
maps_view_create()

Unsets the event callback.

This function unsets the event callback.

Since :
3.0
Parameters:
[in]viewThe view handle
[in]typeThe event type
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
view is created using maps_view_create().
the event callback is registered using maps_view_set_event_cb()
See also:
maps_view_set_event_cb()
maps_view_get_gesture_enabled()
maps_view_create()