[Potlatch-dev] Stylesheets (Potlatch 2/Halcyon)

Jeffrey Warren warren at mit.edu
Mon Aug 3 17:54:17 BST 2009


Just saying hello from the Cartagen project; we're planning to alias
Cascadenik style names, if not pure CSS formatting. We use a JSON
format for somewhat expanded capabilities, but we give up a lot of
flexibility on naming selectors. I.e. we cannot use tag names that
include '=' or '.' or a wide range of other characters. JSON does
allow these to be used in quotations. (and JSON is part of core AS3, i
believe)

There was a good discussion on the scope of stylesheet selectors at
wherecamp 09 where there was some debate on whether or not a
separation of content and presentation was as clear cut with map
stylesheets. The consensus was 'not'.

Sorry to drone on but stylesheets are being used in more and more renderers
and some convergence (dare we say even standards!) would be great. Our GSS
usage page is here: http://wiki.cartagen.org/wiki/show/GssUsage.

That said, there are standards for style descriptions, though they're really
human-readable: http://www.opengeospatial.org/standards/sld

Best,
Jeff



> On Thu, Jul 23, 2009 at 1:40 AM, Richard Fairhurst <richard at
> systemed.net <http://lists.openstreetmap.org/listinfo/potlatch-dev>>wrote:


> I spent an hour or two looking at the Flash Camouflage CSS parser (

> http://flashartofwar.com/2009/02/05/camo

> ’s-css-parser/). It's pretty good, so the actual logistics of

> converting CSS to Halcyon's internal rendering engine aren't looking

> too hard.[1]

>

> What I'm still unsure about is what the selectors should describe.

>

> Option 1 is basically to write them as tests on OSM tags. So something

> like this:

>

> highway=primary,oneway=yes { color: red; }

> highway=motorway[z10-z15] { color: blue; width: 2px; }

>

> Option 2 is to separate the OSM tag parser from the CSS style names.

> So you'd have:

>

> primary_oneway { color: red; }

>

> and something somewhere else in the file would define that

> highway=primary,oneway=yes would use the primary_oneway style.

>

> Option 2 is more 'pure CSS'-like but is another layer of abstraction

> for people to get their heads around.

>

> I'm torn. Advice from wise folk would be welcome. :)

>



Do the simplest thing possible that works!


I'd go with tests on tags directly, you can always add extra syntax to

abstract them out later if you decide it's needed.


Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/potlatch-dev/attachments/20090803/4e000ec9/attachment.html>


More information about the Potlatch-dev mailing list