Go to file
Bluezery 80a3a87fa9 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Fix zoom & rotated coordinates bug

In my point of view, elm_map did not consider zooming & rotation by
using Evas_Map initially.
There are no problems if you use only elm_map_zoom_set(). But if you
use pinch gesture or wheel to do subtle zooming & rotating, the
calculations of coordinates are not correct currently.

I have fixed these problem and also made some utility APIs for user
convenience.
I made following 3 APIs.
1. elm_map_utils_size_get()
Currently users can only get integer zoom level by using
elm_map_zoom_get().
So if user want to calculate full map size, user should calculate
pow(2.0, zoom level) * tile size.  Furthermore, user assumes tile size
as 256. (tile size can be changed!!)
Also it's not correct sometimes because Evas_map is used for subtle
zooming between zoom levels.
Above APIs return correct full map size.

2. elm_map_utils_region_get()
It can used for getting left top coordinates, center coordinates and
width, height of currently shown map area.

3. elm_map_utils_convert_canvas_into_geo()
Currently it is hard to converting x, y coordinates to geographical
longitude, latitude because of subtle zooming & rotating.
If use wants to get it, user uses combination of above functions and
more. It is harsh job.
This function is used for getting longitude, latitude from x, y
coordinates of current viewport.



SVN revision: 67286
2012-01-18 03:55:40 +00:00
legacy/elementary From: Bluezery <ohpowel@gmail.com> 2012-01-18 03:55:40 +00:00