Below are the contents of a function node in a FlowFuse dashboard. A token has been provided to limit access to requests coming from the flowfuse instance editor URL. The URL in the function is referring to a WMTS.
It isn't working but I'm not sure if it is because the node-red worldmap cannot pass a token, this function isn't defined properly, or, there is an issue with the token. Looking at the Leaflet documentation it suggests replacing {y} with {-y} rather than setting tms:true.
Arcgis is WMS not TMS so you should be OK with {y}.
What errors do you get in the javascript console (maybe the network tab to see if it fails to get the tile etc)
At least the token seems to work as you are not being rejected.
Do you have another client that can get a map tile and compare the url ?
(EG maybe fix values for the x/y/z )
Normally I would check with QGIS but this token restricts the requests to be made from the flowfuse URL so I am limited in what I can do. I did query Leaflet in with an http flow with the same results. I also tested with this function which I have used on another dashboard for getting the layer names from the server. This doesn't return any layer names but doesn't throw any errors either which tells me the TOKEN is probably fine.
What x y z do you end up using ?
Can you setup a simple http request node to do the same request just for that tile... If that also gives 404 I still suspect you are out of range of your map tiles.
Yes, I have done that as well. Same 404 error. This works fine with other WMS, just wasn't sure if I was sending the token correctly. That part seems to work. If I put the token in an environment variable how would I configure that in the URL string?
Hi - I don't think so - I think Leaflet only has a few built in - see Leaflet docs - Documentation - Leaflet - a JavaScript library for interactive maps - and we don't expose those anyway. I think you may be better off trying to get Arcgis to serve them up on a different projection if you can.