Hello,
I'm trying to add a TMS layer in Cesium that require a custom argument to work correctly.
This custom argument is a key so that the url would look something like this :
http://{url}/{z}/{x}/{y}.{fileExtension}?key=mySecretKey
Is there a way to add some custom argument at the end of the request ?
Thanks,
Olivier
Hi Olivier,
This can be done by abusing the fileExtension property:
var provider = new Cesium.TileMapServiceImageryProvider({
url : ‘your url’,
fileExtension : ‘png?key=mySecretKey’
});
Longer term, there will be a UrlTemplateImageryProvider that can do this without hackery. Keep an eye on this pull request:
https://github.com/AnalyticalGraphicsInc/cesium/pull/2709
Kevin