Tiled Layers configuration¶
A couple of tiled layers need to be configured in GeoServer, before getting involved with the OGC-API Tiles.
Once logged on GeoServer GUI as an admin, click on Tile Layers
link from the Tile Caching section on the left menu.
If you already have cached layers, you can select them and remove them all.
Then, click on Add a new cached layer
link, and select topp:states
and nurc:Img_Sample
from the list of available layers.
Click on Configure selected layers with caching defaults
link and confirm. Then go back to the Tile Layers
link from the Tile Caching section on the left menu, you should have two layers listed now.
Raster layer configuration¶
Open the nurc:Img_Sample
layer configuration page, you’ll land on the layer configuration page, in the Tile Caching
section.
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.
Finally, click on Save
and the cached layer will been configured.
Vector layer configuration¶
Go back to “Tiled layers”, this time selecting topp:states
.
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.
Also make sure that ALL STYLES
is checked in Alternate Styles
area of the STYLES
section.
Remember to add WebMercatorQuad
to the configuration as well.