How to temporarily hide / show layers #2988
Answered
by
bclay1297
bclay1297
asked this question in
Support Q&A
|
How to temporarily hide layers from the map to help declutter other layers. Some layers are image layers and others are feature layers. |
Answered by
bclay1297
Jul 21, 2026
Replies: 5 comments 1 reply
layer->setVisible(false); |
1 reply
|
No cast necessary; |
0 replies
|
I am using getLayerByName which is osgEarth::Layer in this routine.
setVisible is not a member of osgEarth::Layer.
Similar problems rise from the Feature side. I could get the output of the
FeatureCursor used for filtering to go into the FeatureModelLayer.
so there is no setVisible on that side
…On Mon, Jul 20, 2026 at 5:16 PM Glenn Waldron ***@***.***> wrote:
No cast necessary; setVisible is a member of VisibleLayer.
The hierarchy is Layer > VisibleLayer > TileLayer > ImageLayer >
GDALImageLayer
—
Reply to this email directly, view it on GitHub
<#2988?email_source=notifications&email_token=ADNLDTSQY3E2KPAN3K4IBU35F2D4LA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGA3DMMJZUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-17706619>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADNLDTVGB33JNIT5FGMM6TT5F2D4LAVCNFSNUABFKJSXA33TNF2G64TZHM4TAMJSG43TWRDJONRXK43TNFXW4OZRGA2DMMZXGY3KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ADNLDTT2N2AKZHQGV33OEP35F2D4LA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGA3DMMJZUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/ADNLDTSBVX5ZYHIVIX6D4YD5F2D4LA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZXGA3DMMJZUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
0 replies
|
auto visibleLayer = map->getLayerByName<VisibleLayer>("name");This will work an any layer type that derives from |
0 replies
|
That seems to work properly in my app for images but not for features presumabley because I cannot get them in a FeatureModelLayer |
0 replies
Answer selected by
bclay1297
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That seems to work properly in my app for images but not for features presumabley because I cannot get them in a FeatureModelLayer
I will open a separate query for that issue