X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fobjects%2Fgrits-tile.c;h=f536c96d496fd99d4f04cfbafdaf668f8745db59;hb=e3c32e852b06ab6e1cea08f4860f3c469bea9cde;hp=736e374df12812826bb053e30357994c72fe1267;hpb=15ca6dd92b998d8e75087b8257c6df9e56cca82f;p=grits diff --git a/src/objects/grits-tile.c b/src/objects/grits-tile.c index 736e374..f536c96 100644 --- a/src/objects/grits-tile.c +++ b/src/objects/grits-tile.c @@ -126,6 +126,7 @@ static gboolean _grits_tile_precise(GritsPoint *eye, GritsBounds *bounds, * (yet?) test if the tile would be drawn */ gdouble scale = eye->elev / min_dist; view_res /= scale; + view_res *= 1.8; //view_res /= 1.4; /* make it a little nicer, not sure why this is needed */ //g_message("tile=(%7.2f %7.2f %7.2f %7.2f) " // "eye=(%9.1f %9.1f %9.1f) " @@ -215,14 +216,17 @@ void grits_tile_update(GritsTile *tile, GritsPoint *eye, return; } - /* Need more resolution, split tile and update recursively */ - if (!tile->children[0][0]) { - switch (tile->proj) { - case GRITS_PROJ_LATLON: _grits_tile_split_latlon(tile); break; - case GRITS_PROJ_MERCATOR: _grits_tile_split_mercator(tile); break; + /* Split tile if needed */ + grits_tile_foreach(tile, child) { + if (child == NULL) { + switch (tile->proj) { + case GRITS_PROJ_LATLON: _grits_tile_split_latlon(tile); break; + case GRITS_PROJ_MERCATOR: _grits_tile_split_mercator(tile); break; + } } } + /* Update recursively */ grits_tile_foreach(tile, child) { GRITS_OBJECT(child)->hidden = FALSE; grits_tile_update(child, eye, res, width, height,