I'm using QGIS and QField and I have a local directory containing XYZ tiles in the same directory as the project file. If I put the absolute path like that as URL, it works fine:
- file:///home/me/project/tile/{z}/{x}/{y}.png
But, when I synchronize the tiles to QField on my cell phone, the path of all that changes.
So, I've naively tried those solutions (the project file is in /home/me/project/my.qgz):
- file://tile/{z}/{x}/{y}.png
- file://./tile/{z}/{x}/{y}.png
- file:tile/{z}/{x}/{y}.png
- file://@project_folder/tile/{z}/{x}/{y}.png
- file://[% @project_folder %]/tile/{z}/{x}/{y}.png
But none worked.
Any idea how I could have file URLs relative to the project path or if I can use variables, in there?