Tizen Native API
6.5
|
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] index The current index of the visual object starts from 0 [in] total The total amount of visual objects [in] object The visual object [in] user_data The 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.
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] type The new type of callback, listed in maps_view_event_type_e [in] event_data The event data [in] user_data The 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.
typedef enum _maps_view_type_e maps_view_type_e |
Enumeration for View types (themes).
- Since :
- 3.0
Enumeration Type Documentation
enum _maps_view_type_e |
Enumeration for View types (themes).
- Since :
- 3.0
Function Documentation
int maps_view_add_object | ( | maps_view_h | view, |
maps_view_object_h | object | ||
) |
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] view The view handle [in] object The handle of the object to add
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not 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().
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] maps The maps service handle [in] obj The evas object to be drawn [out] view The 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_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- maps is created using maps_service_create().
- obj is recommended using a smart object.
int maps_view_destroy | ( | maps_view_h | view | ) |
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] view The View handle to destroy
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not 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] view The view handle [in] callback The callback function to invoke [in] user_data The user data pointer to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_FOUND Result not found MAPS_ERROR_NOT_SUPPORTED Not 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.
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] view The view handle [in] coordinates The geographical coordinates [out] x The pointer to an integer in which to store the x coordinate on the screen, corresponding to given geographical coordinates [out] y The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
- coordinates is created using maps_coordinates_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] view The view handle [out] enable The pointer to a boolean in which to store the enable status
- 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:
- view is created using maps_view_create().
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] view The view handle [out] coordinates The 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_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] gesture The user gesture, one of listed in maps_view_gesture_e [out] enabled The pointer to a boolean in which to store the enable status
- 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:
- view is created using maps_view_create().
- enabled status set ad default or modified using maps_view_set_gesture_enabled().
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] view The view handle [out] language The 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_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] max_zoom_level The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] min_zoom_level The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] rotation_angle The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] enable The pointer to a boolean in which to store the enable status
- 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:
- view is created using maps_view_create().
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] view The view handle [out] enabled The pointer to a boolean in which to store the enable status
- 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:
- view is created using maps_view_create().
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] view The view handle [out] x X screen coordinate for the top left corner of View [out] y Y screen coordinate for the left top corner of View [out] width The pointer to an integer in which to store the width of the view [out] height The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] enable The pointer to a boolean in which to store the enable status
- 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:
- view is created using maps_view_create().
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] view The view handle [out] type The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] viewport The pointer to Evas_Object in which to store the View port
- 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:
- 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] view The view handle [out] visible The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] level The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] x The new x position, in screen units [in] y The new y position, in screen units
- 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:
- view is created using maps_view_create().
int maps_view_remove_all_objects | ( | maps_view_h | view | ) |
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] view The view handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
- objects are added using maps_view_add_object().
int maps_view_remove_object | ( | maps_view_h | view, |
maps_view_object_h | object | ||
) |
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] view The view handle [in] object The object to remove
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
- object is added using maps_view_add_object().
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] view The view handle [in] width The new new width in screen units [in] height The new new height in screen units
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] x The x coordinate on the screen [in] y The y coordinate on the screen [out] coordinates The 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_NONE Successful MAPS_ERROR_OUT_OF_MEMORY Out of memory MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] enable The enable status
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
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] view The view handle [in] coordinates The geographical coordinates of the position to be centered on the View
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
- coordinates are created using maps_coordinates_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] view The view handle [in] type The event type [in] callback The callback, matching the maps_view_on_event_cb() prototype [in] user_data The user data pointer to be passed to the callback
- 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:
- view is created using 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] view The view handle [in] gesture The user gesture, one of listed in maps_view_gesture_e [in] enabled The enable status
- 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:
- view is created using 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] view The view handle [in] language The 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_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] level The new maximal zoom level
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [out] level The new minimal zoom level
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_INVALID_OPERATION Operation is not valid MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] angle The new orientation angle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] enable The enable status
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
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] view The view handle [in] enable The enable status
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
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] view The view handle [in] x X screen coordinate for the top left corner of View [in] y Y screen coordinate for the top left corner of View [in] width The new width of View in screen units [in] height The new height of View in screen units
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] enable The enable status
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
int maps_view_set_type | ( | maps_view_h | view, |
maps_view_type_e | type | ||
) |
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] view The view handle [in] type The view type, one of listed in maps_view_type_e
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using 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] view The view handle [in] visible The new visibility of the View
- 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:
- view is created using 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] view The view handle [in] level The new zoom level
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MAPS_ERROR_NONE Successful MAPS_ERROR_INVALID_PARAMETER Invalid parameter MAPS_ERROR_PERMISSION_DENIED Permission Denied MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer MAPS_ERROR_NETWORK_UNREACHABLE Network unavailable MAPS_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- view is created using maps_view_create().
int maps_view_unset_event_cb | ( | maps_view_h | view, |
maps_view_event_type_e | type | ||
) |
Unsets the event callback.
This function unsets the event callback.
- Since :
- 3.0
- Parameters:
-
[in] view The view handle [in] type The event type
- 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:
- view is created using maps_view_create().
- the event callback is registered using maps_view_set_event_cb()