Hi,

I am struggling with the MBStyle extension. I only want to use it to filter the data from the database to reduce the size of the delivered vector tiles.

Therefore i copy the style from the client to geoserver and apply it to the data source layers, so that no unnecessary data is transferred.

The idea works fine, if i only have a single layer in the style document.

But when i use multiple layers, strange things happen.

It may happen that data ist not filtered, even if there is a filter applied to a layer. But the most important thing is that data is not delivered at all, if it is not listed at the top of the layers array (which should, as the spec says, be the bottom layer of my map).


The attached example has the behaviour that the roads layer is not served (buildings work). If i remove the buildings layer, roads layer starts to work.

If i move the roads layer on top of the buildings layer, the roads layer works. If i set the "visible" property of the buildings layer to "hidden", the roads layer work.


To conclude, it seems the the extension can only handle a single layer properly, or am i doing something terribly wrong?


Thanks for ideas and answers,

Johannes



{
  "version": 8,
  "name": "Empty Style",
  "metadata": {"maputnik:renderer": "mbgljs"},
  "center": [50.73926, 7.11514],
  "zoom": 14,
  "sources": {
    ...
  },
  "sprite": "",
  "glyphs": "https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf";,
  "layers": [
    {
      "id": "buildings",
      "type": "fill",
      "source": "buildings",
      "source-layer": "vector_osm_buildings",
      "minzoom": 22,
      "maxzoom": 24,
      "layout": {"visibility": "visible"},
      "paint": {
        "fill-color": {
          "stops": [
            [11, "rgba(210, 208, 208, 0)"],
            [19, "rgba(203, 203, 203, 1)"]
          ]
        },
        "fill-outline-color": {
          "stops": [
            [10, "rgba(189, 189, 189, 0)"],
            [19, "rgba(189, 189, 189, 1)"]
          ]
        },
        "fill-opacity": 0.5
      }
    },
    {
      "id": "roads outline",
      "type": "line",
      "source": "roads",
      "source-layer": "vector_osm_roads",
      "minzoom": 11,
      "maxzoom": 24,
      "filter": [
        "any",
        [
          "in",
          "type",
          "primary",
          "secondary",
          "tertiary",
          "residential",
          "unclassified"
        ]
      ],
      "layout": {
        "visibility": "visible",
        "line-cap": "round",
        "line-join": "miter"
      },
      "paint": {
        "line-color": "rgba(61, 61, 61, 1)",
        "line-blur": 1,
        "line-width": 3,
        "line-opacity": {"stops": [[11, 0], [19, 1]]}
      }
    },

  ],
  "id": "7v910ggmu"
}

--
Dipl.-Geogr. Johannes Weskamm
  — Anwendungsentwickler —

  terrestris GmbH & Co. KG
  Kölnstraße 99
  53111 Bonn

  Tel: +49 (0)228 / 96 28 99 -51
  Fax: +49 (0)228 / 96 28 99 -57

  Email: wesk...@terrestris.de
  Web: https://www.terrestris.de

  Amtsgericht Bonn, HRA 6835
  Komplementärin: terrestris Verwaltungsgesellschaft mbH
  vertreten durch: Torsten Brassat, Marc Jansen
Informationen über Ihre gespeicherten Daten finden Sie auf
  unserer Homepage unter folgendem Link:
  https://www.terrestris.de/datenschutzerklaerung/



_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to