}
static void
+map_zoom_min_set(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ elm_map_source_zoom_min_set(data, 1);
+}
+
+static void
+map_zoom_max_set(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ elm_map_source_zoom_max_set(data, 10);
+}
+
+static void
map_source(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Map_Source *s = data;
elm_menu_item_add(menu, NULL, NULL, "Rotate CW", map_rotate_cw, data);
elm_menu_item_add(menu, NULL, NULL, "Rotate CCW", map_rotate_ccw, data);
elm_menu_item_add(menu, NULL, NULL, "Reset Rotate", map_rotate_reset, data);
+ elm_menu_item_add(menu, NULL, NULL, "Set Zoom Min to 1", map_zoom_min_set, data);
+ elm_menu_item_add(menu, NULL, NULL, "Set Zoom Max to 10", map_zoom_max_set, data);
elm_menu_move(menu, down->canvas.x, down->canvas.y);
evas_object_show(menu);
EAPI const char *elm_map_source_name_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) EINA_ARG_NONNULL(1);
EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1);
EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1);
EAPI int elm_map_source_zoom_max_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) EINA_ARG_NONNULL(1, 2);
EAPI const char *elm_map_user_agent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
}
/**
+ * Set the maximum zoom of the source.
+ *
+ * @param source the source
+ *
+ * @ingroup Map
+ */
+EAPI void
+elm_map_source_zoom_max_set(Evas_Object *obj, int zoom)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if ((!wd) || (!wd->src)) return;
+ if ((zoom > wd->zoom_max) || (zoom < wd->zoom_min)) return;
+ wd->src->zoom_max = zoom;
+}
+
+/**
* Get the maximum zoom of the source.
*
* @param source the source
}
/**
+ * Set the minimum zoom of the source.
+ *
+ * @param source the source
+ *
+ * @ingroup Map
+ */
+EAPI void
+elm_map_source_zoom_min_set(Evas_Object *obj, int zoom)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if ((!wd) || (!wd->src)) return;
+ if ((zoom > wd->zoom_max) || (zoom < wd->zoom_min)) return;
+ wd->src->zoom_min = zoom;
+}
+
+
+/**
* Get the minimum zoom of the source.
*
* @param source the source