[OSM-talk] What to display on the slippy maps - another approach
David Earl
david at frankieandshadow.com
Fri Feb 16 11:47:17 GMT 2007
In discussing what osmarender should or shouldn't display, there's a
continual compromise between a desire for the detail and cluttering the map.
The tiles are pre-rendered for efficiency in the slippy map. But most of
this is to do with lines and areas.
But how about this: have the tiles rendered with all areas (*all* areas) and
lines (highways etc.) as thought fit, and selective nodes (e.g. places). But
leave all the other nodes off.
Then on the slippy map, add the node icons and names dynamically on top.
Placing some tiny and cached transparent background prerenderd gifs(*) for
the icons will be much more efficient than a complete dynamic rendering of
an area. Placing icons can also be done lazily so that if someone moves the
map, we can cancel the overlaying for tiles which go off the area.
Furthermore, the text by an icon can be rendered in a wrapped fashion so it
goes in a box shape rather than the many long single lines of text
disappearing off to the right as now.
Most important of all though is that what is displayed can then be
controlled through a user interface on the same page (check boxes, pull down
menus, whatever), that allow e.g. all amenities to be displayed or not, or
just certain ones, like pubs (why *have* pubs always had preferential
treatment to date? OK, no need to answer that one). The selection could be
remembered in a cookie so the user can control clutter vs. detail.
What about layer values? I think we could safely ignore them here. If an
area is in a higher layer than a node, the node effectively becomes
invisible and therefore pointless.
The overlaid nodes could be generated live from the database, but more
likely could sit cached alongside the tile cache perhaps referenced relative
to their containing tile rather than by lat/long for efficient display.
I wonder if this also offers an answer to osmarender's difficulty with
clipped street names. One of the user selection could be to overlay text for
incomplete street names (in lines rather than at an angle, at the centre
point or end of a street (placed in the node cache along with the genuine
nodes).
If the API to the tile cache could incorporate this too, there would be a
much simpler way for people to gather maps tailored to their information
requirements than editing control files and downloading map generation
software.
David
(*) they'd have to be gifs not pngs for now unfortunately because IE6
doesn't render the transparency in pngs. IE7 does, but it will be a long
time before this is widespread enough.
More information about the talk
mailing list