5 * @image html img/widget/map/preview-00.png
6 * @image latex img/widget/map/preview-00.eps
8 * This is a widget specifically for displaying a map. It uses basically
9 * OpenStreetMap provider http://www.openstreetmap.org/,
10 * but custom providers can be added.
12 * It supports some basic but yet nice features:
14 * @li markers with content to be displayed when user clicks over it
15 * @li group of markers
18 * Smart callbacks one can listen to:
20 * - "clicked" - This is called when a user has clicked the map without
22 * - "clicked,double" - This is called when a user has double-clicked
24 * - "press" - This is called when a user has pressed down on the map.
25 * - "longpressed" - This is called when a user has pressed down on the map
26 * for a long time without dragging around.
27 * - "scroll" - the content has been scrolled (moved).
28 * - "scroll,drag,start" - dragging the contents around has started.
29 * - "scroll,drag,stop" - dragging the contents around has stopped.
30 * - "scroll,anim,start" - scrolling animation has started.
31 * - "scroll,anim,stop" - scrolling animation has stopped.
32 * - "zoom,start" - Zoom animation started.
33 * - "zoom,stop" - Zoom animation stopped.
34 * - "zoom,change" - Zoom changed when using an auto zoom mode.
35 * - "tile,load" - A map tile image load begins.
36 * - "tile,loaded" - A map tile image load ends.
37 * - "tile,loaded,fail" - A map tile image load fails.
38 * - "route,load" - Route request begins.
39 * - "route,loaded" - Route request ends.
40 * - "route,loaded,fail" - Route request fails.
41 * - "name,load" - Name request begins.
42 * - "name,loaded" - Name request ends.
43 * - "name,loaded,fail" - Name request fails.
44 * - "overlay,clicked" - A overlay is clicked.
46 * Available style for map widget:
49 * Available style for markers:
54 * Available style for marker bubble:
58 * @li @ref map_example_01
59 * @li @ref map_example_02
60 * @li @ref map_example_03
69 * Set map's zoom behavior. It can be set to manual or automatic.
71 * Default value is #ELM_MAP_ZOOM_MODE_MANUAL.
73 * Values <b> don't </b> work as bitmask, only one can be chosen.
75 * @note Valid sizes are 2^zoom, consequently the map may be smaller
76 * than the scroller view.
78 * @see elm_map_zoom_mode_set()
79 * @see elm_map_zoom_mode_get()
85 ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controlled manually by elm_map_zoom_set(). It's set by default. */
86 ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */
87 ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */
88 ELM_MAP_ZOOM_MODE_LAST
92 * Set type of a external source (provider).
94 * @see elm_map_sources_get()
95 * @see elm_map_source_get()
96 * @see elm_map_source_set()
102 ELM_MAP_SOURCE_TYPE_TILE, /**< Map tile provider. */
103 ELM_MAP_SOURCE_TYPE_ROUTE, /**< Route service provider. */
104 ELM_MAP_SOURCE_TYPE_NAME, /**< Name service provider. */
105 ELM_MAP_SOURCE_TYPE_LAST
106 } Elm_Map_Source_Type;
109 * Set type of transport used on route.
111 * @see elm_map_route_add()
117 ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */
118 ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */
119 ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */
120 ELM_MAP_ROUTE_TYPE_LAST
121 } Elm_Map_Route_Type;
124 * Set the routing method, what should be prioritized, time or distance.
126 * @see elm_map_route_add()
132 ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should prioritize time. */
133 ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should prioritized distance. */
134 ELM_MAP_ROUTE_METHOD_LAST
135 } Elm_Map_Route_Method;
138 * Set the name search method.
140 * This is for name module interface.
146 ELM_MAP_NAME_METHOD_SEARCH,
147 ELM_MAP_NAME_METHOD_REVERSE,
148 ELM_MAP_NAME_METHOD_LAST
149 } Elm_Map_Name_Method;
152 * Set overlay type to be used. This type is resolved
153 * when the overlay is created.
154 * You can get this value by elm_map_overlay_type_get().
156 * @see elm_map_overlay_type_get()
157 * @see elm_map_overlay_add()
158 * @see elm_map_overlay_class_add()
159 * @see elm_map_overlay_bubble_add()
163 typedef enum _Elm_Map_Overlay_Type
165 ELM_MAP_OVERLAY_TYPE_NONE = 0,
166 ELM_MAP_OVERLAY_TYPE_DEFAULT,
167 ELM_MAP_OVERLAY_TYPE_CLASS,
168 ELM_MAP_OVERLAY_TYPE_BUBBLE,
169 ELM_MAP_OVERLAY_TYPE_ROUTE
170 } Elm_Map_Overlay_Type;
172 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(). */
173 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(). */
174 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(). */
175 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_remove(). */
176 typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */
177 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(). */
179 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. */
180 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. */
181 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. */
182 typedef Evas_Object *(*Elm_Map_Group_Icon_Get_Func)(Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */
184 typedef void (*Elm_Map_Overlay_Get_Cb)(void *data, Evas_Object *map, const Elm_Map_Overlay *overlay); /**< Get callback function for the overlay. */
185 typedef void (*Elm_Map_Name_Cb)(void *data, Evas_Object *map, const Elm_Map_Name *name); /**< Async-callback function for the name request. */
186 typedef void (*Elm_Map_Route_Cb)(void *data, Evas_Object *map, const Elm_Map_Route *route); /**< Async-callback function for the route request. */
189 * Add a new map widget to the given parent Elementary (container) object.
191 * @param parent The parent object.
192 * @return a new map widget handle or @c NULL, on errors.
194 * This function inserts a new map widget on the canvas.
198 EAPI Evas_Object *elm_map_add(Evas_Object *parent);
201 * Set the zoom level of the map.
203 * @param obj The map object.
204 * @param zoom The zoom level to set.
206 * This sets the zoom level.
208 * It will respect limits defined by elm_map_zoom_min_set() and
209 * elm_map_zoom_max_set().
211 * By default these values are 0 (world map) and 18 (maximum zoom).
213 * This function should be used when zoom mode is set to
214 * #ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set
215 * with elm_map_zoom_mode_set().
217 * @see elm_map_zoom_mode_set()
218 * @see elm_map_zoom_get()
222 EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom);
225 * Get the zoom level of the map.
227 * @param obj The map object.
228 * @return The current zoom level.
230 * This returns the current zoom level of the map object.
232 * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL
233 * (which is the default), the zoom level may be changed at any time by the
234 * map object itself to account for map size and map viewport size.
236 * @see elm_map_zoom_set() for details.
240 EAPI int elm_map_zoom_get(const Evas_Object *obj);
243 * Set the zoom mode used by the map object.
245 * @param obj The map object.
246 * @param mode The zoom mode of the map, being it one of
247 * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT,
248 * or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
250 * This sets the zoom mode to manual or one of the automatic levels.
251 * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by
252 * elm_map_zoom_set() and will stay at that level until changed by code
253 * or until zoom mode is changed. This is the default mode.
255 * The Automatic modes will allow the map object to automatically
256 * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will
257 * adjust zoom so the map fits inside the scroll frame with no pixels
258 * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but
259 * ensure no pixels within the frame are left unfilled. Do not forget that
260 * the valid sizes are 2^zoom, consequently the map may be smaller than
263 * @see elm_map_zoom_set()
267 EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode);
270 * Get the zoom mode used by the map object.
272 * @param obj The map object.
273 * @return The zoom mode of the map, being it one of
274 * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT,
275 * or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
277 * This function returns the current zoom mode used by the map object.
279 * @see elm_map_zoom_mode_set() for more details.
283 EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj);
286 * Set the minimum zoom of the source.
288 * @param obj The map object.
289 * @param zoom New minimum zoom value to be used.
291 * By default, it's 0.
295 EAPI void elm_map_zoom_min_set(Evas_Object *obj, int zoom);
298 * Get the minimum zoom of the source.
300 * @param obj The map object.
301 * @return Returns the minimum zoom of the source.
303 * @see elm_map_zoom_min_set() for details.
307 EAPI int elm_map_zoom_min_get(const Evas_Object *obj);
310 * Set the maximum zoom of the source.
312 * @param obj The map object.
313 * @param zoom New maximum zoom value to be used.
315 * By default, it's 18.
319 EAPI void elm_map_zoom_max_set(Evas_Object *obj, int zoom);
322 * Get the maximum zoom of the source.
324 * @param obj The map object.
325 * @return Returns the maximum zoom of the source.
327 * @see elm_map_zoom_min_set() for details.
331 EAPI int elm_map_zoom_max_get(const Evas_Object *obj);
334 * Get the current geographic coordinates of the map.
336 * @param obj The map object.
337 * @param lon Pointer to store longitude.
338 * @param lat Pointer to store latitude.
340 * This gets the current center coordinates of the map object. It can be
341 * set by elm_map_region_bring_in() and elm_map_region_show().
343 * @see elm_map_region_bring_in()
344 * @see elm_map_region_show()
348 EAPI void elm_map_region_get(const Evas_Object *obj, double *lon, double *lat);
351 * Animatedly bring in given coordinates to the center of the map.
353 * @param obj The map object.
354 * @param lon Longitude to center at.
355 * @param lat Latitude to center at.
357 * This causes map to jump to the given @p lat and @p lon coordinates
358 * and show it (by scrolling) in the center of the viewport, if it is not
359 * already centered. This will use animation to do so and take a period
360 * of time to complete.
362 * @see elm_map_region_show() for a function to avoid animation.
363 * @see elm_map_region_get()
367 EAPI void elm_map_region_bring_in(Evas_Object *obj, double lon, double lat);
370 * Show the given coordinates at the center of the map, @b immediately.
372 * @param obj The map object.
373 * @param lon Longitude to center at.
374 * @param lat Latitude to center at.
376 * This causes map to @b redraw its viewport's contents to the
377 * region containing the given @p lat and @p lon, that will be moved to the
380 * @see elm_map_region_bring_in() for a function to move with animation.
381 * @see elm_map_region_get()
385 EAPI void elm_map_region_show(Evas_Object *obj, double lon, double lat);
388 * Convert canvas coordinates into geographic coordinates
389 * (longitude, latitude).
391 * @param obj The map object.
392 * @param x horizontal coordinate of the point to convert.
393 * @param y vertical coordinate of the point to convert.
394 * @param lon A pointer to the longitude.
395 * @param lat A pointer to the latitude.
397 * This gets longitude and latitude from canvas x, y coordinates. The canvas
398 * coordinates mean x, y coordinate from current viewport.
400 * see elm_map_region_to_canvas_convert()
404 EAPI void elm_map_canvas_to_region_convert(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, double *lon, double *lat);
407 * Convert geographic coordinates (longitude, latitude)
408 * into canvas coordinates.
410 * @param obj The map object.
411 * @param lon The longitude to convert.
412 * @param lat The latitude to convert.
413 * @param x A pointer to horizontal coordinate.
414 * @param y A pointer to vertical coordinate.
416 * This gets canvas x, y coordinates from longitude and latitude. The canvas
417 * coordinates mean x, y coordinate from current viewport.
419 * see elm_map_canvas_to_region_convert()
423 EAPI void elm_map_region_to_canvas_convert(const Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y);
426 * Pause or unpause the map.
428 * @param obj The map object.
429 * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE
432 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
435 * The default is off.
437 * This will stop zooming using animation, changing zoom levels will
438 * change instantly. This will stop any existing animations that are running.
440 * @see elm_map_paused_get()
444 EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused);
447 * Get a value whether map is paused or not.
449 * @param obj The map object.
450 * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates
453 * This gets the current paused state for the map object.
455 * @see elm_map_paused_set() for details.
459 EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj);
464 * @param obj The map object.
465 * @param degree Angle from 0.0 to 360.0 to rotate around Z axis.
466 * @param cx Rotation's center horizontal position.
467 * @param cy Rotation's center vertical position.
469 * @see elm_map_rotate_get()
473 EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy);
476 * Get the rotate degree of the map
478 * @param obj The map object
479 * @param degree Pointer to store degrees from 0.0 to 360.0
480 * to rotate around Z axis.
481 * @param cx Pointer to store rotation's center horizontal position.
482 * @param cy Pointer to store rotation's center vertical position.
484 * @see elm_map_rotate_set() to set map rotation.
488 EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy);
491 * Enable or disable mouse wheel to be used to zoom in / out the map.
493 * @param obj The map object.
494 * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE
497 * Mouse wheel can be used for the user to zoom in or zoom out the map.
499 * It's disabled by default.
501 * @see elm_map_wheel_disabled_get()
505 EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
508 * Get a value whether mouse wheel is enabled or not.
510 * @param obj The map object.
511 * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates
514 * Mouse wheel can be used for the user to zoom in or zoom out the map.
516 * @see elm_map_wheel_disabled_set() for details.
520 EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj);
523 * Set the user agent used by the map object to access routing services.
525 * @param obj The map object.
526 * @param user_agent The user agent to be used by the map.
528 * User agent is a client application implementing a network protocol used
529 * in communications within a client–server distributed computing system
531 * The @p user_agent identification string will transmitted in a header
532 * field @c User-Agent.
534 * @see elm_map_user_agent_get()
538 EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent);
541 * Get the user agent used by the map object.
543 * @param obj The map object.
544 * @return The user agent identification string used by the map.
546 * @see elm_map_user_agent_set() for details.
550 EAPI const char *elm_map_user_agent_get(const Evas_Object *obj);
554 * Add a new overlay to the map object. This overlay has a default type.
556 * @param obj The map object to add a new overlay.
557 * @param lon The longitude of the overlay.
558 * @param lat The latitude of the overlay.
559 * @return The created overlay or @c NULL upon failure.
561 * A overlay will be created and shown in a specific point of the map, defined
562 * by @p lon and @p lat.
564 * The created overlay has a default style layout before content or
566 * If content or icon is set, those are displayed instead of default style
568 * You can set by using elm_map_overlay_content_set() or
569 * elm_map_overlay_icon_set(). If NULL is set, default style
572 * Overlay created with this method can be deleted by elm_map_overlay_del().
574 * @see elm_map_overlay_del()
575 * @see elm_map_overlay_class_add()
576 * @see elm_map_overlay_bubble_add()
577 * @see elm_map_overlay_content_set()
578 * @see elm_map_overlay_icon_set()
582 EAPI Elm_Map_Overlay * elm_map_overlay_add(Evas_Object *obj, double lon, double lat);
585 * Delete a overlay from the map. This function can delete all types
588 * @param overlay The overlay to be deleted.
590 * @see elm_map_overlay_add()
591 * @see elm_map_overlay_class_add()
592 * @see elm_map_overlay_bubble_add()
596 EAPI void elm_map_overlay_del(Elm_Map_Overlay *overlay);
599 * Get the overlay type.
601 * @param overlay The overlay to return type.
602 * @return Return the overlay type.
604 * This type is resolved when the overlay is created.
606 * @see elm_map_overlay_add()
607 * @see elm_map_overlay_class_add()
608 * @see elm_map_overlay_bubble_add()
612 EAPI Elm_Map_Overlay_Type elm_map_overlay_type_get(const Elm_Map_Overlay *overlay);
615 * Set a pointer of user data for a overlay.
617 * @param overlay The overlay to own the user data.
618 * @param data A pointer of user data
620 * @see elm_map_overlay_data_get()
624 EAPI void elm_map_overlay_data_set(Elm_Map_Overlay *overlay, void *data);
627 * Get the user data stored on a overlay.
629 * @param overlay The overlay to return the user data.
630 * @return A pointer to data stored using elm_map_overlay_data_set(),
631 * or @c NULL, if none has been set.
633 * @see elm_map_overlay_data_set()
637 EAPI void * elm_map_overlay_data_get(const Elm_Map_Overlay *overlay);
640 * Set if the overlay is hidden or not.
642 * @param overlay The overlay to be hidden.
643 * @param hide Use @c EINA_TRUE to hide the overlay or @c EINA_FALSE to show.
645 * @see elm_map_overlay_hide_get()
649 EAPI void elm_map_overlay_hide_set(Elm_Map_Overlay *overlay, Eina_Bool hide);
652 * Get a value whether the overlay is hidden or not.
654 * @param overlay The overlay to return the hidden state.
655 * @return @c EINA_TRUE means the overlay is hidden. @c EINA_FALSE indicates
658 * This gets the current hidden state for the overlay.
660 * @see elm_map_overlay_hide_set()
664 EAPI Eina_Bool elm_map_overlay_hide_get(const Elm_Map_Overlay *overlay);
667 * Set the minimum zoom from where the overlay is displayed.
669 * @param overlay The overlay to be set the minimum zoom.
670 * @param zoom The minimum zoom.
672 * The overlay only will be displayed when the map is displayed at @p zoom
675 * @see elm_map_overlay_displayed_zoom_min_get()
679 EAPI void elm_map_overlay_displayed_zoom_min_set(Elm_Map_Overlay *overlay, int zoom);
682 * Get the minimum zoom from where the overlay is displayed.
684 * @param overlay The overlay to return the minimum zoom.
685 * @return zoom The minimum zoom.
687 * @see elm_map_overlay_displayed_zoom_min_set()
691 EAPI int elm_map_overlay_displayed_zoom_min_get(const Elm_Map_Overlay *overlay);
694 * Pause or unpause the overlay.
696 * @param overlay The overlay to be paused.
697 * @param paused Use @c EINA_TRUE to pause the @p overlay or @c EINA_FALSE
700 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
703 * The default is off.
705 * This will stop moving the overlay coordinates instantly.
706 * even if map being scrolled or zoomed.
708 * @see elm_map_overlay_paused_get()
712 EAPI void elm_map_overlay_paused_set(Elm_Map_Overlay *overlay, Eina_Bool paused);
715 * Get a value whether the overlay is paused or not.
717 * @param overlay The overlay to return paused state.
718 * @return @c EINA_TRUE means overlay is paused. @c EINA_FALSE indicates
721 * This gets the current paused state for the overlay.
723 * @see elm_map_overlay_paused_set()
727 EAPI Eina_Bool elm_map_overlay_paused_get(const Elm_Map_Overlay *overlay);
730 * Set the content object of the overlay.
732 * @param overlay The overlay to be set the content.
733 * @param obj The evas object will be used to display the overlay.
735 * Only default and class type overlay support this function.
737 * The content should be resized or set size hints before set to the overlay.
738 * <b> Do not modify this object</b> (move, show, hide, del, etc.),
740 * You can only resize this.
742 * This content is what will be inside the overlay that will be displayed.
743 * If a content is set, icon and default style layout are no more used before
744 * the content is deleted.
746 * If @p obj is @c NULL, content inside the overlay is deleted.
748 * @see elm_map_overlay_content_get()
752 EAPI void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj);
755 * Get the content object.
757 * @param overlay The overlay to return the content.
758 * @return Return the evas object if it exists, else @c NULL.
760 * Only default and class type overlay support this function.
762 * Returned content is what being inside the overlay that being displayed.
764 * <b> Do not modify this object</b> (move, show, hide, del, etc.).
765 * You can only resize this.
767 * The content can be set by elm_map_overlay_content_set().
769 * @see elm_map_overlay_content_set()
773 EAPI const Evas_Object * elm_map_overlay_content_get(const Elm_Map_Overlay *overlay);
776 * Set a icon of the overlay.
778 * @param overlay The overlay to be set the icon.
779 * @param icon The icon will be used to display the overlay.
781 * Only default and class type overlay support this function.
783 * <b> Do not modify this object</b> (move, show, hide, resize, del, etc.),
786 * If icon is set, default style layout will not be used.
788 * If @p icon is @c NULL, icon inside the overlay will be deleted.
790 * @see elm_map_overlay_icon_get()
794 EAPI void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon);
797 * Get the icon object.
799 * @param overlay The overlay to return the icon.
800 * @return Return the icon object if it exists, else @c NULL.
802 * Only default and class type overlay support this function.
804 * Returned icon is what being inside the overlay that being displayed.
806 * <b> Do not modify this icon </b> (move, show, hide, resize, del, etc.).
808 * The icon can be set by elm_map_overlay_icon_set().
810 * @see elm_map_overlay_icon_set()
814 EAPI const Evas_Object * elm_map_overlay_icon_get(const Elm_Map_Overlay *overlay);
817 * Set the geographic coordinates of the overlay.
819 * @param overlay The overlay to be set geographic coordinates.
820 * @param lon Longitude to be set.
821 * @param lat Latitude to be set.
823 * Only default and bubble type overlay support this function.
825 * This sets the center coordinates of the overlay. It can be
826 * get by elm_map_overlay_region_get().
828 * @see elm_map_overlay_region_get()
832 EAPI void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat);
835 * Get the geographic coordinates of the overlay.
837 * @param overlay The overlay to return geographic coordinates.
838 * @param lon Pointer to store longitude.
839 * @param lat Pointer to store latitude.
841 * Only default and bubble type overlay support this function.
843 * This returns the center coordinates of the overlay. It can be
844 * set by elm_map_overlay_region_set().
846 * @see elm_map_overlay_region_set()
850 EAPI void elm_map_overlay_region_get(const Elm_Map_Overlay *overlay, double *lon, double *lat);
854 * Set the object color of the overlay.
856 * @param overlay The overlay to be set color.
857 * @param r Red channel value, from 0 to 255.
858 * @param g Green channel value, from 0 to 255.
859 * @param b Blue channel value, from 0 to 255.
860 * @param a Alpha channel value, from 0 to 255.
862 * It uses an additive color model, so each color channel represents
863 * how much of each primary colors must to be used. 0 represents
864 * absence of this color, so if all of the three are set to 0,
865 * the color will be black.
867 * These component values should be integers in the range 0 to 255,
868 * (single 8-bit byte).
870 * This sets the color used for the overlay. By default, it is set to
871 * solid red (r = 255, g = 0, b = 0, a = 255).
873 * For alpha channel, 0 represents completely transparent, and 255, opaque.
875 * @see elm_map_overlay_color_get()
879 EAPI void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a);
882 * Get the object color of the overlay.
884 * @param overlay The overlay to return color.
885 * @param r Pointer to store the red channel value.
886 * @param g Pointer to store the green channel value.
887 * @param b Pointer to store the blue channel value.
888 * @param a Pointer to store the alpha channel value.
890 * @see elm_map_overlay_color_set()
894 EAPI void elm_map_overlay_color_get(const Elm_Map_Overlay *overlay, int *r, int *g, int *b, int *a);
897 * Show the given overlay at the center of the map, immediately.
899 * @param overlay The overlay to be center at.
901 * This causes map to @b redraw its viewport's contents to the
902 * region containing the given @p overlay's coordinates, that will be
903 * moved to the center of the map.
905 * @see elm_map_overlays_show() if more than one overlay need to be displayed.
909 EAPI void elm_map_overlay_show(Elm_Map_Overlay *overlay);
912 * Move and zoom the map to display a list of overlays.
914 * @param overlays A list of #Elm_Map_Overlay handles.
916 * The map will be centered on the center point of the overlays in the list.
917 * Then the map will be zoomed in order to fit the overlays using the maximum
918 * zoom which allows display of all the overlays.
920 * @warning All the overlays should belong to the same map object.
922 * @see elm_map_overlay_show() to show a single overlay.
926 EAPI void elm_map_overlays_show(Eina_List *overlays);
929 * Set the get callback function of the overlay.
931 * @param overlay The overlay to own the get callback function.
932 * @param get_cb The callback function.
933 * @param data The user callback data.
935 * You can delete this callback function by setting @c NULL.
939 EAPI void elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Get_Cb get_cb, void *data);
943 * Add a new class overlay to the map object.
944 * This overlay has a class type.
946 * @param obj The map object to add a new overlay.
947 * @return The created overlay or @c NULL upon failure.
949 * This overlay is not shown before overlay members are appended.
950 * if overlay members in the same class are close, group overlays
951 * are created. If they are far away, group overlays are hidden.
952 * When group overlays are shown, they have default style layouts at first.
954 * You can changed the state (hidden, paused, etc.) or set the content
955 * or icon of the group overlays.
956 * Also these changes have a influence on the overlays in the same class
957 * even if each overlay is alone and is not grouped.
959 * @see elm_map_overlay_del()
960 * @see elm_map_overlay_add()
961 * @see elm_map_overlay_bubble_add()
965 EAPI Elm_Map_Overlay * elm_map_overlay_class_add(Evas_Object *obj);
968 * Add a new overlay member to the class overlay.
970 * @param clas The class overlay to add a new overlay.
971 * @param overlay The overlay to be added to the class overlay.
973 * @see elm_map_overlay_class_remove()
977 EAPI void elm_map_overlay_class_append(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
980 * Remove a overlay from the class.
982 * @param clas The class overlay to delete the overlay.
983 * @param overlay The overlay to be deleted from the class overlay.
985 * @see elm_map_overlay_class_append()
989 EAPI void elm_map_overlay_class_remove(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
992 * Set the maximum zoom from where the overlay members in the class can be
995 * @param clas The overlay class has overlay members.
996 * @param zoom The maximum zoom.
998 * Overlay members in the class only will be grouped when the map
999 * is displayed at less than @p zoom.
1001 * @see elm_map_overlay_class_zoom_max_get()
1005 EAPI void elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *clas, int zoom);
1008 * Get the zoom from where the overlay members in the class are no more grouped.
1010 * @param clas The overlay class has overlay members.
1012 * @return The maximum zoom.
1014 * @see elm_map_overlay_class_zoom_max_set()
1018 EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas);
1021 * Add a new bubble overlay to the map object.
1022 * This overlay has a bubble type.
1024 * @param obj The map object to add a new overlay.
1025 * @return The created overlay or @c NULL upon failure.
1027 * A bubble will not be displayed before geographic coordinates are set or
1028 * any other overlays are followed.
1030 * This overlay has a bubble style layout and icon or content can not
1033 * Overlay created with this method can be deleted with elm_map_overlay_del().
1035 * @see elm_map_overlay_del()
1036 * @see elm_map_overlay_add()
1037 * @see elm_map_overlay_class_add()
1038 * @see elm_map_overlay_region_set()
1039 * @see elm_map_overlay_bubble_follow()
1043 EAPI Elm_Map_Overlay * elm_map_overlay_bubble_add(Evas_Object *obj);
1046 * Follow a other overlay.
1048 * @param bubble The bubble overlay to follow a parent overlay.
1049 * @param parent The parent overlay to be followed by the bubble overlay.
1051 * Bubble overlay will follow the parent overlay's movement (hide, show, move).
1053 * @see elm_map_overlay_bubble_add()
1057 EAPI void elm_map_overlay_bubble_follow(Elm_Map_Overlay *bubble, Elm_Map_Overlay *parent);
1060 * Add a content object to the bubble overlay.
1062 * @param bubble The bubble overlay to add a content.
1063 * @param content The content to be added to the bubble overlay.
1065 * Added contents will be displayed inside the bubble overlay.
1067 * @see elm_map_overlay_bubble_content_clear()
1071 EAPI void elm_map_overlay_bubble_content_append(Elm_Map_Overlay *bubble, Evas_Object *content);
1074 * Clear all contents inside the bubble overlay.
1076 * @param bubble The bubble overlay to clear the contents.
1078 * This will delete all contents inside the bubble overlay.
1080 * @see elm_map_overlay_bubble_content_append()
1085 EAPI void elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble);
1088 * Add a new route overlay to the map object.
1089 * This overlay has a route type.
1091 * @param obj The map object to add a new overlay.
1092 * @param route The route object to make a overlay.
1093 * @return The created overlay or @c NULL upon failure.
1095 * This overlay has a route style layout and icon or content can not
1098 * The color scheme can be changed by elm_map_overlay_content_set().
1100 * Overlay created with this method can be deleted with elm_map_overlay_del().
1102 * @see elm_map_overlay_del()
1103 * @see elm_map_overlay_class_add()
1104 * @see elm_map_overlay_content_set()
1105 * @see elm_map_overlay_content_get()
1109 EAPI Elm_Map_Overlay * elm_map_overlay_route_add(Evas_Object *obj, const Elm_Map_Route *route);
1112 * Get the information of tile load status.
1114 * @param obj The map object.
1115 * @param try_num Pointer to store number of tiles download requested.
1116 * @param finish_num Pointer to store number of tiles successfully downloaded.
1118 * This gets the current tile loaded status for the map object.
1122 EAPI void elm_map_tile_load_status_get(const Evas_Object *obj, int *try_num, int *finish_num);
1125 * Get the names of available sources for a specific type.
1127 * @param obj The map object.
1128 * @param type source type.
1129 * @return The char pointer array of source names.
1131 * It will provide a list with all available sources.
1132 * Current source can be set by elm_map_source_set(), or get with
1133 * elm_map_source_get().
1135 * At least available sources of tile type:
1141 * At least available sources of route type:
1144 * At least available sources of name type:
1147 * @see elm_map_source_set()
1148 * @see elm_map_source_get()
1152 EAPI const char **elm_map_sources_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1155 * Set the current source of the map for a specific type.
1157 * @param obj The map object.
1158 * @param type source type.
1159 * @param source_name The source to be used.
1161 * Map widget retrieves tile images that composes the map from a web service.
1162 * This web service can be set with this method
1163 * for ELM_MAP_SOURCE_TYPE_TILE type.
1164 * A different service can return a different maps with different
1165 * information and it can use different zoom values.
1167 * Map widget provides route data based on a external web service.
1168 * This web service can be set with this method
1169 * for ELM_MAP_SOURCE_TYPE_ROUTE type.
1171 * Map widget also provide geoname data based on a external web service.
1172 * This web service can be set with this method
1173 * for ELM_MAP_SOURCE_TYPE_NAME type.
1175 * The @p source_name need to match one of the names provided by
1176 * elm_map_sources_get().
1178 * The current source can be get using elm_map_source_get().
1180 * @see elm_map_sources_get()
1181 * @see elm_map_source_get()
1185 EAPI void elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const char *source_name);
1188 * Get the name of currently used source for a specific type.
1190 * @param obj The map object.
1191 * @param type source type.
1192 * @return Returns the name of the source in use.
1194 * @see elm_map_sources_get()
1195 * @see elm_map_source_set()
1199 EAPI const char *elm_map_source_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1202 * Add a new route to the map object.
1204 * @param obj The map object.
1205 * @param type The type of transport to be considered when tracing a route.
1206 * @param method The routing method, what should be prioritized.
1207 * @param flon The start longitude.
1208 * @param flat The start latitude.
1209 * @param tlon The destination longitude.
1210 * @param tlat The destination latitude.
1212 * @return The created route or @c NULL upon failure.
1214 * A route will be traced by point on coordinates (@p flat, @p flon)
1215 * to point on coordinates (@p tlat, @p tlon), using the route service
1216 * set with elm_map_source_set().
1218 * It will take @p type on consideration to define the route,
1219 * depending if the user will be walking or driving, the route may vary.
1220 * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or
1221 * #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
1223 * Another parameter is what the route should prioritize, the minor distance
1224 * or the less time to be spend on the route. So @p method should be one
1225 * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
1227 * Routes created with this method can be deleted with
1228 * elm_map_route_remove(),
1229 * and distance can be get with elm_map_route_distance_get().
1231 * @see elm_map_route_remove()
1232 * @see elm_map_route_distance_get()
1233 * @see elm_map_source_set()
1237 EAPI Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data);
1240 * Remove a route from the map.
1242 * @param route The route to remove.
1244 * @see elm_map_route_add()
1248 EAPI void elm_map_route_del(Elm_Map_Route *route);
1251 * Get the route distance in kilometers.
1253 * @param route The route object.
1254 * @return The distance of route (unit : km).
1258 EAPI double elm_map_route_distance_get(const Elm_Map_Route *route);
1261 * Get the information of route nodes.
1263 * @param route The route object.
1264 * @return Returns a string with the nodes of route.
1268 EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route);
1271 * Get the information of route waypoint.
1273 * @param route the route object.
1274 * @return Returns a string with information about waypoint of route.
1278 EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route);
1281 * Request a address or geographic coordinates(longitude, latitude)
1282 * from a given address or geographic coordinate(longitude, latitude).
1284 * @param obj The map object.
1285 * @param address The address.
1286 * @param lon The longitude.
1287 * @param lat The latitude.
1288 * @param name_cb The callback function.
1289 * @param data The user callback data.
1290 * @return name A #Elm_Map_Name handle for this coordinate.
1292 * If you want to get address from geographic coordinates, set input @p address
1293 * as NULL and set @p lon, @p lat as you want to convert.
1294 * If address is set except NULL, @p lon and @p lat are checked.
1296 * To get the string for this address, elm_map_name_address_get()
1297 * should be used after callback or "name,loaded" signal is called.
1299 * To get the longitude and latitude, elm_map_name_region_get()
1304 EAPI Elm_Map_Name *elm_map_name_add(const Evas_Object *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
1307 * Get the address of the name.
1309 * @param name The name handle.
1310 * @return Returns the address string of @p name.
1312 * This gets the coordinates of the @p name, created with one of the
1313 * conversion functions.
1315 * @see elm_map_name_add()
1319 EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name);
1322 * Get the current coordinates of the name.
1324 * @param name The name handle.
1325 * @param lat Pointer to store the latitude.
1326 * @param lon Pointer to store The longitude.
1328 * This gets the coordinates of the @p name, created with one of the
1329 * conversion functions.
1331 * @see elm_map_name_add()
1335 EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat);
1338 * Remove a name from the map.
1340 * @param name The name to remove.
1342 * Basically the struct handled by @p name will be freed, so conversions
1343 * between address and coordinates will be lost.
1345 * @see elm_map_name_add()
1349 EAPI void elm_map_name_del(Elm_Map_Name *name);
1352 * Add a track on the map
1354 * @param obj The map object.
1355 * @param emap The emap route object.
1356 * @return The route object. This is an elm object of type Route.
1358 * @see elm_route_add() for details.
1362 EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, void *emap);
1365 * Remove a track from the map
1367 * @param obj The map object.
1368 * @param route The track to remove.
1372 EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route);