elm - map widget - empty out and clean out code and tests - broken

elm map has been broken for a long time now sue to upstream web api
changes/breaks made by openstreetmaps. this isn't sustainable to have
code do this. since it's broken there is little point keeping code for
something that is totally non-functional, so reduce code, document it
as broken and remove tests. at least symbols remain so no missing
symbols and code using it will end up with an empty non-functional
widget (much like they would without these changes anyway).

@feat
This commit is contained in:
Carsten Haitzler 2021-09-05 11:47:22 +01:00
parent 03dae0a900
commit aa96bf5987
7 changed files with 373 additions and 7429 deletions

View File

@ -86,7 +86,6 @@ elementary_test_src = [
'test_launcher.c',
'test_layout.c',
'test_list.c',
'test_map.c',
'test_main_menu.c',
'test_menu.c',
'test_multi.c',

View File

@ -228,7 +228,6 @@ void test_calendar(void *data, Evas_Object *obj, void *event_info);
void test_calendar2(void *data, Evas_Object *obj, void *event_info);
void test_calendar3(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_calendar(void *data, Evas_Object *obj, void *event_info);
void test_map(void *data, Evas_Object *obj, void *event_info);
void test_weather(void *data, Evas_Object *obj, void *event_info);
void test_flip(void *data, Evas_Object *obj, void *event_info);
void test_flip2(void *data, Evas_Object *obj, void *event_info);
@ -1255,9 +1254,6 @@ add_tests:
ADD_TEST(NULL, "Naviframe", "Naviframe 3", test_naviframe3);
ADD_TEST(NULL, "Naviframe", "Naviframe: Complex", test_naviframe_complex);
//------------------------------//
ADD_TEST(NULL, "Geographic", "Map", test_map);
//------------------------------//
ADD_TEST(NULL, "Dividers", "Panel", test_panel);
ADD_TEST(NULL, "Dividers", "Panel Scrollable", test_panel2);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,7 @@
/**
* Set the name search method.
*
* This is for name module interface.
* Widget is broken due to on-line service API breaks
*/
typedef enum
{
@ -18,14 +16,7 @@ typedef enum
} Elm_Map_Name_Method;
/**
* 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 elm_map_overlay_type_get()
* @see elm_map_overlay_add()
* @see elm_map_overlay_class_add()
* @see elm_map_overlay_bubble_add()
* Widget is broken due to on-line service API breaks
*/
typedef enum
{
@ -61,544 +52,197 @@ typedef void (*Elm_Map_Name_List_Cb)(void *data, Evas_Obje
typedef void (*Elm_Map_Route_Cb)(void *data, Evas_Object *map, Elm_Map_Route *route); /**< Async-callback function for the route request. */
/**
* Delete a overlay from the map. This function can delete all types
* of overlays.
*
* @param overlay The overlay to be deleted.
*
* @see elm_map_overlay_add()
* @see elm_map_overlay_class_add()
* @see elm_map_overlay_bubble_add()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_del(Elm_Map_Overlay *overlay);
/**
* Get the overlay type.
*
* @param overlay The overlay to return type.
* @return Return the overlay type.
*
* This type is resolved when the overlay is created.
*
* @see elm_map_overlay_add()
* @see elm_map_overlay_class_add()
* @see elm_map_overlay_bubble_add()
* Widget is broken due to on-line service API breaks
*/
EAPI Elm_Map_Overlay_Type elm_map_overlay_type_get(const Elm_Map_Overlay *overlay);
/**
* Set a pointer of user data for a overlay.
*
* @param overlay The overlay to own the user data.
* @param data A pointer of user data
*
* @see elm_map_overlay_data_get()
/**
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_data_set(Elm_Map_Overlay *overlay, void *data);
/**
* Get the user data stored on a overlay.
*
* @param overlay The overlay to return the user data.
* @return A pointer to data stored using elm_map_overlay_data_set(),
* or @c NULL, if none has been set.
*
* @see elm_map_overlay_data_set()
* Widget is broken due to on-line service API breaks
*/
EAPI void * elm_map_overlay_data_get(const Elm_Map_Overlay *overlay);
/**
* Set if the overlay is hidden or not.
*
* @param overlay The overlay to be hidden.
* @param hide Use @c EINA_TRUE to hide the overlay or @c EINA_FALSE to show.
*
* @see elm_map_overlay_hide_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_hide_set(Elm_Map_Overlay *overlay, Eina_Bool hide);
/**
* Get a value whether the overlay is hidden or not.
*
* @param overlay The overlay to return the hidden state.
* @return @c EINA_TRUE means the overlay is hidden. @c EINA_FALSE indicates
* it is not.
*
* This gets the current hidden state for the overlay.
*
* @see elm_map_overlay_hide_set()
* Widget is broken due to on-line service API breaks
*/
EAPI Eina_Bool elm_map_overlay_hide_get(const Elm_Map_Overlay *overlay);
/**
* Set the minimum zoom from where the overlay is displayed.
*
* @param overlay The overlay to be set the minimum zoom.
* @param zoom The minimum zoom.
*
* The overlay only will be displayed when the map is displayed at @p zoom
* or bigger.
*
* @see elm_map_overlay_displayed_zoom_min_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_displayed_zoom_min_set(Elm_Map_Overlay *overlay, int zoom);
/**
* Get the minimum zoom from where the overlay is displayed.
*
* @param overlay The overlay to return the minimum zoom.
* @return zoom The minimum zoom.
*
* @see elm_map_overlay_displayed_zoom_min_set()
* Widget is broken due to on-line service API breaks
*/
EAPI int elm_map_overlay_displayed_zoom_min_get(const Elm_Map_Overlay *overlay);
/**
* Pause or unpause the overlay.
*
* @param overlay The overlay to be paused.
* @param paused Use @c EINA_TRUE to pause the @p overlay or @c EINA_FALSE
* to unpause it.
*
* This sets the paused state to on (@c EINA_TRUE) or off (@c 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 elm_map_overlay_paused_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_paused_set(Elm_Map_Overlay *overlay, Eina_Bool paused);
/**
* Get a value whether the overlay is paused or not.
*
* @param overlay The overlay to return paused state.
* @return @c EINA_TRUE means overlay is paused. @c EINA_FALSE indicates
* it is not.
*
* This gets the current paused state for the overlay.
*
* @see elm_map_overlay_paused_set()
* Widget is broken due to on-line service API breaks
*/
EAPI Eina_Bool elm_map_overlay_paused_get(const Elm_Map_Overlay *overlay);
/**
* Get a value whether the overlay is visible or not.
*
* @param overlay The overlay to return visible state.
* @return @c EINA_TRUE means overlay is visible. @c 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 1.7
* Widget is broken due to on-line service API breaks
*/
EAPI Eina_Bool elm_map_overlay_visible_get(const Elm_Map_Overlay *overlay);
/**
* Set the content object of the overlay.
*
* @param overlay The overlay to be set the content.
* @param 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.
* <b> Do not modify this object</b> (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 @p obj is @c NULL, content inside the overlay is deleted.
*
* @see elm_map_overlay_content_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj);
/**
* Get the content object.
*
* @param overlay The overlay to return the content.
* @return Return the evas object if it exists, else @c NULL.
*
* Only default and class type overlay support this function.
*
* Returned content is what being inside the overlay that being displayed.
*
* <b> Do not modify this object</b> (move, show, hide, del, etc.).
* You can only resize this.
*
* The content can be set by elm_map_overlay_content_set().
*
* @see elm_map_overlay_content_set()
* Widget is broken due to on-line service API breaks
*/
EAPI const Evas_Object * elm_map_overlay_content_get(const Elm_Map_Overlay *overlay);
/**
* Set a icon of the overlay.
*
* @param overlay The overlay to be set the icon.
* @param icon The icon will be used to display the overlay.
*
* Only default and class type overlay support this function.
*
* <b> Do not modify this object</b> (move, show, hide, resize, del, etc.),
* after set.
*
* If icon is set, default style layout will not be used.
*
* If @p icon is @c NULL, icon inside the overlay will be deleted.
*
* @see elm_map_overlay_icon_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon);
/**
* Get the icon object.
*
* @param overlay The overlay to return the icon.
* @return Return the icon object if it exists, else @c NULL.
*
* Only default and class type overlay support this function.
*
* Returned icon is what being inside the overlay that being displayed.
*
* <b> Do not modify this icon </b> (move, show, hide, resize, del, etc.).
*
* The icon can be set by elm_map_overlay_icon_set().
*
* @see elm_map_overlay_icon_set()
* Widget is broken due to on-line service API breaks
*/
EAPI const Evas_Object * elm_map_overlay_icon_get(const Elm_Map_Overlay *overlay);
/**
* Set the geographic coordinates of the overlay.
*
* @param overlay The overlay to be set geographic coordinates.
* @param lon Longitude to be set.
* @param 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 elm_map_overlay_region_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat);
/**
* Get the geographic coordinates of the overlay.
*
* @param overlay The overlay to return geographic coordinates.
* @param lon Pointer to store longitude.
* @param 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 elm_map_overlay_region_set()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_region_get(const Elm_Map_Overlay *overlay, double *lon, double *lat);
/**
* Set the object color of the overlay.
*
* @param overlay The overlay to be set color.
* @param r Red channel value, from 0 to 255.
* @param g Green channel value, from 0 to 255.
* @param b Blue channel value, from 0 to 255.
* @param 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 elm_map_overlay_color_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a);
/**
* Get the object color of the overlay.
*
* @param overlay The overlay to return color.
* @param r Pointer to store the red channel value.
* @param g Pointer to store the green channel value.
* @param b Pointer to store the blue channel value.
* @param a Pointer to store the alpha channel value.
*
* @see elm_map_overlay_color_set()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_color_get(const Elm_Map_Overlay *overlay, int *r, int *g, int *b, int *a);
/**
* Show the given overlay at the center of the map, immediately.
*
* @param overlay The overlay to be center at.
*
* This causes map to @b redraw its viewport's contents to the
* region containing the given @p overlay's coordinates, that will be
* moved to the center of the map.
*
* @see elm_map_overlays_show() if more than one overlay need to be displayed.
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_show(Elm_Map_Overlay *overlay);
/**
* Move and zoom the map to display a list of overlays.
*
* @param 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 elm_map_overlay_show() to show a single overlay.
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlays_show(Eina_List *overlays);
/**
* Set the get callback function of the overlay.
*
* @param overlay The overlay to own the get callback function.
* @param get_cb The callback function.
* @param 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 @c NULL.
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Get_Cb get_cb, void *data);
/**
* Set the del callback function to call when the overlay is deleted.
*
* @param overlay The overlay to own the del callback function.
* @param del_cb The callback function.
* @param 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 @c NULL.
*
* @since 1.7
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_del_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Del_Cb del_cb, void *data);
/**
* Add a new overlay member to the class overlay.
*
* @param clas The class overlay to add a new overlay.
* @param overlay The overlay to be added to the class overlay.
*
* @see elm_map_overlay_class_remove()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_class_append(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
/**
* Remove a overlay from the class.
*
* @param clas The class overlay to delete the overlay.
* @param overlay The overlay to be deleted from the class overlay.
*
* @see elm_map_overlay_class_append()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_class_remove(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
/**
* Set the maximum zoom from where the overlay members in the class can be
* grouped.
*
* @param clas The overlay class has overlay members.
* @param zoom The maximum zoom.
*
* Overlay members in the class only will be grouped when the map
* is displayed at less than @p zoom.
*
* @see elm_map_overlay_class_zoom_max_get()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *clas, int zoom);
/**
* Get the maximum zoom from where the overlay members in the class can be
* grouped.
*
* @param clas The overlay class has overlay members.
*
* @return The maximum zoom.
*
* @see elm_map_overlay_class_zoom_max_set()
* Widget is broken due to on-line service API breaks
*/
EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas);
/**
* Get the overlay members of the group overlay.
*
* @param grp The group overlay has overlay members.
*
* @return 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 changing the state of the class overlay.
* Do not modify the group overlay itself.
*
* @see elm_map_overlay_class_add()
* Widget is broken due to on-line service API breaks
*/
EAPI Eina_List * elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp);
/**
* Follow a other overlay.
*
* @param bubble The bubble overlay to follow a parent overlay.
* @param parent The parent overlay to be followed by the bubble overlay.
*
* Bubble overlay will follow the parent overlay's movement (hide, show, move).
*
* @see elm_map_overlay_bubble_add()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_bubble_follow(Elm_Map_Overlay *bubble, const Elm_Map_Overlay *parent);
/**
* Add a content object to the bubble overlay.
*
* @param bubble The bubble overlay to add a content.
* @param content The content to be added to the bubble overlay.
*
* Added contents will be displayed inside the bubble overlay.
*
* @see elm_map_overlay_bubble_content_clear()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_bubble_content_append(Elm_Map_Overlay *bubble, Evas_Object *content);
/**
* Clear all contents inside the bubble overlay.
*
* @param bubble The bubble overlay to clear the contents.
*
* This will delete all contents inside the bubble overlay.
*
* @see elm_map_overlay_bubble_content_append()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble);
/**
* Add a geographic coordinates to the polygon overlay.
*
* @param overlay The polygon overlay to get a region.
* @param lon The longitude.
* @param 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 elm_map_overlay_polygon_add()
* @see elm_map_overlay_del()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay, double lon, double lat);
/**
* Remove a route from the map.
*
* @param route The route to remove.
*
* @see elm_map_route_add()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_route_del(Elm_Map_Route *route);
/**
* Get the route distance in kilometers.
*
* @param route The route object.
* @return The distance of route (unit : km).
* Widget is broken due to on-line service API breaks
*/
EAPI double elm_map_route_distance_get(const Elm_Map_Route *route);
/**
* Get the information of route nodes.
*
* @param route The route object.
* @return Returns a string with the nodes of route.
* Widget is broken due to on-line service API breaks
*/
EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route);
/**
* Get the information of route waypoint.
*
* @param route the route object.
* @return Returns a string with information about waypoint of route.
* Widget is broken due to on-line service API breaks
*/
EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route);
/**
* Get the address of the name.
*
* @param name The name handle.
* @return Returns the address string of @p name.
*
* This gets the coordinates of the @p name, created with one of the
* conversion functions.
*
* @see elm_map_name_add()
* Widget is broken due to on-line service API breaks
*/
EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name);
/**
* Get the current coordinates of the name.
*
* @param name The name handle.
* @param lat Pointer to store the latitude.
* @param lon Pointer to store The longitude.
*
* This gets the coordinates of the @p name, created with one of the
* conversion functions.
*
* @see elm_map_name_add()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat);
/**
* Remove a name from the map.
*
* @param name The name to remove.
*
* Basically the struct handled by @p name will be freed, so conversions
* between address and coordinates will be lost.
*
* @see elm_map_name_add()
* Widget is broken due to on-line service API breaks
*/
EAPI void elm_map_name_del(Elm_Map_Name *name);

