Platform: iOS
Mapbox SDK version:master(3c91b6b)
Hi, I'm experiencing a bug where updating a layer filter (setting the NSPredicate in iOS) fails to update (or invalidate) a source that's currently not visible, causing it to show with the old filter when re-appering.
Given a MGLVectorSource with minzoom=maxzoom=9 and a MGLLineStyleLayer with minzoom=9, maxzoom=13 and a filter/predicate A.
I found that in the void Style::relayout() tiles are only reloaded if the source is enabled which according to the comment is when "the source is used by any layers visible at the current zoom level". Removing the && source->baseImpl->enabled-part of the if-statement (i.e. reverting part of 9127299 "don't load tiles from sources that aren't used") does solve my issue.
Maybe @kkaefer have some ideas?
Thanks for the detailed replication steps and diagnosis @jonkan -- you were exactly right. I've opened a pull request to fix this issue.
Most helpful comment
Thanks for the detailed replication steps and diagnosis @jonkan -- you were exactly right. I've opened a pull request to fix this issue.