From: Pierre-Luc Beaudoin Date: Wed, 19 Nov 2008 21:50:59 +0000 (-0500) Subject: Fix map recenter X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf10f7cd76735e666aecacef3fd0cdc5488bce42;p=libchamplain Fix map recenter --- diff --git a/champlain/champlainview.c b/champlain/champlainview.c index 5409827..a84103f 100644 --- a/champlain/champlainview.c +++ b/champlain/champlainview.c @@ -658,7 +658,11 @@ champlain_view_set_size (ChamplainView *view, guint width, guint height) g_return_if_fail(CHAMPLAIN_IS_VIEW(view)); ChamplainViewPrivate *priv = CHAMPLAIN_VIEW_GET_PRIVATE (view); - + + gdouble lat, lon; + lat = viewport_get_current_latitude (priv); + lon = viewport_get_current_longitude (priv); + priv->viewport_size.width = width; priv->viewport_size.height = height; @@ -666,7 +670,7 @@ champlain_view_set_size (ChamplainView *view, guint width, guint height) resize_viewport (view); if (priv->keep_center_on_resize) - champlain_view_center_on(view, priv->latitude, priv->longitude); + champlain_view_center_on(view, lat, lon); else map_load_visible_tiles (priv->map, priv->viewport_size, priv->offline); }