From: hermet Date: Mon, 26 Dec 2011 11:03:18 +0000 (+0000) Subject: elementary/map X-Git-Tag: REL_F_I9500_20120323_1~17^2~1046 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a9c95ec1ed6a22cd26b2f5fc0bcb50031bf7735;p=framework%2Fuifw%2Felementary.git elementary/map Dear all, I have found a bug that calculation fails when view port size is bigger than map size. For example, if map size is 256x256 but view port size is 798x798 (when zoom level is a 1), center longitude & latitude is out bound from normal longitude & latitude. I have fixed it. Please review this patch. Signed-Off-By: Bluezery Signed-Off-By: ChunEon Park git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66526 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index eaabb99..24ff853 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -3360,6 +3360,8 @@ elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) if (!wd) return; elm_smart_scroller_child_pos_get(wd->scr, &sx, &sy); elm_smart_scroller_child_viewport_size_get(wd->scr, &sw, &sh); + if (wd->size.w < sw) sw = wd->size.w; + if (wd->size.h < sh) sh = wd->size.h; sx += sw / 2; sy += sh / 2;