{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2229","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-js","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2229/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2229/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2229/events","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/2229","id":139185886,"number":2229,"title":"map.setFilter('layer1', [somefilter]) will affect other layers with the same data source if they are not visible in saved studio style","user":{"login":"mollymerp","id":2425307,"avatar_url":"https://avatars.githubusercontent.com/u/2425307?v=3","gravatar_id":"","url":"https://api.github.com/users/mollymerp","html_url":"https://github.com/mollymerp","followers_url":"https://api.github.com/users/mollymerp/followers","following_url":"https://api.github.com/users/mollymerp/following{/other_user}","gists_url":"https://api.github.com/users/mollymerp/gists{/gist_id}","starred_url":"https://api.github.com/users/mollymerp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollymerp/subscriptions","organizations_url":"https://api.github.com/users/mollymerp/orgs","repos_url":"https://api.github.com/users/mollymerp/repos","events_url":"https://api.github.com/users/mollymerp/events{/privacy}","received_events_url":"https://api.github.com/users/mollymerp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/docs","name":"docs","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-08T05:32:19Z","updated_at":"2016-03-08T18:42:40Z","closed_at":null,"body":"<!--\r\nHello! Thanks for contributing. To help us diagnose your problem quickly, please:\r\n\r\n - include a link to a minimal demonstration of the bug; we recommend using https://jsbin.com\r\n - ensure you can reproduce the bug using the latest release\r\n - only post to report a bug or request a feature; direct all other questions to https://stackoverflow.com/questions/tagged/mapbox-gl-js\r\n-->\r\n\r\n**mapbox-gl-js version**: 0.14.0 (problem might exist in 0.15.0 too, but #2228 prevents testing)\r\n\r\n### Steps to Trigger Behavior\r\n\r\n 1. load 2 separate layers with the same data source in a studio map, set one of the layers to opacity 0\r\n 2. filter visible layer in using gl-js using `map.setFIlter()`\r\n 3. check filter of both layers using `map.getFilter()`-- you will see that the filter has been applied to the second layer erroneously\r\n\r\nexample [here](https://jsfiddle.net/gjpeyewd/3/)\r\n\r\n### Expected Behavior\r\n`map.setFilter()` only applies filter to the layer specified in the first argument\r\n### Actual Behavior\r\n`map.setFilter()` will affect other layers with the same data source if they are set to opacity 0 in studio"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/193909268","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/2229#issuecomment-193909268","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2229","id":193909268,"user":{"login":"lucaswoj","id":281306,"avatar_url":"https://avatars.githubusercontent.com/u/281306?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaswoj","html_url":"https://github.com/lucaswoj","followers_url":"https://api.github.com/users/lucaswoj/followers","following_url":"https://api.github.com/users/lucaswoj/following{/other_user}","gists_url":"https://api.github.com/users/lucaswoj/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaswoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaswoj/subscriptions","organizations_url":"https://api.github.com/users/lucaswoj/orgs","repos_url":"https://api.github.com/users/lucaswoj/repos","events_url":"https://api.github.com/users/lucaswoj/events{/privacy}","received_events_url":"https://api.github.com/users/lucaswoj/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T18:42:40Z","updated_at":"2016-03-08T18:42:40Z","body":"I'm not seeing any actionable follow-ups here. The `ref` property is clearly documented [here](https://www.mapbox.com/mapbox-gl-style-spec/#layer-ref). Let's turn this into an upstream issue on Studio. "}}