From 058fbcca591fa85c29aea43ec4b9ba65366fea58 Mon Sep 17 00:00:00 2001 From: Sung-Taek Hong Date: Fri, 1 May 2015 14:34:11 +0900 Subject: [PATCH] map: fix scale calculation error Summary: As the map shows the nearer to the equator, the scale of the map should be smaller. In elm_map, the opposite happens because meters per pixel was miscalculated. Thus, calculation is corrected http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale @fix Reviewers: seoz, woohyun, Hermet Differential Revision: https://phab.enlightenment.org/D2426 --- legacy/elementary/src/lib/elm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_map.c b/legacy/elementary/src/lib/elm_map.c index ea574e9..8e47a92 100644 --- a/legacy/elementary/src/lib/elm_map.c +++ b/legacy/elementary/src/lib/elm_map.c @@ -260,7 +260,7 @@ _scale_cb(const Evas_Object *obj EINA_UNUSED, (zoom >= (int)(sizeof(_osm_scale_meter) / sizeof(_osm_scale_meter[0]))) ) return 0; - return _osm_scale_meter[zoom] / cos(lat * ELM_PI / 180.0); + return _osm_scale_meter[zoom] * cos(lat * ELM_PI / 180.0); } const Source_Tile src_tiles[] = -- 2.7.4