I'm having trouble getting a mapbox XYZ layer to work with the Geoserver Print plugin - I just get the following error:
spec.layers[0].baseURL has an invalid value
and a bit further down:
Illegal character in path at index 79
My URL is like as so (some parts redacted for privacy):
https://api.mapbox.com/styles/v1/*********/*************************/tiles/256/{z}/{x}/{y}?access_token=ACCESS_TOKEN
I assumed that the illegal character might be the curly brace, but of course this is required in the URL.
If I remove this layer, the print works correctly.
The layer is added to the spec using this object:
{
type: "XYZ",
baseURL: XYZ, //the url shown above
extension: "png",
maxExtent: [0, 0, 700000, 1300000],
tileSize: 256,
resolutions: [resolutions], //current map resolution, i.e [40]
path_format: '${z}/${x}/${y}'
}
I have also added the host to the whitelist in the yaml config:
hosts:
- !dnsMatch
host: api.mapbox.com
Geoserver Version: 2.13.0
Has anyone had any success getting this to work?