I'm using MapBox as a basemap, and the GeoServer Printing Extension for printing this and some layers out of GeoServer.

I now have it working for the old MapBox API (with URLs like https://a.tiles.mapbox.com/v4/EXAMPLE.EXAMPLE/{z}/{x}/{y}.png, but it seems that the GeoServer Printing Extension doesn't like handling tile URLs without an extension, like the new MapBox API uses, e.g, https://api.mapbox.com/styles/v1/EXAMPLE/EXAMPLE/tiles/{z}/{x}/{y}. The GeoServer Printing Extension really wants an extension. Leaving the extension blank doesn't work, as it still puts a dot on there.

So, my question is, can the GeoServer Printing Extension handle a XYZ tile service without an extension, or is there a way to add an extension to the new MapBox API?


I solved this by using the XYZ layer type. This can take the optional path_format which I configured like this:

path_format = '${z}/${x}/${y}'

and that builds the proper URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.