I pasted this code into osgearth_map.cpp and saw the bad behavior when running it.
Notice that the elevation layer fails, although it was configured identically to the image layer. Debugging, it seems that the URL property from the TMS Elevation Layer does not carry into the TMS Image Layer that it creates in TMSElevationLayer::openImplementation(). I would have expected that after the new TMSImageLayer in this function that the URL would be set properly, but it is not.
This was noticed because in the last month or two we noticed that the TMS elevation layers in SIMDIS no longer load with osgEarth master, but they appear to be loading properly in https://github.com/gwaldron/osgearth/commit/9f2581a45 -- so it appears to have broken between then and now.
Expected behavior
Expect in the code above that tmsElev->open() returns success.
Screenshots
N/A, all code driven
Desktop (please complete the following information):
Release and debug on MSVC 2022
Additional context
If URL does not copy over, perhaps there are other fields specific to TMS that also do not copy over when initializing the image layer. So I did not attempt to fix myself with a targeted fix on URL.
It appears to be working if you load through a .earth file however. Perhaps this is due to the XML configuration being filled out when you go to create the TMS image layer.
Describe the bug
TMSElevationLayer::open()
fails programmatically. URL property does not carry forward to the TMS Image Layer under the hood.To Reproduce Run the following code block:
I pasted this code into
osgearth_map.cpp
and saw the bad behavior when running it.Notice that the elevation layer fails, although it was configured identically to the image layer. Debugging, it seems that the URL property from the TMS Elevation Layer does not carry into the TMS Image Layer that it creates in
TMSElevationLayer::openImplementation()
. I would have expected that after thenew TMSImageLayer
in this function that the URL would be set properly, but it is not.This was noticed because in the last month or two we noticed that the TMS elevation layers in SIMDIS no longer load with osgEarth master, but they appear to be loading properly in https://github.com/gwaldron/osgearth/commit/9f2581a45 -- so it appears to have broken between then and now.
Expected behavior Expect in the code above that
tmsElev->open()
returns success.Screenshots N/A, all code driven
Desktop (please complete the following information): Release and debug on MSVC 2022
Additional context If URL does not copy over, perhaps there are other fields specific to TMS that also do not copy over when initializing the image layer. So I did not attempt to fix myself with a targeted fix on URL.
It appears to be working if you load through a .earth file however. Perhaps this is due to the XML configuration being filled out when you go to create the TMS image layer.