简体   繁体   中英

how to get style from layer in geoserver

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM