]> err.no Git - libchamplain/commitdiff
Remove some left over temp values when ChamplainMapSource was introduced
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 10 Mar 2009 22:17:53 +0000 (00:17 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 10 Mar 2009 22:17:53 +0000 (00:17 +0200)
champlain/champlain-view.c

index 6fd97a29756f313d8650da5bfe5dc88deb147e2f..f9125dea77703b7cf645b7752ac606b255525240 100644 (file)
@@ -396,7 +396,8 @@ resize_viewport (ChamplainView *view)
   if (priv->zoom_level < 8)
     {
       lower = -priv->viewport_size.width / 2.0;
-      upper = champlain_zoom_level_get_width (priv->map->current_level)*256 - //XXX
+      upper = champlain_zoom_level_get_width (priv->map->current_level) *
+          champlain_map_source_get_tile_size (priv->map_source) -
           priv->viewport_size.width / 2.0;
     }
   else
@@ -410,7 +411,8 @@ resize_viewport (ChamplainView *view)
   if (priv->zoom_level < 8)
     {
       lower = -priv->viewport_size.height / 2.0;
-      upper = champlain_zoom_level_get_height (priv->map->current_level)*256 - //XXX
+      upper = champlain_zoom_level_get_height (priv->map->current_level) *
+          champlain_map_source_get_tile_size (priv->map_source) -
           priv->viewport_size.height / 2.0;
     }
   else
@@ -942,7 +944,8 @@ champlain_view_center_on (ChamplainView *view,
       if ( priv->anchor.y < 0 )
         priv->anchor.y = 0;
 
-      max = champlain_zoom_level_get_width (priv->map->current_level)*256 - //XXX
+      max = champlain_zoom_level_get_width (priv->map->current_level) *
+          champlain_map_source_get_tile_size (priv->map_source) -
           (G_MAXINT16 / 2);
       if (priv->anchor.x > max)
         priv->anchor.x = max;