forked from enlightenment/efl
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
This commit is contained in:
parent
fb54e83a55
commit
058fbcca59
|
@ -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[] =
|
||||
|
|
Loading…
Reference in New Issue