ImageLayer API change between 2.x & 3.7 #2861
-
|
Hi, I'm upgrading our product to the latest OSGEarth release. I've noticed that the constructors for ImageLayer have been removed and replaced by a static create() function. What's the intended way to construct an ImageLayer object and attach a tilesource now? For reference my previous code looked like this :
I see how setting the options directly on the layer should work, but not how to connect a tilesource. Any help is much appreciated, as I couldn't find anything about this in the upgrade notes, and trying different layer subtypes doesn't seem to provide the behaviour I want. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
I've looked at creating my own texture layer that overrides ImageLayer as per the osgearth_map example but this isn't a great solution due to our codebase relying heavily on the previous implementation. |
Beta Was this translation helpful? Give feedback.
-
|
The concept of the |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, no docs. It only remains in the SDK for legacy support. If you want to submit a PR to add a setTileSource() function, we'll merge it. |
Beta Was this translation helpful? Give feedback.
The concept of the
TileSourceis long deprecated, though you can use them using the backwards compatibility typesTileSourceImageLayerandTileSourceElevationLayer. These are both in theosgEarth::Contribnamespace.