Eina_Bool on_hold : 1;
Eina_Bool paused : 1;
+ struct
+ {
+ Eina_Bool enabled;
+ double lon, lat;
+ } center_on;
+
Eina_List *markers[19];
Evas_Coord marker_w, marker_h;
Evas_Coord marker_max_w, marker_max_h;
elm_smart_scroller_child_viewport_size_get(wd->scr, &ow, &oh);
- xx = (wd->size.spos.x * wd->size.w) - (ow / 2);
- yy = (wd->size.spos.y * wd->size.h) - (oh / 2);
+ if(wd->center_on.enabled)
+ {
+ elm_map_utils_convert_geo_into_coord(wd->center_on.lon, wd->center_on.lat, wd->size.w, &xx, &yy);
+ xx -= ow / 2;
+ yy -= oh / 2;
+ }
+ else
+ {
+ xx = (wd->size.spos.x * wd->size.w) - (ow / 2);
+ yy = (wd->size.spos.y * wd->size.h) - (oh / 2);
+ }
+
if (xx < 0) xx = 0;
else if (xx > (wd->size.w - ow)) xx = wd->size.w - ow;
if (yy < 0) yy = 0;
if (wd->calc_job) ecore_job_del(wd->calc_job);
wd->calc_job = ecore_job_add(_calc_job, wd);
if (t >= 1.0)
- return 0;
+ {
+ return 0;
+ }
return 1;
}
static void
_scr_drag_start(void *data, Evas_Object *obj, void *event_info)
{
+ Widget_Data *wd = elm_widget_data_get(data);
+ wd->center_on.enabled = EINA_FALSE;
evas_object_smart_callback_call(data, "scroll,drag,start", NULL);
}
_group_bubble_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Marker_Group *group = data;
-
+
if(!evas_object_above_get(group->rect))
return ;
evas_object_raise(group->bubble);
static void
_group_bringin_cb(void *data, Evas_Object *obj, const char *emission, const char *soure)
-{
+{
Marker_Group *group = data;
double lon, lat;
evas_object_smart_callback_call(obj, "zoom,stop", NULL);
}
elm_smart_scroller_region_bring_in(wd->scr, rx, ry, rw, rh);
+
+ wd->center_on.enabled = EINA_TRUE;
+ wd->center_on.lon = lon;
+ wd->center_on.lat = lat;
}
/**
evas_object_smart_callback_call(obj, "zoom,stop", NULL);
}
elm_smart_scroller_child_region_show(wd->scr, rx, ry, rw, rh);
+
+ wd->center_on.enabled = EINA_TRUE;
+ wd->center_on.lon = lon;
+ wd->center_on.lat = lat;
}
/**