The only thing I see that's off about this example is that it doesn't specify a color. The CSS translator won't output <LineSymbolizer> elements unless there is a "stroke" property explicitly provided in the style. If you are adding it to either of your previous examples in this thread that shouldn't be a problem though.
-- David Winslow OpenGeo - http://opengeo.org/ On Mon, Apr 4, 2011 at 3:06 PM, Charles Galpin <[email protected]> wrote: > > On Apr 4, 2011, at 2:26 PM, David Winslow wrote: > > A rule like: > > *[data_type < 4] [data_type > 5] * > * > * > only matches when the data_type property is *both* less than 4 and greater > than 5. The CSS translator optimizes that out since it can't ever happen; > that's why you end up with an empty SLD. If you want to match when either > of these conditions is met, just separate them with a comma. > > > Doh, I knew it was going to be something simple (and stupid on my part). > > Before I do anything else stupid, this still mans I have to do something > like this if combining with different scale levels correct? > > [@scale < 1000000000] [@scale > 10000000] [data_type<4], > [@scale < 1000000000] [@scale > 10000000] [data_type>5] > { > stroke-width: 1; > } > [@scale < 1000000000] [@scale > 10000000] [data_type = 4] { > stroke-width: 1; > stroke-dasharray: 2 2; > } > > thanks, > charles > > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > On Mon, Apr 4, 2011 at 2:01 PM, Charles Galpin <[email protected]> wrote: > >> I'm having trouble with the CSS module. My ultimate goal is to filter out >> data with the attribute data_type = 5, and use a different style for >> data_type = 4 (while displaying a different line color based on >> congestion_level and then adjust line widths by scale) . >> >> If I use >> >> [data_type = 3],[data_type = 6],[data_type = 7] { >> stroke-width: 2; >> } >> >> [congestion_level = 'G'][data_type = 3], [congestion_level = >> 'G'][data_type = 6], [congestion_level = 'G'][data_type = 7]{ >> stroke: #008000; >> stroke-opacity: 0.5; >> stroke-linecap: butt; >> stroke-linejoin: miter; >> } >> >> I get expected results, but not if I do >> >> >> [data_type < 4] [data_type > 5] { >> stroke-width: 2; >> } >> >> [congestion_level = 'G'][data_type < 4] [data_type > 5] { >> stroke: #008000; >> stroke-opacity: 0.5; >> stroke-linecap: butt; >> stroke-linejoin: miter; >> } >> >> In this case no SLD is generated. I also can't use "data_type <> 4" >> either, but I get an exception for this so I'll file a bug. >> >> thanks, >> charles >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and >> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf >> _______________________________________________ >> Geoserver-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > > >
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
