Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for loading TFS layers based on min/max levels available in the s… #2331

Closed
wants to merge 6 commits into from
Next Next commit
Fix for loading TFS layers based on min/max levels available in the s…
…ource data without explicit levels set in the TFSLayer configuration in osgEarth.
Daniel Allen committed Sep 7, 2023

Verified

This commit was signed with the committer’s verified signature.
flaeppe Petter Friberg
commit 4158e674cce8d27c361e447f79340377d357f66f
13 changes: 13 additions & 0 deletions src/osgEarth/TFS.cpp
Original file line number Diff line number Diff line change
@@ -224,6 +224,19 @@ TFSFeatureSource::openImplementation()
{
fp->geoInterp() = options().geoInterp().get();
}

// If not overridden by the layer, use the TFS min/max levels
// Otherwise, only level 0 will ever be loaded
if (!options().minLevel().isSet())
{
setMinLevel(fp->getFirstLevel());
}

if (!options().maxLevel().isSet())
{
setMaxLevel(fp->getMaxLevel());
}

}
else
{