Vector tiles not marked "dirty" if theme rules produce nothing

Started by Viajero Perdido, July 05, 2015, 05:03:30

0 Members and 1 Guest are viewing this topic.

Viajero Perdido


In the course of tinkering with my own derivative of the excellent Voluntary UK theme, I've come across something of an "edge case" in the way Locus renders vector tiles.  Where I live (western Alberta, Canada), at medium zoom levels (10-11 typically), there are vector tiles where the rules produce nothing at all.  Simply blank space.

Unfortunately, that means Locus won't draw *anything* there, most noticeably, there'll be a big square hole where terrain shading would normally be.  Or a square hole containing a view into the previous theme that was recently shown, since nothing was painted over it, oops.

For unknown reasons, this happens only with OpenAndroMaps (I tested two generations), not Locus nor MapsForge maps.

It's noticeable in Voluntary UK if you select City and visit an "empty quarter" of the map.  That's because the City sub-theme doesn't draw contours at zooms below 11.  Perfectly valid logic.  (My version didn't draw contours below 11 for any sub-theme as an attempt at optimization, which is how I noticed it.)  In those empty spaces on the map, a few contour lines are all it takes to mark the tiles as dirty and cause them to draw properly.

(Actually, in OAM those empty tiles aren't perfectly empty; they have a background colour, whereas Locus and MapsForge maps appear to just use white in spite of my attempts to produce a colour.  But for the purpose of this report, that background colour still counts as empty, meaning, no dirty, no paint.)

It's hardly worth a bug report (if it even counts as a bug), but I thought people - such as theme authors - might like to know.  And if anybody knows of a cleaner way to mark a tile as dirty from within a theme without actually drawing something, I'd be happy to hear about it.

Thanks for listening,