Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view



I'm looking for some good examples of using VectorTiles from Geoserver with an openlayer webmap. I'm just having a bit of difficulty understanding the Openlayer calls necessary. In particular, the {z} {x} {y} is throwing us off. The documentation around the openlayers method "ol.tilegrid.createXYZ"  has left me with lots of questions. I'm not sure what is returned from this method.

There seem to be a few ways that you can construct these and I'm interested in the tradeoffs.

const layer = new ol.layer.VectorTile({
    style: vectorStyle,
    //declutter: true,
    source: new ol.source.VectorTile({
        tileGrid: ol.tilegrid.createXYZ({maxZoom: 19}),
        format: new ol.format.MVT(),
        url: `https://<geoserver_host>/gwc/service/tms/1.0.0/${layer_name}@${matrix_set}@pbf/{z}/{x}/{-y}.pbf`,

ew VectorTileLayer({
      source: new VectorTileSource({
          '&copy; OpenStreetMap contributors, Who’s On First, ' +
          'Natural Earth, and',
        format: new TopoJSON({
          layerName: 'layer',
          layers: ['water', 'roads', 'buildings'],
        maxZoom: 19,
          '<a href="{z}/{x}/{y}.topojson?api_key=">{z}/{x}/{y}.topojson?api_key=' +

 Does openlayers have a community forum like Geoserver?

Users mailing list
[hidden email]