[OSM-dev] [OSM] Informations about osmarender for Google SoC

Frederik Ramm frederik at remote.org
Sun Mar 23 17:18:56 GMT 2008


>> 2) There should be some way to add/remove/edit styles. My idea is to let
>>    the user select from a list of the real CSS names and/or select from a
>>    "modified name" (eventually hierarchical.. i.e. "stroke-width" becomes
>>    "width" under menu "stroke", with some associated help tip)
>    Osmarender can use the full power and extent of CSS, including cascading
>    style definitions.  Any CSS editor would need to be quite complex and very
>    comprehensive.  That's why I think starting with a good existing CSS
>    editor would be a good idea.

If you do write something that edits/emits CSS, then think about going
beyond cascading stylesheets. We have this problem now that certain
interdependent values have to be specified explicitly in many places,
and editing this is more difficult than it should be.

For example, a road is usually determined by two lines, the "casing"
line and the "core" line, with the "casing" being black and a bit
thicker than "core", and the "core" drawn in the desired highway
colour on top of the "casing"; this achieves the visual effect of a
road with a black border. Now, if you want to make the road wider on
the map, you have to remember to change both the core stroke width and
the casing stroke width. And there may be additional style definitions
for bridge or tunnel casings for this kind of road, all of which you
have to change. It would be great to be able to say something like

.highway-unclassified-core { stroke-width: 1*$highway_unclassified_width }
.highway-unclassified-casing { stroke-width: 1.1*$highway_unclassified_width }

or so. (Unless some future version of the CSS standard is on track to
deliver this anyway?)


Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"

More information about the dev mailing list