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.

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

4

1 回答 1

0

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

于 2018-11-26T15:03:07.397 回答