MapFish:print样式不适用

时间:2018-01-11 16:16:43

标签: mapfish

我正在尝试构建一个可以应用于混合众所周知的文本类型的MapFish样式

示例功能

{
  "geometry": {
    "type": "LineString",
    "coordinates": [...],
  "properties": {
    "Name": "KN",
    "id": "5a002a8e9ee4e84a3c125067",
    "geoType": "LineString",
    ...
  },
  "profile":{...}
  "type": "Feature"
},

我正在应用这种风格

{
    "version": "2",
    "[geoType IN ('LineString', 'MultiLineString', 'Curve', 'MultiCurve', 'CompoundCurve')]": {
        "symbolizers": [{
            "type": "Line",
            "strokeColor": "#000080",
            "strokeOpacity": "0.65",
            "strokeWidth": "5.0"
        }]
    },
    "[geoType IN ('Polygon', 'MultiPolygon', 'Triangle', 'CircularString', 'CurvePolygon')]": {
        "symbolizers": [{
            "type": "Line",
            "strokeColor": "#000080",
            "strokeOpacity": "0.65",
            "strokeWidth": "5.0"
        }, {
            "type": "polygon",
            "strokeColor": "#000080",
            "strokeOpacity": "0.65",
            "strokeWidth": "5.0",
            "fillColor": "#000080",
            "fillOpacity": "0.65"
        }]
    },
    "[geoType IN ('Point', 'MultiPoint')]": {
        "symbolizers": [{
            "type": "point",
            "pointRadius": "20",
            "graphicName": "circle",
            "graphicWidth": "20",
            "strokeColor": "#000080",
            "strokeOpacity": "0.65",
            "strokeWidth": "5.0",
            "fillColor": "#000080",
            "fillOpacity": "0.65"
        }]
    }
}

它没有抛出任何错误,打印完成但是当我从GeoJSON中得不到任何东西时

关于我出错的任何指示?

1 个答案:

答案 0 :(得分:0)

问题是Profile属性,不确定原因,但是如果你的GeoJson在节点mapfish的根目录中有任何额外的属性就不会处理它