how to get style from layer in geoserver

571 Views Asked by At

I would like to get style (sld or css does not matter, but prefer css) from sql view layer but I couldn' t achieve this. here is my sql view for layer

select 
    value,
    location,
    'mark: symbol(square);mark-size: 6px;:mark {fill: #0099cc;}' STYLE
from TABLE t

And here is my style:

/* @title point */
* {
    [STYLE]
}

When I preview the layer I get following error:

org.parboiled.errors.ParserRuntimeException: Error at line 3. Encountered "<EOF>" at line 1, column 5. Was expecting one of: "(" ... ":" ... <IDENTIFIER> ... "." ... "not" ... "in" ... "tequals" ... "before" ... "after" ... "during" ... "*" ... "/" ... "+" ... "-" ... "like" ... "ilike" ... "exists" ... "does-not-exist" ... "is" ... "between" ... "=" ... ">" ... "<" ... ">=" ... "<=" ... "<>" ... Parsing : STYLE.

Is there any way to get style information from database ?

1

There are 1 best solutions below

2
On

I don't think it is possible (as is supported by your issue). You can of course read individual values from the database and use them wherever an expression is allowed in the style.