# Querying layer that is not visible

**URL:** <https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423>\
**Category:** WinForms\
**Created:** [February 15, 2024, 10:04am UTC](https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423 "2024-02-15T10:04:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [February 15, 2024, 10:04am UTC](https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423/1 "2024-02-15T10:04:03Z")

</div>

Hi,

We recently noticed that layers that should be hidden were still getting queried. That is our overriden GetFeaturesInsideBoundingBoxCore for example was getting called when layer.IsVisible == False or styling was restricted to different scales.

There was no problems with the layer being drawn as that was handled correctly.

We think it could, under certain circumstances, help performance by not doing an unnecessary query but we are not sure how best to get that information from inside the custom FeatureSource. Are there any existing methods that would help?

Regards,  
Jonathan

---

<div class="post-metadata">

**Author:** ![ThinkGeo\_Products](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/6de8d8/32.png) [@ThinkGeo\_Products](https://community.thinkgeo.com/u/ThinkGeo_Products)\
**Post date:** [February 15, 2024, 10:28pm UTC](https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423/2 "2024-02-15T22:28:53Z")

</div>

Hi Jonathan,

Thanks for your post - I think you make a good point. I can’t think of any reason not to make the change you describe. I’ll bring it up with the product team and they should add it to their list of requested features.

Regarding the GetFeaturesInsideBoundingBoxCore, what is triggering this? Is it triggered on a map Refresh(), or are you changing extent to trigger it?

Thanks,  
John

---

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [February 16, 2024, 8:47am UTC](https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423/3 "2024-02-16T08:47:59Z")

</div>

Hi John,

The way I have been testing is on zoom in / zoom out, so that does change the extent. But I think a refresh would do the same thing?

Regards,  
Jonathan

---

<div class="post-metadata">

**Author:** ![ThinkGeo\_Products](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/6de8d8/32.png) [@ThinkGeo\_Products](https://community.thinkgeo.com/u/ThinkGeo_Products)\
**Post date:** [February 16, 2024, 1:48pm UTC](https://community.thinkgeo.com/t/querying-layer-that-is-not-visible/10423/4 "2024-02-16T13:48:24Z")

</div>

Thanks Jonathan. I’ll let you know when the team start on this.
