Tizen Native API
5.5
|


This is a widget specifically for displaying a map. It uses basically OpenStreetMap provider http://www.openstreetmap.org/ but custom providers can be added.
It supports some basic but yet nice features:
- zooming and scrolling,
- markers with content to be displayed when user clicks over them,
- group of markers and
- routes.
This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for map objects.
Smart callbacks one can listen for:
"clicked"
- This is called when a user has clicked the map without dragging around."clicked,double"
- This is called when a user has double-clicked the map."press"
- This is called when a user has pressed down on the map."longpressed"
- This is called when a user has pressed down on the mapfor
a long time without dragging around."scroll"
- the content has been scrolled (moved)."scroll,drag,start"
- dragging the contents around has started."scroll,drag,stop"
- dragging the contents around has stopped."scroll,anim,start"
- scrolling animation has started."scroll,anim,stop"
- scrolling animation has stopped."zoom,start"
- Zoom animation started."zoom,stop"
- Zoom animation stopped."zoom,change"
- Zoom changed when using an auto zoom mode."tile,load"
- A map tile image load begins."tile,loaded"
- A map tile image load ends."tile,loaded,fail"
- A map tile image load fails."route,load"
- Route request begins."route,loaded"
- Route request ends."route,loaded,fail"
- Route request fails."name,load"
- Name request begins."name,loaded"
- Name request ends."name,loaded,fail"
- Name request fails."overlay,clicked"
- A overlay is clicked."loaded"
- when a map is finally loaded. (since 1.7)"language,changed"
- the program's language changed"focused"
- When the map has received focus. (since 1.8)"unfocused"
- When the map has lost focus. (since 1.8)
Available style for map widget:
"default"
Available style for markers:
"radio"
"radio2"
"empty"
Available style for marker bubble:
"default"
List of examples:
Typedef Documentation
typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class |
Each marker must be associated to a group class. It's required to add a mark. The group class defines the style of the marker when a marker is grouped to other markers. Markers with the same group are grouped if they are close. A new group class can be created with elm_map_marker_group_class_new().
typedef Evas_Object*(* Elm_Map_Group_Icon_Get_Func)(Evas_Object *obj, void *data) |
Icon fetching class function for markers group classes.
typedef struct _Elm_Map_Marker Elm_Map_Marker |
A marker to be shown in a specific point of the map. Can be created with elm_map_marker_add() and deleted with elm_map_marker_remove().
typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class |
Each marker must be associated to a class. It's required to add a mark. The class defines the style of the marker when a marker is displayed alone (not grouped). A new class can be created with elm_map_marker_class_new().
typedef void(* Elm_Map_Marker_Del_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o) |
Function to delete bubble content for marker classes.
typedef Evas_Object*(* Elm_Map_Marker_Get_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data) |
Bubble content fetching class function for marker classes. When the user click on a marker, a bubble is displayed with a content.
typedef Evas_Object*(* Elm_Map_Marker_Icon_Get_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data) |
Icon fetching class function for marker classes.
typedef struct _Elm_Map_Name Elm_Map_Name |
A handle for specific coordinates.
typedef void(* Elm_Map_Name_Cb)(void *data, Evas_Object *map, Elm_Map_Name *name) |
Async-callback function for the name request.
typedef void(* Elm_Map_Name_List_Cb)(void *data, Evas_Object *map, Eina_List *name_list) |
Async-callback function for the name list request.
typedef struct _Elm_Map_Overlay Elm_Map_Overlay |
A overlay to be shown in a specific point of the map. This can be created by elm_map_overlay_add() and similar functions and deleted by elm_map_overlay_del().
typedef void(* Elm_Map_Overlay_Del_Cb)(void *data, Evas_Object *map, Elm_Map_Overlay *overlay) |
Det callback function for the overlay.
- Since (EFL) :
- 1.7
typedef void(* Elm_Map_Overlay_Get_Cb)(void *data, Evas_Object *map, Elm_Map_Overlay *overlay) |
Get callback function for the overlay.
typedef struct _Elm_Map_Route Elm_Map_Route |
A route to be shown in the map. Can be created with elm_map_route_add() and deleted with elm_map_route_del().
typedef void(* Elm_Map_Route_Cb)(void *data, Evas_Object *map, Elm_Map_Route *route) |
Async-callback function for the route request.
Enumeration Type Documentation
enum Elm_Map_Name_Method |
Set the name search method.
This is for name module interface.
enum Elm_Map_Overlay_Type |
Set overlay type to be used. This type is resolved when the overlay is created. You can get this value by elm_map_overlay_type_get().
- See also:
- elm_map_overlay_type_get()
- elm_map_overlay_add()
- elm_map_overlay_class_add()
- elm_map_overlay_bubble_add()
enum Elm_Map_Zoom_Mode |
Set map's zoom behavior. It can be set to manual or automatic.
Default value is ELM_MAP_ZOOM_MODE_MANUAL.
Values don't work as bitmask, only one can be chosen.
Valid sizes are 2^zoom, consequently the map may be smaller than the scroller view.
See elm_map_zoom_mode_set() See elm_map_zoom_mode_get()
- Enumerator:
ELM_MAP_ZOOM_MODE_MANUAL Zoom controlled manually by elm_map_zoom_set(). It's set by default.
ELM_MAP_ZOOM_MODE_AUTO_FIT Zoom until map fits inside the scroll frame with no pixels outside this area.
ELM_MAP_ZOOM_MODE_AUTO_FILL Zoom until map fills scroll, ensuring no pixels are left unfilled.
ELM_MAP_ZOOM_MODE_LAST Sentinel value to indicate last enum field during iteration
Function Documentation
Evas_Object* elm_map_add | ( | Evas_Object * | parent | ) |
Add a new map widget to the given parent Elementary (container) object.
- Parameters:
-
parent The parent object.
- Returns:
- a new map widget handle or
NULL
, on errors.
This function inserts a new map widget on the canvas.
- Since :
- 2.3
- Examples:
- map_example_01.c, map_example_02.c, and map_example_03.c.
const char* elm_map_name_address_get | ( | const Elm_Map_Name * | name | ) |
Get the address of the name.
- Parameters:
-
name The name handle.
- Returns:
- Returns the address string of
name
.
This gets the coordinates of the name
, created with one of the conversion functions.
- See also:
- elm_map_name_add()
- Since :
- 2.3
void elm_map_name_del | ( | Elm_Map_Name * | name | ) |
Remove a name from the map.
- Parameters:
-
name The name to remove.
Basically the struct handled by name
will be freed, so conversions between address and coordinates will be lost.
- See also:
- elm_map_name_add()
- Since :
- 2.3
void elm_map_name_region_get | ( | const Elm_Map_Name * | name, |
double * | lon, | ||
double * | lat | ||
) |
Get the current coordinates of the name.
- Parameters:
-
name The name handle. lat Pointer to store the latitude. lon Pointer to store The longitude.
This gets the coordinates of the name
, created with one of the conversion functions.
- See also:
- elm_map_name_add()
- Since :
- 2.3
- Examples:
- map_example_03.c.
void elm_map_overlay_bubble_content_append | ( | Elm_Map_Overlay * | bubble, |
Evas_Object * | content | ||
) |
Add a content object to the bubble overlay.
- Parameters:
-
bubble The bubble overlay to add a content. content The content to be added to the bubble overlay.
Added contents will be displayed inside the bubble overlay.
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_bubble_content_clear | ( | Elm_Map_Overlay * | bubble | ) |
Clear all contents inside the bubble overlay.
- Parameters:
-
bubble The bubble overlay to clear the contents.
This will delete all contents inside the bubble overlay.
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_bubble_follow | ( | Elm_Map_Overlay * | bubble, |
const Elm_Map_Overlay * | parent | ||
) |
Follow a other overlay.
- Parameters:
-
bubble The bubble overlay to follow a parent overlay. parent The parent overlay to be followed by the bubble overlay.
Bubble overlay will follow the parent overlay's movement (hide, show, move).
- See also:
- elm_map_overlay_bubble_add()
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_class_append | ( | Elm_Map_Overlay * | clas, |
Elm_Map_Overlay * | overlay | ||
) |
Add a new overlay member to the class overlay.
- Parameters:
-
clas The class overlay to add a new overlay. overlay The overlay to be added to the class overlay.
- See also:
- elm_map_overlay_class_remove()
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_class_remove | ( | Elm_Map_Overlay * | clas, |
Elm_Map_Overlay * | overlay | ||
) |
Remove a overlay from the class.
- Parameters:
-
clas The class overlay to delete the overlay. overlay The overlay to be deleted from the class overlay.
- See also:
- elm_map_overlay_class_append()
- Since :
- 2.3
int elm_map_overlay_class_zoom_max_get | ( | const Elm_Map_Overlay * | clas | ) |
Get the maximum zoom from where the overlay members in the class can be grouped.
- Parameters:
-
clas The overlay class has overlay members.
- Returns:
- The maximum zoom.
- See also:
- elm_map_overlay_class_zoom_max_set()
- Since :
- 2.3
void elm_map_overlay_class_zoom_max_set | ( | Elm_Map_Overlay * | clas, |
int | zoom | ||
) |
Set the maximum zoom from where the overlay members in the class can be grouped.
- Parameters:
-
clas The overlay class has overlay members. zoom The maximum zoom.
Overlay members in the class only will be grouped when the map is displayed at less than zoom
.
- See also:
- elm_map_overlay_class_zoom_max_get()
- Since :
- 2.3
void elm_map_overlay_color_get | ( | const Elm_Map_Overlay * | overlay, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Get the object color of the overlay.
- Parameters:
-
overlay The overlay to return color. r Pointer to store the red channel value. g Pointer to store the green channel value. b Pointer to store the blue channel value. a Pointer to store the alpha channel value.
- See also:
- elm_map_overlay_color_set()
- Since :
- 2.3
void elm_map_overlay_color_set | ( | Elm_Map_Overlay * | overlay, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Set the object color of the overlay.
- Parameters:
-
overlay The overlay to be set color. r Red channel value, from 0 to 255. g Green channel value, from 0 to 255. b Blue channel value, from 0 to 255. a Alpha channel value, from 0 to 255.
It uses an additive color model, so each color channel represents how much of each primary colors must to be used. 0 represents absence of this color, so if all of the three are set to 0, the color will be black.
These component values should be integers in the range 0 to 255, (single 8-bit byte).
This sets the color used for the overlay. By default, it is set to solid red (r = 255, g = 0, b = 0, a = 255).
For alpha channel, 0 represents completely transparent, and 255, opaque.
Function supports only ELM_MAP_OVERLAY_TYPE_CLASS, ELM_MAP_OVERLAY_TYPE_DEFAULT and ELM_MAP_OVERLAY_TYPE_ROUTE Elm_Map_Overlay_Type types.
- See also:
- elm_map_overlay_color_get()
- Since :
- 2.3
- Examples:
- map_example_03.c.
const Evas_Object* elm_map_overlay_content_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get the content object.
- Parameters:
-
overlay The overlay to return the content.
- Returns:
- Return the evas object if it exists, else
NULL
.
Only default and class type overlay support this function.
Returned content is what being inside the overlay that being displayed.
Do not modify this object (move, show, hide, del, etc.). You can only resize this.
The content can be set by elm_map_overlay_content_set().
- See also:
- elm_map_overlay_content_set()
- Since :
- 2.3
void elm_map_overlay_content_set | ( | Elm_Map_Overlay * | overlay, |
Evas_Object * | obj | ||
) |
Set the content object of the overlay.
- Parameters:
-
overlay The overlay to be set the content. obj The evas object will be used to display the overlay.
Only default and class type overlay support this function.
The content should be resized or set size hints before set to the overlay. Do not modify this object (move, show, hide, del, etc.), after set. You can only resize this.
This content is what will be inside the overlay that will be displayed. If a content is set, icon and default style layout are no more used before the content is deleted.
If obj
is NULL
, content inside the overlay is deleted.
- See also:
- elm_map_overlay_content_get()
- Since :
- 2.3
void* elm_map_overlay_data_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get the user data stored on a overlay.
- Parameters:
-
overlay The overlay to return the user data.
- Returns:
- A pointer to data stored using elm_map_overlay_data_set(), or
NULL
, if none has been set.
- See also:
- elm_map_overlay_data_set()
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_data_set | ( | Elm_Map_Overlay * | overlay, |
void * | data | ||
) |
Set a pointer of user data for a overlay.
- Parameters:
-
overlay The overlay to own the user data. data A pointer of user data
- See also:
- elm_map_overlay_data_get()
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_del | ( | Elm_Map_Overlay * | overlay | ) |
Delete a overlay from the map. This function can delete all types of overlays.
- Parameters:
-
overlay The overlay to be deleted.
- See also:
- elm_map_overlay_add()
- elm_map_overlay_class_add()
- elm_map_overlay_bubble_add()
- Since :
- 2.3
void elm_map_overlay_del_cb_set | ( | Elm_Map_Overlay * | overlay, |
Elm_Map_Overlay_Del_Cb | del_cb, | ||
void * | data | ||
) |
Set the del callback function to call when the overlay is deleted.
- Parameters:
-
overlay The overlay to own the del callback function. del_cb The callback function. data The user callback data.
If the overlay is deleted, the callback wll be called. The deleted overlay is returned by callback.
You can delete this callback function by setting NULL
.
- Since (EFL) :
- 1.7
- Since :
- 2.3
int elm_map_overlay_displayed_zoom_min_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get the minimum zoom from where the overlay is displayed.
- Parameters:
-
overlay The overlay to return the minimum zoom.
- Returns:
- zoom The minimum zoom.
- Since :
- 2.3
void elm_map_overlay_displayed_zoom_min_set | ( | Elm_Map_Overlay * | overlay, |
int | zoom | ||
) |
Set the minimum zoom from where the overlay is displayed.
- Parameters:
-
overlay The overlay to be set the minimum zoom. zoom The minimum zoom.
The overlay only will be displayed when the map is displayed at zoom
or bigger.
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_overlay_get_cb_set | ( | Elm_Map_Overlay * | overlay, |
Elm_Map_Overlay_Get_Cb | get_cb, | ||
void * | data | ||
) |
Set the get callback function of the overlay.
- Parameters:
-
overlay The overlay to own the get callback function. get_cb The callback function. data The user callback data.
If the overlay is clicked, the callback wll be called. The clicked overlay is returned by callback.
You can add callback to the class overlay. If one of the group overlays in this class is clicked, callback will be called and return a virtual group overlays.
You can delete this callback function by setting NULL
.
- Since :
- 2.3
Eina_List* elm_map_overlay_group_members_get | ( | const Elm_Map_Overlay * | grp | ) |
Get the overlay members of the group overlay.
- Parameters:
-
grp The group overlay has overlay members.
- Returns:
- The list of group overlay members.
The group overlays are virtual overlays. Those are shown and hidden dynamically. You can add callback to the class overlay. If one of the group overlays in this class is clicked, callback will be called and return a virtual group overlays.
You can change the state (hidden, paused, etc.) or set the content or icon of the group overlays by chaning the state of the class overlay. Do not modifty the group overlay itself.
- See also:
- elm_map_overlay_class_add()
- Since :
- 2.3
Eina_Bool elm_map_overlay_hide_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get a value whether the overlay is hidden or not.
- Parameters:
-
overlay The overlay to return the hidden state.
- Returns:
EINA_TRUE
means the overlay is hidden.EINA_FALSE
indicates it is not.
This gets the current hidden state for the overlay.
- See also:
- elm_map_overlay_hide_set()
- Since :
- 2.3
void elm_map_overlay_hide_set | ( | Elm_Map_Overlay * | overlay, |
Eina_Bool | hide | ||
) |
Set if the overlay is hidden or not.
- Parameters:
-
overlay The overlay to be hidden. hide Use EINA_TRUE
to hide the overlay orEINA_FALSE
to show.
- See also:
- elm_map_overlay_hide_get()
- Since :
- 2.3
const Evas_Object* elm_map_overlay_icon_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get the icon object.
- Parameters:
-
overlay The overlay to return the icon.
- Returns:
- Return the icon object if it exists, else
NULL
.
Only default and class type overlay support this function.
Returned icon is what being inside the overlay that being displayed.
Do not modify this icon (move, show, hide, resize, del, etc.).
The icon can be set by elm_map_overlay_icon_set().
- See also:
- elm_map_overlay_icon_set()
- Since :
- 2.3
void elm_map_overlay_icon_set | ( | Elm_Map_Overlay * | overlay, |
Evas_Object * | icon | ||
) |
Set a icon of the overlay.
- Parameters:
-
overlay The overlay to be set the icon. icon The icon will be used to display the overlay.
Only default and class type overlay support this function.
Do not modify this object (move, show, hide, resize, del, etc.), after set.
If icon is set, default style layout will not be used.
If icon
is NULL
, icon inside the overlay will be deleted.
- See also:
- elm_map_overlay_icon_get()
- Since :
- 2.3
- Examples:
- map_example_02.c.
Eina_Bool elm_map_overlay_paused_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get a value whether the overlay is paused or not.
- Parameters:
-
overlay The overlay to return paused state.
- Returns:
EINA_TRUE
means overlay is paused.EINA_FALSE
indicates it is not.
This gets the current paused state for the overlay.
- See also:
- elm_map_overlay_paused_set()
- Since :
- 2.3
void elm_map_overlay_paused_set | ( | Elm_Map_Overlay * | overlay, |
Eina_Bool | paused | ||
) |
Pause or unpause the overlay.
- Parameters:
-
overlay The overlay to be paused. paused Use EINA_TRUE
to pause theoverlay
orEINA_FALSE
to unpause it.
This sets the paused state to on (EINA_TRUE
) or off (EINA_FALSE
) for the overlay.
The default is off.
This will stop moving the overlay coordinates instantly. even if map being scrolled or zoomed.
- See also:
- elm_map_overlay_paused_get()
- Since :
- 2.3
void elm_map_overlay_polygon_region_add | ( | Elm_Map_Overlay * | overlay, |
double | lon, | ||
double | lat | ||
) |
Add a geographic coordinates to the polygon overlay.
- Parameters:
-
overlay The polygon overlay to get a region. lon The longitude. lat The latitude.
At least 3 regions should be added to show the polygon overlay.
Overlay created with this method can be deleted with elm_map_overlay_del().
- See also:
- elm_map_overlay_polygon_add()
- elm_map_overlay_del()
- Since :
- 2.3
void elm_map_overlay_region_get | ( | const Elm_Map_Overlay * | overlay, |
double * | lon, | ||
double * | lat | ||
) |
Get the geographic coordinates of the overlay.
- Parameters:
-
overlay The overlay to return geographic coordinates. lon Pointer to store longitude. lat Pointer to store latitude.
Only default and bubble type overlay support this function.
This returns the center coordinates of the overlay. It can be set by elm_map_overlay_region_set().
- See also:
- elm_map_overlay_region_set()
- Since :
- 2.3
void elm_map_overlay_region_set | ( | Elm_Map_Overlay * | overlay, |
double | lon, | ||
double | lat | ||
) |
Set the geographic coordinates of the overlay.
- Parameters:
-
overlay The overlay to be set geographic coordinates. lon Longitude to be set. lat Latitude to be set.
Only default and bubble type overlay support this function.
This sets the center coordinates of the overlay. It can be get by elm_map_overlay_region_get().
- See also:
- elm_map_overlay_region_get()
- Since :
- 2.3
void elm_map_overlay_show | ( | Elm_Map_Overlay * | overlay | ) |
Show the given overlay at the center of the map, immediately.
- Parameters:
-
overlay The overlay to be center at.
This causes map to redraw its viewport's contents to the region containing the given overlay's
coordinates, that will be moved to the center of the map.
- See also:
- elm_map_overlays_show() if more than one overlay need to be displayed.
- Since :
- 2.3
Elm_Map_Overlay_Type elm_map_overlay_type_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get the overlay type.
- Parameters:
-
overlay The overlay to return type.
- Returns:
- Return the overlay type.
This type is resolved when the overlay is created.
- See also:
- elm_map_overlay_add()
- elm_map_overlay_class_add()
- elm_map_overlay_bubble_add()
- Since :
- 2.3
Eina_Bool elm_map_overlay_visible_get | ( | const Elm_Map_Overlay * | overlay | ) |
Get a value whether the overlay is visible or not.
- Parameters:
-
overlay The overlay to return visible state.
- Returns:
EINA_TRUE
means overlay is visible.EINA_FALSE
indicates it is not.
The visible of the overlay can not be set. This value can be changed dynamically while zooming and panning
- Since (EFL) :
- 1.7
- Since :
- 2.3
void elm_map_overlays_show | ( | Eina_List * | overlays | ) |
Move and zoom the map to display a list of overlays.
- Parameters:
-
overlays A list of Elm_Map_Overlay handles.
The map will be centered on the center point of the overlays in the list. Then the map will be zoomed in order to fit the overlays using the maximum zoom which allows display of all the overlays.
- Warning:
- All the overlays should belong to the same map object.
- See also:
- elm_map_overlay_show() to show a single overlay.
- Since :
- 2.3
- Examples:
- map_example_02.c.
void elm_map_route_del | ( | Elm_Map_Route * | route | ) |
Remove a route from the map.
- Parameters:
-
route The route to remove.
- See also:
- elm_map_route_add()
- Since :
- 2.3
- Examples:
- map_example_03.c.
double elm_map_route_distance_get | ( | const Elm_Map_Route * | route | ) |
Get the route distance in kilometers.
- Parameters:
-
route The route object.
- Returns:
- The distance of route (unit : km).
- Since :
- 2.3
const char* elm_map_route_node_get | ( | const Elm_Map_Route * | route | ) |
Get the information of route nodes.
- Parameters:
-
route The route object.
- Returns:
- Returns a string with the nodes of route.
- Since :
- 2.3
const char* elm_map_route_waypoint_get | ( | const Elm_Map_Route * | route | ) |
Get the information of route waypoint.
- Parameters:
-
route the route object.
- Returns:
- Returns a string with information about waypoint of route.
- Since :
- 2.3
Eina_Bool elm_map_wheel_disabled_get | ( | const Evas_Object * | obj | ) |
Get a value whether mouse wheel is enabled or not.
Mouse wheel can be used for the user to zoom in or zoom out the map.
- Parameters:
-
[in] obj The object.
- Returns:
- Use
true
to disable mouse wheel orfalse
to enable it.
- Since :
- 2.3
void elm_map_wheel_disabled_set | ( | Evas_Object * | obj, |
Eina_Bool | disabled | ||
) |
Enable or disable mouse wheel to be used to zoom in / out the map.
Wheel is enabled by default.
- Parameters:
-
[in] obj The object. [in] disabled Use true
to disable mouse wheel orfalse
to enable it.
- Since :
- 2.3
int elm_map_zoom_get | ( | const Evas_Object * | obj | ) |
Get the zoom level of the map.
This returns the current zoom level of the map object.
Note that if you set the fill mode to other than ELM_MAP_ZOOM_MODE_MANUAL (which is the default), the zoom level may be changed at any time by the map object itself to account for map size and map viewport size.
- Parameters:
-
[in] obj The object.
- Returns:
- The zoom level.
- Since :
- 2.3
- Examples:
- map_example_01.c, map_example_02.c, and map_example_03.c.
Elm_Map_Zoom_Mode elm_map_zoom_mode_get | ( | const Evas_Object * | obj | ) |
Get the zoom mode used by the map object.
This function returns the current zoom mode used by the ma object.
- Parameters:
-
[in] obj The object.
- Returns:
- The zoom mode of the map, being it one of ELM_MAP_ZOOM_MODE_MANUAL (default), ELM_MAP_ZOOM_MODE_AUTO_FIT, or ELM_MAP_ZOOM_MODE_AUTO_FILL.
- Since :
- 2.3
void elm_map_zoom_mode_set | ( | Evas_Object * | obj, |
Elm_Map_Zoom_Mode | mode | ||
) |
Set the zoom mode used by the map object.
This sets the zoom mode to manual or one of the automatic levels. Manual (ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by elm_map_zoom_mode_set and will stay at that level until changed by code or until zoom mode is changed. This is the default mode.
The Automatic modes will allow the map object to automatically adjust zoom mode based on properties. ELM_MAP_ZOOM_MODE_AUTO_FIT will adjust zoom so the map fits inside the scroll frame with no pixels outside this area. ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but ensure no pixels within the frame are left unfilled. Do not forget that the valid sizes are 2^zoom, consequently the map may be smaller than the scroller view.
- Parameters:
-
[in] obj The object. [in] mode The zoom mode of the map, being it one of ELM_MAP_ZOOM_MODE_MANUAL (default), ELM_MAP_ZOOM_MODE_AUTO_FIT, or ELM_MAP_ZOOM_MODE_AUTO_FILL.
- Since :
- 2.3
- Examples:
- map_example_01.c, map_example_02.c, and map_example_03.c.
void elm_map_zoom_set | ( | Evas_Object * | obj, |
int | zoom | ||
) |
Set the zoom level of the map.
This sets the zoom level.
It will respect limits defined by elm_map_zoom_min_set and elm_map_zoom_max_set.
By default these values are 0 (world map) and 18 (maximum zoom).
This function should be used when zoom mode is set to ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set with elm_map_zoom_mode_set.
- Parameters:
-
[in] obj The object. [in] zoom The zoom level.
- Since :
- 2.3
- Examples:
- map_example_01.c, map_example_02.c, and map_example_03.c.