Tiled Layers configuration

A couple of tiled layers need to be configured in GeoServer, before getting involved with the OGC-API Tiles. You might already have them, but just in case, here are the instructions to create them, if missing. In case you have them, make sure to add the “WebMercatorQuad” gridset to the set of supported tile matrixes, and the vector tiles formats for topp:states.

Raster layer

Once logged on GeoServer GUI as an admin, click on Tile Layers link from the Tile Caching section on the left menu.

../../_images/tile-layers.png

Then, click on Add a new cached layer link

../../_images/add-layers.png

From the list of selectable layers to be cached, check the box on the geosolutions:usa layer and then click on Configure selected layers with caching defaults link.

../../_images/add-cached-layer.png

Click Ok on the confirmation message and then go back to the Tile Layers link from the Tile Caching section on the left menu.

../../_images/tile-layers.png

Click on geosolutions:usa from the list of available tiled layers to configure it.

../../_images/tile-layer-config.png

From the layer configuration page, scroll at the very bottom of the page and add a grid subset, by selecting WebMercatorQuad from the drop down list and click on the + icon when done, to add it.

../../_images/gridset-selection.png

Finally, click on Save and the cached layer will been configured.

Vector layer

Repeat previous steps to configure a vector layer, this time selecting topp:states as tiled layer.

During the layer configuration, make sure to also select the application/json;type=geojson and application/vnd.mapbox-vector-tile from the Tile Image Formats list.

../../_images/tile-vector-format.png

Also make sure that ALL STYLES is checked in Alternate Styles area of the STYLES section.

../../_images/vector-styles.png