View File

@ -12,10 +12,9 @@ typedef Eo Elm_Map;
#define _ELM_MAP_EO_TYPES
/**
* @brief Set type of a external source (provider).
* @brief Widget is broken due to on-line service API breaks
*
* See @ref elm_map_sources_get() See @ref elm_map_source_get() See
* @ref elm_map_source_set()
* Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
@ -29,10 +28,8 @@ typedef enum
} Elm_Map_Source_Type;
/**
* @brief Set type of transport used on route.
*
* See @ref elm_map_route_add()
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
typedef enum
@ -47,10 +44,8 @@ typedef enum
} Elm_Map_Route_Type;
/**
* @brief Set the routing method, what should be prioritized, time or distance.
*
* See @ref elm_map_route_add()
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
typedef enum
@ -65,550 +60,225 @@ typedef enum
#endif
/**
* @brief Set the minimum zoom of the source.
*
* @param[in] obj The object.
* @param[in] zoom Minimum zoom value to be used.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_zoom_min_set(Elm_Map *obj, int zoom);
/**
* @brief Get the minimum zoom of the source.
*
* @param[in] obj The object.
*
* @return Minimum zoom value to be used.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI int elm_map_zoom_min_get(const Elm_Map *obj);
/**
* @brief Rotate the map.
*
* @param[in] obj The object.
* @param[in] degree Angle from 0.0 to 360.0 to rotate around Z axis.
* @param[in] cx Rotation's center horizontal position.
* @param[in] cy Rotation's center vertical position.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_rotate_set(Elm_Map *obj, double degree, int cx, int cy);
/**
* @brief Get the rotate degree of the map.
*
* @param[in] obj The object.
* @param[out] degree Angle from 0.0 to 360.0 to rotate around Z axis.
* @param[out] cx Rotation's center horizontal position.
* @param[out] cy Rotation's center vertical position.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_rotate_get(const Elm_Map *obj, double *degree, int *cx, int *cy);
/**
* @brief Set the user agent used by the map object to access routing services.
*
* User agent is a client application implementing a network protocol used in
* communications within a clientserver distributed computing system
*
* The @c user_agent identification string will transmitted in a header field
* @c User-Agent.
*
* @param[in] obj The object.
* @param[in] user_agent The user agent to be used by the map.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_user_agent_set(Elm_Map *obj, const char *user_agent);
/**
* @brief Get the user agent used by the map object.
*
* @param[in] obj The object.
*
* @return The user agent to be used by the map.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI const char *elm_map_user_agent_get(const Elm_Map *obj);
/**
* @brief Set the maximum zoom of the source.
*
* @param[in] obj The object.
* @param[in] zoom Maximum zoom value to be used.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_zoom_max_set(Elm_Map *obj, int zoom);
/**
* @brief Get the maximum zoom of the source.
*
* @param[in] obj The object.
*
* @return Maximum zoom value to be used.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI int elm_map_zoom_max_get(const Elm_Map *obj);
/**
* @brief Get the current geographic coordinates of the map.
*
* This gets the current center coordinates of the map object. It can be set by
* @ref elm_map_region_bring_in and @ref elm_map_region_show.
*
* @param[in] obj The object.
* @param[out] lon Pointer to store longitude.
* @param[out] lat Pointer to store latitude.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_region_get(const Elm_Map *obj, double *lon, double *lat);
/**
* @brief Return all overlays in the map object.
*
* This list includes group overlays also. So this can be changed dynamically
* while zooming and panning.
*
* @param[in] obj The object.
*
* @return The list of all overlays or @c null upon failure.
*
* @since 1.7
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Eina_List *elm_map_overlays_get(const Elm_Map *obj);
/**
* @brief Get the information of tile load status.
*
* This gets the current tile loaded status for the map object.
*
* @param[in] obj The object.
* @param[out] try_num Pointer to store number of tiles download requested.
* @param[out] finish_num Pointer to store number of tiles successfully
* downloaded.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_tile_load_status_get(const Elm_Map *obj, int *try_num, int *finish_num);
/**
* @brief Set the current source of the map for a specific type.
*
* Map widget retrieves tile images that composes the map from a web service.
* This web service can be set with this method for #ELM_MAP_SOURCE_TYPE_TILE
* type. A different service can return a different maps with different
* information and it can use different zoom values.
*
* Map widget provides route data based on a external web service. This web
* service can be set with this method for #ELM_MAP_SOURCE_TYPE_ROUTE type.
*
* Map widget also provide geoname data based on a external web service. This
* web service can be set with this method for #ELM_MAP_SOURCE_TYPE_NAME type.
*
* The @c source_name need to match one of the names provided by
* @ref elm_map_sources_get.
*
* The current source can be get using @ref elm_map_source_get.
*
* @param[in] obj The object.
* @param[in] type Source type.
* @param[in] source_name The source to be used.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_source_set(Elm_Map *obj, Elm_Map_Source_Type type, const char *source_name);
/**
* @brief Get the name of currently used source for a specific type.
*
* @param[in] obj The object.
* @param[in] type Source type.
*
* @return The name of the source in use.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI const char *elm_map_source_get(const Elm_Map *obj, Elm_Map_Source_Type type);
/**
* @brief Add a new route to the map object.
*
* A route will be traced by point on coordinates ($flat, @c flon) to point on
* coordinates ($tlat, @c tlon), using the route service set with
* @ref elm_map_source_set.
*
* It will take @c type on consideration to define the route, depending if the
* user will be walking or driving, the route may vary. One of
* #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or
* #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
*
* Another parameter is what the route should prioritize, the minor distance or
* the less time to be spend on the route. So @c method should be one of
* #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
*
* Routes created with this method can be deleted with @ref elm_map_route_del
* and distance can be get with @ref elm_map_route_distance_get.
*
* @param[in] obj The object.
* @param[in] type The type of transport to be considered when tracing a route.
* @param[in] method The routing method, what should be prioritized.
* @param[in] flon The start longitude.
* @param[in] flat The start latitude.
* @param[in] tlon The destination longitude.
* @param[in] tlat The destination latitude.
* @param[in] route_cb The route to be traced.
* @param[in] data A pointer of user data.
*
* @return The created route or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Route *elm_map_route_add(Elm_Map *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);
/**
* @brief Add a track on the map.
*
* @param[in] obj The object.
* @param[in] emap The emap route object.
*
* @return The route object. This is an elm object of type Route.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Efl_Canvas_Object *elm_map_track_add(Elm_Map *obj, void *emap);
/**
* @brief Convert geographic coordinates (longitude, latitude) into canvas
* coordinates.
*
* This gets canvas x, y coordinates from longitude and latitude. The canvas
* coordinates mean x, y coordinate from current viewport.
*
* @param[in] obj The object.
* @param[in] lon The longitude to convert.
* @param[in] lat The latitude to convert.
* @param[out] x A pointer to horizontal coordinate.
* @param[out] y A pointer to vertical coordinate.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_region_to_canvas_convert(const Elm_Map *obj, double lon, double lat, int *x, int *y);
/**
* @brief Add a new circle overlay to the map object. This overlay has a circle
* type.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
* @param[in] lon The center longitude.
* @param[in] lat The center latitude.
* @param[in] radius The pixel length of radius.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_circle_add(Elm_Map *obj, double lon, double lat, double radius);
/**
* @brief Add a new class overlay to the map object. This overlay has a class
* type.
*
* This overlay is not shown before overlay members are appended. if overlay
* members in the same class are close, group overlays are created. If they are
* far away, group overlays are hidden. When group overlays are shown, they
* have default style layouts at first.
*
* You can change the state (hidden, paused, etc.) or set the content or icon
* of the group overlays by changing the state of the class overlay. Do not
* modify the group overlay itself.
*
* Also these changes have a influence on the overlays in the same class even
* if each overlay is alone and is not grouped.
*
* @param[in] obj The object.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_class_add(Elm_Map *obj);
/**
* @brief Add a new bubble overlay to the map object. This overlay has a bubble
* type.
*
* A bubble will not be displayed before geographic coordinates are set or any
* other overlays are followed.
*
* This overlay has a bubble style layout and icon or content can not be set.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_bubble_add(Elm_Map *obj);
/**
* @brief Get the names of available sources for a specific type.
*
* It will provide a list with all available sources. Current source can be set
* by @ref elm_map_source_set, or get with @ref elm_map_source_get.
*
* At least available sources of tile type are "Mapnik", "Osmarender",
* "CycleMap" and "Maplint".
*
* At least available sources of route type are "Yours".
*
* At least available sources of name type are "Nominatim".
*
* @param[in] obj The object.
* @param[in] type Source type.
*
* @return The char pointer array of source names.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI const char **elm_map_sources_get(const Elm_Map *obj, Elm_Map_Source_Type type);
/**
* @brief Add a new polygon overlay to the map object. This overlay has a
* polygon type.
*
* At least 3 regions should be added to show the polygon overlay.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_polygon_add(Elm_Map *obj);
/**
* @brief Add a new line overlay to the map object. This overlay has a line
* type.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
* @param[in] flon The start longitude.
* @param[in] flat The start latitude.
* @param[in] tlon The destination longitude.
* @param[in] tlat The destination latitude.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_line_add(Elm_Map *obj, double flon, double flat, double tlon, double tlat);
/**
* @brief Show the given coordinates at the center of the map, immediately.
*
* This causes map to redraw its viewport's contents to the region containing
* the given @c lat and @c lon, that will be moved to the center of the map.
*
* See @ref elm_map_region_bring_in for a function to move with animation.
*
* @param[in] obj The object.
* @param[in] lon Longitude to center at.
* @param[in] lat Latitude to center at.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_region_show(Elm_Map *obj, double lon, double lat);
/**
* @brief Request a address or geographic coordinates(longitude, latitude) from
* a given address or geographic coordinate(longitude, latitude).
*
* If you want to get address from geographic coordinates, set input @c address
* as @c null and set @c lon, @c lat as you want to convert. If address is set
* except NULL, @c lon and @c lat are checked.
*
* To get the string for this address, @ref elm_map_name_address_get should be
* used after callback or "name,loaded" signal is called.
*
* To get the longitude and latitude, @ref elm_map_region_get should be used.
*
* @param[in] obj The object.
* @param[in] address The address.
* @param[in] lon The longitude.
* @param[in] lat The latitude.
* @param[in] name_cb The callback function.
* @param[in] data The user callback data.
*
* @return A #Elm_Map_Name handle for this coordinate.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Name *elm_map_name_add(const Elm_Map *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
/**
* @brief Requests a list of addresses corresponding to a given name.
*
* @internal
*
* @param[in] obj The object.
* @param[in] address The address.
* @param[in] name_cb The callback function.
* @param[in] data The user callback data.
*
* @since 1.8
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_name_search(const Elm_Map *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
/**
* @brief Animatedly bring in given coordinates to the center of the map.
*
* This causes map to jump to the given @c lat and @c lon coordinates and show
* it (by scrolling) in the center of the viewport, if it is not already
* centered. This will use animation to do so and take a period of time to
* complete.
*
* See @ref elm_map_region_show for a function to avoid animation.
*
* @param[in] obj The object.
* @param[in] lon Longitude to center at.
* @param[in] lat Latitude to center at.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_region_bring_in(Elm_Map *obj, double lon, double lat);
/**
* @brief Animatedly set the zoom level of the map and bring in given
* coordinates to the center of the map.
*
* This causes map to zoom into specific zoom level and also move to the given
* @c lat and @c lon coordinates and show it (by scrolling) in the center of
* the viewport concurrently.
*
* See also @ref elm_map_region_bring_in.
*
* @param[in] obj The object.
* @param[in] zoom The zoom level to set.
* @param[in] lon Longitude to center at.
* @param[in] lat Latitude to center at.
*
* @since 1.11
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_region_zoom_bring_in(Elm_Map *obj, int zoom, double lon, double lat);
/**
* @brief Remove a track from the map.
*
* @param[in] obj The object.
* @param[in] route The track to remove.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_track_remove(Elm_Map *obj, Efl_Canvas_Object *route);
/**
* @brief Add a new route overlay to the map object. This overlay has a route
* type.
*
* This overlay has a route style layout and icon or content can not be set.
*
* The color scheme can be changed by @ref elm_map_overlay_content_set.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
* @param[in] route The route object to make a overlay.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_route_add(Elm_Map *obj, const Elm_Map_Route *route);
/**
* @brief Add a new scale overlay to the map object. This overlay has a scale
* type.
*
* The scale overlay shows the ratio of a distance on the map to the
* corresponding distance.
*
* Overlay created with this method can be deleted with @ref
* elm_map_overlay_del.
*
* @param[in] obj The object.
* @param[in] x horizontal pixel coordinate.
* @param[in] y vertical pixel coordinate.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_scale_add(Elm_Map *obj, int x, int y);
/**
* @brief Add a new overlay to the map object. This overlay has a default type.
*
* A overlay will be created and shown in a specific point of the map, defined
* by @c lon and @c lat.
*
* The created overlay has a default style layout before content or icon is
* set. If content or icon is set, those are displayed instead of default style
* layout.
*
* You can set by using @ref elm_map_overlay_content_set or @ref
* elm_map_overlay_icon_set. If @c null is set, default style is shown again.
*
* Overlay created with this method can be deleted by @ref elm_map_overlay_del.
*
* @param[in] obj The object.
* @param[in] lon The longitude of the overlay.
* @param[in] lat The latitude of the overlay.
*
* @return The created overlay or @c null upon failure.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Overlay *elm_map_overlay_add(Elm_Map *obj, double lon, double lat);
/**
* @brief Convert canvas coordinates into geographic coordinates (longitude,
* latitude).
*
* This gets longitude and latitude from canvas x, y coordinates. The canvas
* coordinates mean x, y coordinate from current viewport.
*
* @param[in] obj The object.
* @param[in] x Horizontal coordinate of the point to convert.
* @param[in] y Vertical coordinate of the point to convert.
* @param[out] lon A pointer to the longitude.
* @param[out] lat A pointer to the latitude.
*
* @brief Widget is broken due to on-line service API breaks
*
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_canvas_to_region_convert(const Elm_Map *obj, int x, int y, double *lon, double *lat);

View File

@ -1,16 +1,6 @@
/**
* @brief Set map's zoom behavior. It can be set to manual or automatic.
*
* Default value is #ELM_MAP_ZOOM_MODE_MANUAL.
*
* Values <b> don't </b> work as bitmask, only one can be chosen.
*
* Valid sizes are 2^zoom, consequently the map may be smaller than the
* scroller view.
*
* See @ref elm_map_zoom_mode_set() See @ref elm_map_zoom_mode_get()
*
* @brief Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
typedef enum
@ -26,148 +16,64 @@ typedef enum
} Elm_Map_Zoom_Mode;
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
/**
* @brief Set the zoom level of the map.
*
* This sets the zoom level.
*
* It will respect limits defined by @ref elm_map_zoom_min_set and
* @ref 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
* @ref elm_map_zoom_mode_set.
*
* @param[in] obj The object.
* @param[in] zoom The zoom level.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom);
/**
* @brief 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.
*
* @param[in] obj The object.
*
* @return The zoom level.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI int elm_map_zoom_get(const Evas_Object *obj);
/**
* @brief 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
* @ref 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.
*
* @param[in] obj The object.
* @param[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.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode);
/**
* @brief Get the zoom mode used by the map object.
*
* This function returns the current zoom mode used by the ma object.
*
* @param[in] obj The object.
*
* @return 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.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj);
/**
* @brief Enable or disable mouse wheel to be used to zoom in / out the map.
*
* Wheel is enabled by default.
*
* @param[in] obj The object.
* @param[in] disabled Use @c true to disable mouse wheel or @c false to enable
* it.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
/**
* @brief 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.
*
* @param[in] obj The object.
*
* @return Use @c true to disable mouse wheel or @c false to enable it.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj);
/**
* @brief Pause or unpause the map.
*
* This sets the paused state to on @c true or off @c false for map.
*
* The default is off.
*
* This will stop zooming using animation, changing zoom levels will change
* instantly. This will stop any existing animations that are running.
*
* @param[in] obj The object.
* @param[in] paused Use @c true to pause the map @c obj or @c false to unpause
* it.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused);
/**
* @brief Get a value whether map is paused or not.
*
* This gets the current paused state for the map object.
*
* @param[in] obj The object.
*
* @return Use @c true to pause the map @c obj or @c false to unpause it.
*
* @brief Widget is broken due to on-line service API breaks
* Widget is broken due to on-line service API breaks
* @ingroup Elm_Map_Group
*/
EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj);