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

filterCache[layerId] is not a function in 6.1.0 #261

Closed
MichalK6677 opened this issue Mar 23, 2020 · 4 comments · Fixed by #262
Closed

filterCache[layerId] is not a function in 6.1.0 #261

MichalK6677 opened this issue Mar 23, 2020 · 4 comments · Fixed by #262

Comments

@MichalK6677
Copy link

Example with 6.1.0
https://codesandbox.io/s/cluster-6ie41
There is an error "filterCache[layerId] is not a function".

It works with 6.0.1
https://codesandbox.io/s/cluster-wqgdq

@MichalK6677
Copy link
Author

MichalK6677 commented Mar 24, 2020

It seems it's because "@mapbox/mapbox-gl-style-spec": "^13.11.0". It installs 13.13.0 and there is a breaking change in:
https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/feature_filter/index.js

And create filter return value is changed:
image

Workaround for now:
force installation of 13.11.0 in package.json

@PacoDu
Copy link

PacoDu commented Mar 24, 2020

I'm facing the same error, thanks for the workaround !

@ahocevar
Copy link
Member

Thanks for your research @MichalK6677, with this information it was easy to fix the issue. See #262.

@ZakarFin
Copy link

ZakarFin commented Apr 2, 2020

Just for someone googling we got hit by this using 5.0.2 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants