On a CesiumWorldTerrain, I am using the CesiumUrlTemplateRasterOverlay component and enter https://tile.openstreetmap.org/{z}/{x}/{y}.png in the Template Url field. I am providing a valid User-Agent and Referer and I have confimed that I get a response from this url. However, the terrain is all uniformly blue.
I have tried both. When I try Geographic I can see some tiles, but they are misaligned and not overlapping correctly. I am unsure of how the component works in relation to the GeoReference. If I set an origin, will it offset the component?
I did some research. Please try {z}/{x}/{reverseY}.png
And the projection is Web Mercator.
Since I have no access to OpenStreetMap in my country, I can not verify it.
Please let me know. Thank you.
First, We need to find out what template parameters are supported by the newly added CesiumUrlTemplateRasterOverlay in V2.13.0. The answer is in the CesiumUrlTemplateRasterOverlay.h located in CesiumForUnreal\Source\CesiumRuntime\Public. You can see that it supports template parameters such as {x}, {y}, {z}, {reverseX}, {reverseY}, {reverseZ}, etc. There are also some parameters that can be specified in the Editor.Pay attention to the meaning of each parameter in the comments.
Secondly,I found this website ,https://a.tile.osm.org/ {z}/{x}/{y}.png, that I can access in my country, yet the website is a JS access Way. It is also a type of OpenStreemMap map. Then,I accessed “https://a.tile.osm.org/0/0/0.png”in web browser, and saw one map tile of the image of the whole world.So, the Projection is Web Mercator.
Thirdly, I set the Template Url of CesiumURlTemplate RasterOverlay in Unreal to “https://a.tile.osm.org/{z}/{x}/{y}.png”. Run it, and look the RasterOverlay from a faraway place. I saw that the direction of longitude change(x axis) is normal, but the direction of latitude change(y axis) is in a mess. I realized that I should try to turn y into reverseY. And it worked.