Percision of champlain_view_get_coords_at



Hi,

I want to put a marker at a position on the map where user clicks for
which I use champlain_view_get_coords_at to translate between screen
coordinates and lat, lon of a marker. When doing this i noticed that
the marker is placed correctly at the center of a map but when you
click on either side of the map the marker is misplaced by a margin
depending how far you are from the center. I think that there is a
rounding error in the calculation somewhere.

Another observation I have made is that champlain_view_get_coords_at
has x and y parameters as uint. Maybe this should be changed to float
- the same as in Clutter. Inside the method the x,y coordinates are
then converted to float anyway. The same should apply to
champlain_map_source_get_latitude and
champlain_map_source_get_longitude and maybe some other functions that
use "screen" x and y coordinates. I will try to sweep through the code
and search for other such cases and provide patches for this if this
changes make sense.

regards, Tomaž


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]