diff options
author | Jiří Techet <techet@gmail.com> | 2017-12-31 14:57:34 +0100 |
---|---|---|
committer | Jiří Techet <techet@gmail.com> | 2017-12-31 14:57:34 +0100 |
commit | 8752cbe1825a301418451c4cf2e20d8577308c93 (patch) | |
tree | d916e7c6f4e9915d78d4a0f2dc51157521352edb /champlain | |
parent | 602e52f5f32c6e5751653571b69105d389bfe125 (diff) | |
download | libchamplain-8752cbe1825a301418451c4cf2e20d8577308c93.tar.gz |
Properly wrap coordinates in champlain_view_center_on()
Diffstat (limited to 'champlain')
-rw-r--r-- | 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); } |