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_GROUP,
169 ELM_MAP_OVERLAY_TYPE_BUBBLE,
170 ELM_MAP_OVERLAY_TYPE_ROUTE,
171 ELM_MAP_OVERLAY_TYPE_LINE,
172 ELM_MAP_OVERLAY_TYPE_POLYGON,
173 ELM_MAP_OVERLAY_TYPE_CIRCLE,
174 ELM_MAP_OVERLAY_TYPE_SCALE
176 } Elm_Map_Overlay_Type;
178 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(). */
179 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(). */
180 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(). */
181 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(). */
182 typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */
183 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(). */
185 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. */
186 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. */
187 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. */
188 typedef Evas_Object *(*Elm_Map_Group_Icon_Get_Func)(Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */
190 typedef void (*Elm_Map_Overlay_Get_Cb)(void *data, Evas_Object *map, Elm_Map_Overlay *overlay); /**< Get callback function for the overlay. */
191 typedef void (*Elm_Map_Name_Cb)(void *data, Evas_Object *map, Elm_Map_Name *name); /**< Async-callback function for the name request. */
192 typedef void (*Elm_Map_Route_Cb)(void *data, Evas_Object *map, Elm_Map_Route *route); /**< Async-callback function for the route request. */
195 * Add a new map widget to the given parent Elementary (container) object.
197 * @param parent The parent object.
198 * @return a new map widget handle or @c NULL, on errors.
200 * This function inserts a new map widget on the canvas.
204 EAPI Evas_Object *elm_map_add(Evas_Object *parent);
207 * Set the zoom level of the map.
209 * @param obj The map object.
210 * @param zoom The zoom level to set.
212 * This sets the zoom level.
214 * It will respect limits defined by elm_map_zoom_min_set() and
215 * elm_map_zoom_max_set().
217 * By default these values are 0 (world map) and 18 (maximum zoom).
219 * This function should be used when zoom mode is set to
220 * #ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set
221 * with elm_map_zoom_mode_set().
223 * @see elm_map_zoom_mode_set()
224 * @see elm_map_zoom_get()
228 EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom);
231 * Get the zoom level of the map.
233 * @param obj The map object.
234 * @return The current zoom level.
236 * This returns the current zoom level of the map object.
238 * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL
239 * (which is the default), the zoom level may be changed at any time by the
240 * map object itself to account for map size and map viewport size.
242 * @see elm_map_zoom_set() for details.
246 EAPI int elm_map_zoom_get(const Evas_Object *obj);
249 * Set the zoom mode used by the map object.
251 * @param obj The map object.
252 * @param mode The zoom mode of the map, being it one of
253 * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT,
254 * or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
256 * This sets the zoom mode to manual or one of the automatic levels.
257 * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by
258 * elm_map_zoom_set() and will stay at that level until changed by code
259 * or until zoom mode is changed. This is the default mode.
261 * The Automatic modes will allow the map object to automatically
262 * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will
263 * adjust zoom so the map fits inside the scroll frame with no pixels
264 * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but
265 * ensure no pixels within the frame are left unfilled. Do not forget that
266 * the valid sizes are 2^zoom, consequently the map may be smaller than
269 * @see elm_map_zoom_set()
273 EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode);
276 * Get the zoom mode used by the map object.
278 * @param obj The map object.
279 * @return The zoom mode of the map, being it one of
280 * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT,
281 * or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
283 * This function returns the current zoom mode used by the map object.
285 * @see elm_map_zoom_mode_set() for more details.
289 EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj);
292 * Set the minimum zoom of the source.
294 * @param obj The map object.
295 * @param zoom New minimum zoom value to be used.
297 * @see elm_map_zoom_min_get() for details.
301 EAPI void elm_map_zoom_min_set(Evas_Object *obj, int zoom);
304 * Get the minimum zoom of the source.
306 * @param obj The map object.
307 * @return Returns the minimum zoom of the source.
309 * @see elm_map_zoom_min_set() for details.
313 EAPI int elm_map_zoom_min_get(const Evas_Object *obj);
316 * Set the maximum zoom of the source.
318 * @param obj The map object.
319 * @param zoom New maximum zoom value to be used.
321 * @see elm_map_zoom_max_get() for details.
325 EAPI void elm_map_zoom_max_set(Evas_Object *obj, int zoom);
328 * Get the maximum zoom of the source.
330 * @param obj The map object.
331 * @return Returns the maximum zoom of the source.
333 * @see elm_map_zoom_max_set() for details.
337 EAPI int elm_map_zoom_max_get(const Evas_Object *obj);
340 * Get the current geographic coordinates of the map.
342 * @param obj The map object.
343 * @param lon Pointer to store longitude.
344 * @param lat Pointer to store latitude.
346 * This gets the current center coordinates of the map object. It can be
347 * set by elm_map_region_bring_in() and elm_map_region_show().
349 * @see elm_map_region_bring_in()
350 * @see elm_map_region_show()
354 EAPI void elm_map_region_get(const Evas_Object *obj, double *lon, double *lat);
357 * Animatedly bring in given coordinates to the center of the map.
359 * @param obj The map object.
360 * @param lon Longitude to center at.
361 * @param lat Latitude to center at.
363 * This causes map to jump to the given @p lat and @p lon coordinates
364 * and show it (by scrolling) in the center of the viewport, if it is not
365 * already centered. This will use animation to do so and take a period
366 * of time to complete.
368 * @see elm_map_region_show() for a function to avoid animation.
369 * @see elm_map_region_get()
373 EAPI void elm_map_region_bring_in(Evas_Object *obj, double lon, double lat);
376 * Show the given coordinates at the center of the map, @b immediately.
378 * @param obj The map object.
379 * @param lon Longitude to center at.
380 * @param lat Latitude to center at.
382 * This causes map to @b redraw its viewport's contents to the
383 * region containing the given @p lat and @p lon, that will be moved to the
386 * @see elm_map_region_bring_in() for a function to move with animation.
387 * @see elm_map_region_get()
391 EAPI void elm_map_region_show(Evas_Object *obj, double lon, double lat);
394 * Convert canvas coordinates into geographic coordinates
395 * (longitude, latitude).
397 * @param obj The map object.
398 * @param x horizontal coordinate of the point to convert.
399 * @param y vertical coordinate of the point to convert.
400 * @param lon A pointer to the longitude.
401 * @param lat A pointer to the latitude.
403 * This gets longitude and latitude from canvas x, y coordinates. The canvas
404 * coordinates mean x, y coordinate from current viewport.
406 * see elm_map_region_to_canvas_convert()
410 EAPI void elm_map_canvas_to_region_convert(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, double *lon, double *lat);
413 * Convert geographic coordinates (longitude, latitude)
414 * into canvas coordinates.
416 * @param obj The map object.
417 * @param lon The longitude to convert.
418 * @param lat The latitude to convert.
419 * @param x A pointer to horizontal coordinate.
420 * @param y A pointer to vertical coordinate.
422 * This gets canvas x, y coordinates from longitude and latitude. The canvas
423 * coordinates mean x, y coordinate from current viewport.
425 * see elm_map_canvas_to_region_convert()
429 EAPI void elm_map_region_to_canvas_convert(const Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y);
432 * Pause or unpause the map.
434 * @param obj The map object.
435 * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE
438 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
441 * The default is off.
443 * This will stop zooming using animation, changing zoom levels will
444 * change instantly. This will stop any existing animations that are running.
446 * @see elm_map_paused_get()
450 EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused);
453 * Get a value whether map is paused or not.
455 * @param obj The map object.
456 * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates
459 * This gets the current paused state for the map object.
461 * @see elm_map_paused_set() for details.
465 EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj);
470 * @param obj The map object.
471 * @param degree Angle from 0.0 to 360.0 to rotate around Z axis.
472 * @param cx Rotation's center horizontal position.
473 * @param cy Rotation's center vertical position.
475 * @see elm_map_rotate_get()
479 EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy);
482 * Get the rotate degree of the map
484 * @param obj The map object
485 * @param degree Pointer to store degrees from 0.0 to 360.0
486 * to rotate around Z axis.
487 * @param cx Pointer to store rotation's center horizontal position.
488 * @param cy Pointer to store rotation's center vertical position.
490 * @see elm_map_rotate_set() to set map rotation.
494 EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy);
497 * Enable or disable mouse wheel to be used to zoom in / out the map.
499 * @param obj The map object.
500 * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE
503 * Mouse wheel can be used for the user to zoom in or zoom out the map.
505 * It's disabled by default.
507 * @see elm_map_wheel_disabled_get()
511 EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
514 * Get a value whether mouse wheel is enabled or not.
516 * @param obj The map object.
517 * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates
520 * Mouse wheel can be used for the user to zoom in or zoom out the map.
522 * @see elm_map_wheel_disabled_set() for details.
526 EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj);
529 * Set the user agent used by the map object to access routing services.
531 * @param obj The map object.
532 * @param user_agent The user agent to be used by the map.
534 * User agent is a client application implementing a network protocol used
535 * in communications within a client–server distributed computing system
537 * The @p user_agent identification string will transmitted in a header
538 * field @c User-Agent.
540 * @see elm_map_user_agent_get()
544 EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent);
547 * Get the user agent used by the map object.
549 * @param obj The map object.
550 * @return The user agent identification string used by the map.
552 * @see elm_map_user_agent_set() for details.
556 EAPI const char *elm_map_user_agent_get(const Evas_Object *obj);
560 * Add a new overlay to the map object. This overlay has a default type.
562 * @param obj The map object to add a new overlay.
563 * @param lon The longitude of the overlay.
564 * @param lat The latitude of the overlay.
565 * @return The created overlay or @c NULL upon failure.
567 * A overlay will be created and shown in a specific point of the map, defined
568 * by @p lon and @p lat.
570 * The created overlay has a default style layout before content or
572 * If content or icon is set, those are displayed instead of default style
574 * You can set by using elm_map_overlay_content_set() or
575 * elm_map_overlay_icon_set(). If NULL is set, default style
578 * Overlay created with this method can be deleted by elm_map_overlay_del().
580 * @see elm_map_overlay_del()
581 * @see elm_map_overlay_class_add()
582 * @see elm_map_overlay_bubble_add()
583 * @see elm_map_overlay_content_set()
584 * @see elm_map_overlay_icon_set()
588 EAPI Elm_Map_Overlay * elm_map_overlay_add(Evas_Object *obj, double lon, double lat);
591 * Return all overlays in the map object.
593 * @param obj The map object to return overlays.
594 * @return The list of all overlays or @c NULL upon failure.
596 * This list includes group overlays also.
597 * So this can be changed dynamically while zooming and panning.
601 EAPI EAPI Eina_List * elm_map_overlays_get(Evas_Object *obj);
604 * Delete a overlay from the map. This function can delete all types
607 * @param overlay The overlay to be deleted.
609 * @see elm_map_overlay_add()
610 * @see elm_map_overlay_class_add()
611 * @see elm_map_overlay_bubble_add()
615 EAPI void elm_map_overlay_del(Elm_Map_Overlay *overlay);
618 * Get the overlay type.
620 * @param overlay The overlay to return type.
621 * @return Return the overlay type.
623 * This type is resolved when the overlay is created.
625 * @see elm_map_overlay_add()
626 * @see elm_map_overlay_class_add()
627 * @see elm_map_overlay_bubble_add()
631 EAPI Elm_Map_Overlay_Type elm_map_overlay_type_get(const Elm_Map_Overlay *overlay);
634 * Set a pointer of user data for a overlay.
636 * @param overlay The overlay to own the user data.
637 * @param data A pointer of user data
639 * @see elm_map_overlay_data_get()
643 EAPI void elm_map_overlay_data_set(Elm_Map_Overlay *overlay, void *data);
646 * Get the user data stored on a overlay.
648 * @param overlay The overlay to return the user data.
649 * @return A pointer to data stored using elm_map_overlay_data_set(),
650 * or @c NULL, if none has been set.
652 * @see elm_map_overlay_data_set()
656 EAPI void * elm_map_overlay_data_get(const Elm_Map_Overlay *overlay);
659 * Set if the overlay is hidden or not.
661 * @param overlay The overlay to be hidden.
662 * @param hide Use @c EINA_TRUE to hide the overlay or @c EINA_FALSE to show.
664 * @see elm_map_overlay_hide_get()
668 EAPI void elm_map_overlay_hide_set(Elm_Map_Overlay *overlay, Eina_Bool hide);
671 * Get a value whether the overlay is hidden or not.
673 * @param overlay The overlay to return the hidden state.
674 * @return @c EINA_TRUE means the overlay is hidden. @c EINA_FALSE indicates
677 * This gets the current hidden state for the overlay.
679 * @see elm_map_overlay_hide_set()
683 EAPI Eina_Bool elm_map_overlay_hide_get(const Elm_Map_Overlay *overlay);
686 * Set the minimum zoom from where the overlay is displayed.
688 * @param overlay The overlay to be set the minimum zoom.
689 * @param zoom The minimum zoom.
691 * The overlay only will be displayed when the map is displayed at @p zoom
694 * @see elm_map_overlay_displayed_zoom_min_get()
698 EAPI void elm_map_overlay_displayed_zoom_min_set(Elm_Map_Overlay *overlay, int zoom);
701 * Get the minimum zoom from where the overlay is displayed.
703 * @param overlay The overlay to return the minimum zoom.
704 * @return zoom The minimum zoom.
706 * @see elm_map_overlay_displayed_zoom_min_set()
710 EAPI int elm_map_overlay_displayed_zoom_min_get(const Elm_Map_Overlay *overlay);
713 * Pause or unpause the overlay.
715 * @param overlay The overlay to be paused.
716 * @param paused Use @c EINA_TRUE to pause the @p overlay or @c EINA_FALSE
719 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
722 * The default is off.
724 * This will stop moving the overlay coordinates instantly.
725 * even if map being scrolled or zoomed.
727 * @see elm_map_overlay_paused_get()
731 EAPI void elm_map_overlay_paused_set(Elm_Map_Overlay *overlay, Eina_Bool paused);
734 * Get a value whether the overlay is paused or not.
736 * @param overlay The overlay to return paused state.
737 * @return @c EINA_TRUE means overlay is paused. @c EINA_FALSE indicates
740 * This gets the current paused state for the overlay.
742 * @see elm_map_overlay_paused_set()
746 EAPI Eina_Bool elm_map_overlay_paused_get(const Elm_Map_Overlay *overlay);
749 * Get a value whether the overlay is visible or not.
751 * @param overlay The overlay to return visible state.
752 * @return @c EINA_TRUE means overlay is visible. @c EINA_FALSE indicates
755 * The visible of the overlay can not be set.
756 * This value can be changed dynamically while zooming and panning
760 EAPI Eina_Bool elm_map_overlay_visible_get(const Elm_Map_Overlay *overlay);
763 * Set the content object of the overlay.
765 * @param overlay The overlay to be set the content.
766 * @param obj The evas object will be used to display the overlay.
768 * Only default and class type overlay support this function.
770 * The content should be resized or set size hints before set to the overlay.
771 * <b> Do not modify this object</b> (move, show, hide, del, etc.),
773 * You can only resize this.
775 * This content is what will be inside the overlay that will be displayed.
776 * If a content is set, icon and default style layout are no more used before
777 * the content is deleted.
779 * If @p obj is @c NULL, content inside the overlay is deleted.
781 * @see elm_map_overlay_content_get()
785 EAPI void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj);
788 * Get the content object.
790 * @param overlay The overlay to return the content.
791 * @return Return the evas object if it exists, else @c NULL.
793 * Only default and class type overlay support this function.
795 * Returned content is what being inside the overlay that being displayed.
797 * <b> Do not modify this object</b> (move, show, hide, del, etc.).
798 * You can only resize this.
800 * The content can be set by elm_map_overlay_content_set().
802 * @see elm_map_overlay_content_set()
806 EAPI const Evas_Object * elm_map_overlay_content_get(const Elm_Map_Overlay *overlay);
809 * Set a icon of the overlay.
811 * @param overlay The overlay to be set the icon.
812 * @param icon The icon will be used to display the overlay.
814 * Only default and class type overlay support this function.
816 * <b> Do not modify this object</b> (move, show, hide, resize, del, etc.),
819 * If icon is set, default style layout will not be used.
821 * If @p icon is @c NULL, icon inside the overlay will be deleted.
823 * @see elm_map_overlay_icon_get()
827 EAPI void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon);
830 * Get the icon object.
832 * @param overlay The overlay to return the icon.
833 * @return Return the icon object if it exists, else @c NULL.
835 * Only default and class type overlay support this function.
837 * Returned icon is what being inside the overlay that being displayed.
839 * <b> Do not modify this icon </b> (move, show, hide, resize, del, etc.).
841 * The icon can be set by elm_map_overlay_icon_set().
843 * @see elm_map_overlay_icon_set()
847 EAPI const Evas_Object * elm_map_overlay_icon_get(const Elm_Map_Overlay *overlay);
850 * Set the geographic coordinates of the overlay.
852 * @param overlay The overlay to be set geographic coordinates.
853 * @param lon Longitude to be set.
854 * @param lat Latitude to be set.
856 * Only default and bubble type overlay support this function.
858 * This sets the center coordinates of the overlay. It can be
859 * get by elm_map_overlay_region_get().
861 * @see elm_map_overlay_region_get()
865 EAPI void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat);
868 * Get the geographic coordinates of the overlay.
870 * @param overlay The overlay to return geographic coordinates.
871 * @param lon Pointer to store longitude.
872 * @param lat Pointer to store latitude.
874 * Only default and bubble type overlay support this function.
876 * This returns the center coordinates of the overlay. It can be
877 * set by elm_map_overlay_region_set().
879 * @see elm_map_overlay_region_set()
883 EAPI void elm_map_overlay_region_get(const Elm_Map_Overlay *overlay, double *lon, double *lat);
887 * Set the object color of the overlay.
889 * @param overlay The overlay to be set color.
890 * @param r Red channel value, from 0 to 255.
891 * @param g Green channel value, from 0 to 255.
892 * @param b Blue channel value, from 0 to 255.
893 * @param a Alpha channel value, from 0 to 255.
895 * It uses an additive color model, so each color channel represents
896 * how much of each primary colors must to be used. 0 represents
897 * absence of this color, so if all of the three are set to 0,
898 * the color will be black.
900 * These component values should be integers in the range 0 to 255,
901 * (single 8-bit byte).
903 * This sets the color used for the overlay. By default, it is set to
904 * solid red (r = 255, g = 0, b = 0, a = 255).
906 * For alpha channel, 0 represents completely transparent, and 255, opaque.
908 * @see elm_map_overlay_color_get()
912 EAPI void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a);
915 * Get the object color of the overlay.
917 * @param overlay The overlay to return color.
918 * @param r Pointer to store the red channel value.
919 * @param g Pointer to store the green channel value.
920 * @param b Pointer to store the blue channel value.
921 * @param a Pointer to store the alpha channel value.
923 * @see elm_map_overlay_color_set()
927 EAPI void elm_map_overlay_color_get(const Elm_Map_Overlay *overlay, int *r, int *g, int *b, int *a);
930 * Show the given overlay at the center of the map, immediately.
932 * @param overlay The overlay to be center at.
934 * This causes map to @b redraw its viewport's contents to the
935 * region containing the given @p overlay's coordinates, that will be
936 * moved to the center of the map.
938 * @see elm_map_overlays_show() if more than one overlay need to be displayed.
942 EAPI void elm_map_overlay_show(Elm_Map_Overlay *overlay);
945 * Move and zoom the map to display a list of overlays.
947 * @param overlays A list of #Elm_Map_Overlay handles.
949 * The map will be centered on the center point of the overlays in the list.
950 * Then the map will be zoomed in order to fit the overlays using the maximum
951 * zoom which allows display of all the overlays.
953 * @warning All the overlays should belong to the same map object.
955 * @see elm_map_overlay_show() to show a single overlay.
959 EAPI void elm_map_overlays_show(Eina_List *overlays);
962 * Set the get callback function of the overlay.
964 * @param overlay The overlay to own the get callback function.
965 * @param get_cb The callback function.
966 * @param data The user callback data.
968 * If the overlay is clicked, the callback wll be called.
969 * The clicked overlay is returned by callback.
971 * You can add callback to the class overlay. If one of the group overlays in this class
972 * is clicked, callback will be called and return a virtual group overlays.
974 * You can delete this callback function by setting @c NULL.
978 EAPI void elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Get_Cb get_cb, void *data);
982 * Add a new class overlay to the map object.
983 * This overlay has a class type.
985 * @param obj The map object to add a new overlay.
986 * @return The created overlay or @c NULL upon failure.
988 * This overlay is not shown before overlay members are appended.
989 * if overlay members in the same class are close, group overlays
990 * are created. If they are far away, group overlays are hidden.
991 * When group overlays are shown, they have default style layouts at first.
993 * You can change the state (hidden, paused, etc.) or set the content
994 * or icon of the group overlays by chaning the state of the class overlay.
995 * Do not modifty the group overlay itself.
997 * Also these changes have a influence on the overlays in the same class
998 * even if each overlay is alone and is not grouped.
1000 * @see elm_map_overlay_del()
1001 * @see elm_map_overlay_add()
1002 * @see elm_map_overlay_bubble_add()
1006 EAPI Elm_Map_Overlay * elm_map_overlay_class_add(Evas_Object *obj);
1009 * Add a new overlay member to the class overlay.
1011 * @param clas The class overlay to add a new overlay.
1012 * @param overlay The overlay to be added to the class overlay.
1014 * @see elm_map_overlay_class_remove()
1018 EAPI void elm_map_overlay_class_append(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
1021 * Remove a overlay from the class.
1023 * @param clas The class overlay to delete the overlay.
1024 * @param overlay The overlay to be deleted from the class overlay.
1026 * @see elm_map_overlay_class_append()
1030 EAPI void elm_map_overlay_class_remove(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
1033 * Set the maximum zoom from where the overlay members in the class can be
1036 * @param clas The overlay class has overlay members.
1037 * @param zoom The maximum zoom.
1039 * Overlay members in the class only will be grouped when the map
1040 * is displayed at less than @p zoom.
1042 * @see elm_map_overlay_class_zoom_max_get()
1046 EAPI void elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *clas, int zoom);
1049 * Get the maximum zoom from where the overlay members in the class can be
1052 * @param clas The overlay class has overlay members.
1054 * @return The maximum zoom.
1056 * @see elm_map_overlay_class_zoom_max_set()
1060 EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas);
1063 * Get the overlay members of the group overlay.
1065 * @param grp The group overlay has overlay members.
1067 * @return The list of group overlay members.
1069 * The group overlays are virtualy overlays. Those are shown and hidden dynamically.
1070 * You can add callback to the class overlay. If one of the group overlays in this class
1071 * is clicked, callback will be called and return a virtual group overlays.
1073 * You can change the state (hidden, paused, etc.) or set the content
1074 * or icon of the group overlays by chaning the state of the class overlay.
1075 * Do not modifty the group overlay itself.
1077 * @see elm_map_overlay_class_add()
1081 EAPI Eina_List * elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp);
1084 * Add a new bubble overlay to the map object.
1085 * This overlay has a bubble type.
1087 * @param obj The map object to add a new overlay.
1088 * @return The created overlay or @c NULL upon failure.
1090 * A bubble will not be displayed before geographic coordinates are set or
1091 * any other overlays are followed.
1093 * This overlay has a bubble style layout and icon or content can not
1096 * Overlay created with this method can be deleted with elm_map_overlay_del().
1098 * @see elm_map_overlay_del()
1099 * @see elm_map_overlay_add()
1100 * @see elm_map_overlay_class_add()
1101 * @see elm_map_overlay_region_set()
1102 * @see elm_map_overlay_bubble_follow()
1106 EAPI Elm_Map_Overlay * elm_map_overlay_bubble_add(Evas_Object *obj);
1109 * Follow a other overlay.
1111 * @param bubble The bubble overlay to follow a parent overlay.
1112 * @param parent The parent overlay to be followed by the bubble overlay.
1114 * Bubble overlay will follow the parent overlay's movement (hide, show, move).
1116 * @see elm_map_overlay_bubble_add()
1120 EAPI void elm_map_overlay_bubble_follow(Elm_Map_Overlay *bubble, const Elm_Map_Overlay *parent);
1123 * Add a content object to the bubble overlay.
1125 * @param bubble The bubble overlay to add a content.
1126 * @param content The content to be added to the bubble overlay.
1128 * Added contents will be displayed inside the bubble overlay.
1130 * @see elm_map_overlay_bubble_content_clear()
1134 EAPI void elm_map_overlay_bubble_content_append(Elm_Map_Overlay *bubble, Evas_Object *content);
1137 * Clear all contents inside the bubble overlay.
1139 * @param bubble The bubble overlay to clear the contents.
1141 * This will delete all contents inside the bubble overlay.
1143 * @see elm_map_overlay_bubble_content_append()
1147 EAPI void elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble);
1150 * Add a new route overlay to the map object.
1151 * This overlay has a route type.
1153 * @param obj The map object to add a new overlay.
1154 * @param route The route object to make a overlay.
1155 * @return The created overlay or @c NULL upon failure.
1157 * This overlay has a route style layout and icon or content can not
1160 * The color scheme can be changed by elm_map_overlay_content_set().
1162 * Overlay created with this method can be deleted with elm_map_overlay_del().
1164 * @see elm_map_overlay_del()
1165 * @see elm_map_overlay_class_add()
1166 * @see elm_map_overlay_content_set()
1167 * @see elm_map_overlay_content_get()
1171 EAPI Elm_Map_Overlay * elm_map_overlay_route_add(Evas_Object *obj, const Elm_Map_Route *route);
1174 * Add a new line overlay to the map object.
1175 * This overlay has a line type.
1177 * @param obj The map object to add a new overlay.
1178 * @param flon The start longitude.
1179 * @param flat The start latitude.
1180 * @param tlon The destination longitude.
1181 * @param tlat The destination latitude.
1182 * @return The created overlay or @c NULL upon failure.
1184 * Overlay created with this method can be deleted with elm_map_overlay_del().
1186 * @see elm_map_overlay_del()
1190 EAPI Elm_Map_Overlay * elm_map_overlay_line_add(Evas_Object *obj, double flon, double flat, double tlon, double tlat);
1193 * Add a new polygon overlay to the map object.
1194 * This overlay has a polygon type.
1196 * @param obj The map object to add a new overlay.
1197 * @return The created overlay or @c NULL upon failure.
1199 * At least 3 regions should be added to show the polygon overlay.
1201 * Overlay created with this method can be deleted with elm_map_overlay_del().
1203 * @see elm_map_overlay_polygon_region_add()
1204 * @see elm_map_overlay_del()
1208 EAPI Elm_Map_Overlay * elm_map_overlay_polygon_add(Evas_Object *obj);
1211 * Add a geographic coordinates to the polygon overlay.
1213 * @param overlay The polygon overlay to get a region.
1214 * @param lon The longitude.
1215 * @param lat The latitude.
1217 * At least 3 regions should be added to show the polygon overlay.
1219 * Overlay created with this method can be deleted with elm_map_overlay_del().
1221 * @see elm_map_overlay_polygon_add()
1222 * @see elm_map_overlay_del()
1226 EAPI void elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay, double lon, double lat);
1229 * Add a new circle overlay to the map object.
1230 * This overlay has a circle type.
1232 * @param obj The map object to add a new overlay.
1233 * @param lon The center longitude.
1234 * @param lat The center latitude.
1235 * @param radius The pixel length of radius.
1236 * @return The created overlay or @c NULL upon failure.
1238 * Overlay created with this method can be deleted with elm_map_overlay_del().
1240 * @see elm_map_overlay_del()
1244 EAPI Elm_Map_Overlay * elm_map_overlay_circle_add(Evas_Object *obj, double lon, double lat, double radius);
1247 * Add a new scale overlay to the map object.
1248 * This overlay has a scale type.
1250 * @param obj The map object to add a new overlay.
1251 * @param x horizontal pixel coordinate.
1252 * @param y vertical pixel coordinate
1253 * @return The created overlay or @c NULL upon failure.
1255 * The scale overlay shows the ratio of a distance on the map to the corresponding distance.
1257 * Overlay created with this method can be deleted with elm_map_overlay_del().
1259 * @see elm_map_overlay_del()
1263 EAPI Elm_Map_Overlay * elm_map_overlay_scale_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1266 * Get the information of tile load status.
1268 * @param obj The map object.
1269 * @param try_num Pointer to store number of tiles download requested.
1270 * @param finish_num Pointer to store number of tiles successfully downloaded.
1272 * This gets the current tile loaded status for the map object.
1276 EAPI void elm_map_tile_load_status_get(const Evas_Object *obj, int *try_num, int *finish_num);
1279 * Get the names of available sources for a specific type.
1281 * @param obj The map object.
1282 * @param type source type.
1283 * @return The char pointer array of source names.
1285 * It will provide a list with all available sources.
1286 * Current source can be set by elm_map_source_set(), or get with
1287 * elm_map_source_get().
1289 * At least available sources of tile type:
1295 * At least available sources of route type:
1298 * At least available sources of name type:
1301 * @see elm_map_source_set()
1302 * @see elm_map_source_get()
1306 EAPI const char **elm_map_sources_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1309 * Set the current source of the map for a specific type.
1311 * @param obj The map object.
1312 * @param type source type.
1313 * @param source_name The source to be used.
1315 * Map widget retrieves tile images that composes the map from a web service.
1316 * This web service can be set with this method
1317 * for ELM_MAP_SOURCE_TYPE_TILE type.
1318 * A different service can return a different maps with different
1319 * information and it can use different zoom values.
1321 * Map widget provides route data based on a external web service.
1322 * This web service can be set with this method
1323 * for ELM_MAP_SOURCE_TYPE_ROUTE type.
1325 * Map widget also provide geoname data based on a external web service.
1326 * This web service can be set with this method
1327 * for ELM_MAP_SOURCE_TYPE_NAME type.
1329 * The @p source_name need to match one of the names provided by
1330 * elm_map_sources_get().
1332 * The current source can be get using elm_map_source_get().
1334 * @see elm_map_sources_get()
1335 * @see elm_map_source_get()
1339 EAPI void elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const char *source_name);
1342 * Get the name of currently used source for a specific type.
1344 * @param obj The map object.
1345 * @param type source type.
1346 * @return Returns the name of the source in use.
1348 * @see elm_map_sources_get()
1349 * @see elm_map_source_set()
1353 EAPI const char *elm_map_source_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1356 * Add a new route to the map object.
1358 * @param obj The map object.
1359 * @param type The type of transport to be considered when tracing a route.
1360 * @param method The routing method, what should be prioritized.
1361 * @param flon The start longitude.
1362 * @param flat The start latitude.
1363 * @param tlon The destination longitude.
1364 * @param tlat The destination latitude.
1366 * @return The created route or @c NULL upon failure.
1368 * A route will be traced by point on coordinates (@p flat, @p flon)
1369 * to point on coordinates (@p tlat, @p tlon), using the route service
1370 * set with elm_map_source_set().
1372 * It will take @p type on consideration to define the route,
1373 * depending if the user will be walking or driving, the route may vary.
1374 * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or
1375 * #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
1377 * Another parameter is what the route should prioritize, the minor distance
1378 * or the less time to be spend on the route. So @p method should be one
1379 * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
1381 * Routes created with this method can be deleted with
1382 * elm_map_route_remove(),
1383 * and distance can be get with elm_map_route_distance_get().
1385 * @see elm_map_route_remove()
1386 * @see elm_map_route_distance_get()
1387 * @see elm_map_source_set()
1391 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);
1394 * Remove a route from the map.
1396 * @param route The route to remove.
1398 * @see elm_map_route_add()
1402 EAPI void elm_map_route_del(Elm_Map_Route *route);
1405 * Get the route distance in kilometers.
1407 * @param route The route object.
1408 * @return The distance of route (unit : km).
1412 EAPI double elm_map_route_distance_get(const Elm_Map_Route *route);
1415 * Get the information of route nodes.
1417 * @param route The route object.
1418 * @return Returns a string with the nodes of route.
1422 EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route);
1425 * Get the information of route waypoint.
1427 * @param route the route object.
1428 * @return Returns a string with information about waypoint of route.
1432 EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route);
1435 * Request a address or geographic coordinates(longitude, latitude)
1436 * from a given address or geographic coordinate(longitude, latitude).
1438 * @param obj The map object.
1439 * @param address The address.
1440 * @param lon The longitude.
1441 * @param lat The latitude.
1442 * @param name_cb The callback function.
1443 * @param data The user callback data.
1444 * @return name A #Elm_Map_Name handle for this coordinate.
1446 * If you want to get address from geographic coordinates, set input @p address
1447 * as NULL and set @p lon, @p lat as you want to convert.
1448 * If address is set except NULL, @p lon and @p lat are checked.
1450 * To get the string for this address, elm_map_name_address_get()
1451 * should be used after callback or "name,loaded" signal is called.
1453 * To get the longitude and latitude, elm_map_name_region_get()
1458 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);
1461 * Get the address of the name.
1463 * @param name The name handle.
1464 * @return Returns the address string of @p name.
1466 * This gets the coordinates of the @p name, created with one of the
1467 * conversion functions.
1469 * @see elm_map_name_add()
1473 EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name);
1476 * Get the current coordinates of the name.
1478 * @param name The name handle.
1479 * @param lat Pointer to store the latitude.
1480 * @param lon Pointer to store The longitude.
1482 * This gets the coordinates of the @p name, created with one of the
1483 * conversion functions.
1485 * @see elm_map_name_add()
1489 EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat);
1492 * Remove a name from the map.
1494 * @param name The name to remove.
1496 * Basically the struct handled by @p name will be freed, so conversions
1497 * between address and coordinates will be lost.
1499 * @see elm_map_name_add()
1503 EAPI void elm_map_name_del(Elm_Map_Name *name);
1506 * Add a track on the map
1508 * @param obj The map object.
1509 * @param emap The emap route object.
1510 * @return The route object. This is an elm object of type Route.
1512 * @see elm_route_add() for details.
1516 EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, void *emap);
1519 * Remove a track from the map
1521 * @param obj The map object.
1522 * @param route The track to remove.
1526 EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route);