[libchamplain] Properly wrap coordinates in champlain_view_center_on()



commit 8752cbe1825a301418451c4cf2e20d8577308c93
Author: Jiří Techet <techet gmail com>
Date:   Sun Dec 31 14:57:34 2017 +0100

    Properly wrap coordinates in champlain_view_center_on()

 champlain/champlain-view.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index dd8b3bd..4edabef 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1950,7 +1950,10 @@ champlain_view_center_on (ChamplainView *view,
 
   DEBUG ("Centering on %f, %f (%g, %g)", latitude, longitude, x, y);
 
-  position_viewport (view, x, y);
+  if (priv->hwrap)
+    position_viewport (view, x_to_wrap_x (x, get_map_width (view)), y);
+  else
+    position_viewport (view, x, y);
   load_visible_tiles (view, FALSE);
 }
 


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