首页 文章

如何从geoserver中的图层获取样式

提问于
浏览
1

我想从sql视图层获得样式(sld或css无关紧要,但更喜欢css),但我无法实现这一点 . 这是我的图层的SQL视图

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

这是我的风格:

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

当我预览图层时,我收到以下错误:

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.

有没有办法从数据库中获取样式信息?

1 回答

  • 0

    我不认为这是可能的(正如您的问题所支持) . 您当然可以从数据库中读取单个值,并在样式中允许表达式的任何位置使用它们 .

相关问题