Hello, 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({ attributions: '© OpenStreetMap contributors, Who’s On First, ' + 'Natural Earth, and openstreetmapdata.com', format: new TopoJSON({ layerName: 'layer', layers: ['water', 'roads', 'buildings'], }), maxZoom: 19, url: 'https://tile.nextzen.org/tilezen/vector/v1/all/{z}/{x}/{y}.topojson?api_key=' + key, }) Does openlayers have a community forum like Geoserver?
_______________________________________________ Users mailing list us...@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/openlayers-users