{"action":"created","issue":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/500","labels_url":"https://api.github.com/repos/cmv/cmv-app/issues/500/labels{/name}","comments_url":"https://api.github.com/repos/cmv/cmv-app/issues/500/comments","events_url":"https://api.github.com/repos/cmv/cmv-app/issues/500/events","html_url":"https://github.com/cmv/cmv-app/pull/500","id":126561994,"number":500,"title":"Added support to add & remove layer(s) from the Layer Control","user":{"login":"AlexThomasEOG","id":16545060,"avatar_url":"https://avatars.githubusercontent.com/u/16545060?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexThomasEOG","html_url":"https://github.com/AlexThomasEOG","followers_url":"https://api.github.com/users/AlexThomasEOG/followers","following_url":"https://api.github.com/users/AlexThomasEOG/following{/other_user}","gists_url":"https://api.github.com/users/AlexThomasEOG/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexThomasEOG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexThomasEOG/subscriptions","organizations_url":"https://api.github.com/users/AlexThomasEOG/orgs","repos_url":"https://api.github.com/users/AlexThomasEOG/repos","events_url":"https://api.github.com/users/AlexThomasEOG/events{/privacy}","received_events_url":"https://api.github.com/users/AlexThomasEOG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"btfou","id":4641297,"avatar_url":"https://avatars.githubusercontent.com/u/4641297?v=3","gravatar_id":"","url":"https://api.github.com/users/btfou","html_url":"https://github.com/btfou","followers_url":"https://api.github.com/users/btfou/followers","following_url":"https://api.github.com/users/btfou/following{/other_user}","gists_url":"https://api.github.com/users/btfou/gists{/gist_id}","starred_url":"https://api.github.com/users/btfou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btfou/subscriptions","organizations_url":"https://api.github.com/users/btfou/orgs","repos_url":"https://api.github.com/users/btfou/repos","events_url":"https://api.github.com/users/btfou/events{/privacy}","received_events_url":"https://api.github.com/users/btfou/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cmv/cmv-app/milestones/6","html_url":"https://github.com/cmv/cmv-app/milestones/v1.4.0","labels_url":"https://api.github.com/repos/cmv/cmv-app/milestones/6/labels","id":1214224,"number":6,"title":"v1.4.0","description":"","creator":{"login":"tmcgee","id":200780,"avatar_url":"https://avatars.githubusercontent.com/u/200780?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcgee","html_url":"https://github.com/tmcgee","followers_url":"https://api.github.com/users/tmcgee/followers","following_url":"https://api.github.com/users/tmcgee/following{/other_user}","gists_url":"https://api.github.com/users/tmcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgee/subscriptions","organizations_url":"https://api.github.com/users/tmcgee/orgs","repos_url":"https://api.github.com/users/tmcgee/repos","events_url":"https://api.github.com/users/tmcgee/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgee/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":17,"state":"open","created_at":"2015-07-18T17:04:12Z","updated_at":"2016-01-14T16:03:20Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-01-14T02:15:13Z","updated_at":"2016-01-14T19:49:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cmv/cmv-app/pulls/500","html_url":"https://github.com/cmv/cmv-app/pull/500","diff_url":"https://github.com/cmv/cmv-app/pull/500.diff","patch_url":"https://github.com/cmv/cmv-app/pull/500.patch"},"body":"//add new layer\r\nfunction _setupSampleLayer(args) {\r\nvar layer = args.layer;\r\nvar target = args.target;\r\nlayer.setVisibility(true);\r\nlayer.opacity = 1;\r\nfor (var i = 0; i < 8; i++) {\r\nvar eLayerInfo = layer.layerInfos[i];\r\neLayerInfo.defaultVisibility = true\r\n}\r\n};\r\nfunction _loadSampleLayer() {\r\nvar imageParameters = new esri.layers.ImageParameters();\r\nimageParameters.layerIds = [0,1,2,3,4,5,6,7];\r\nimageParameters.layerOption =\r\nesri.layers.ImageParameters.LAYER_OPTION_SHOW;\r\nvar layer = new\r\nesri.layers.ArcGISDynamicMapServiceLayer(\"http://<server>/arcgis/rest/services/<service>/MapServer\",\r\n{id: \"MyMapService\",\r\nvisible : true,\r\nimageParameters : imageParameters\r\n}\r\n);\r\nlayer.on(\"load\", function(args) {\r\n_setupSampleLayer(args);\r\n});\r\nlayer.on(\"error\", function(args) {\r\ndebugger;\r\n});\r\nthis.app.map.addLayer(layer);\r\nthis.app.map.on(\"layer-add-result\", function(args) {\r\nvar layer = args.layer;\r\nvar error = args.error;\r\nvar layerInfo = {\r\ntitle : \"My Sample Title\",\r\ntype : \"dynamic\",\r\nlayer : layer\r\n}\r\ndojo.publish('layerControl/addLayerControls', [[layerInfo]]);\r\n});\r\n}\r\n\r\n//remove layer\r\ndojo.publish(\"layerControl/removeLayerControls\", [[\"My Sample Title\"]])"},"comment":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/comments/171758597","html_url":"https://github.com/cmv/cmv-app/pull/500#issuecomment-171758597","issue_url":"https://api.github.com/repos/cmv/cmv-app/issues/500","id":171758597,"user":{"login":"tmcgee","id":200780,"avatar_url":"https://avatars.githubusercontent.com/u/200780?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcgee","html_url":"https://github.com/tmcgee","followers_url":"https://api.github.com/users/tmcgee/followers","following_url":"https://api.github.com/users/tmcgee/following{/other_user}","gists_url":"https://api.github.com/users/tmcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgee/subscriptions","organizations_url":"https://api.github.com/users/tmcgee/orgs","repos_url":"https://api.github.com/users/tmcgee/repos","events_url":"https://api.github.com/users/tmcgee/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgee/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T19:49:12Z","updated_at":"2016-01-14T19:49:12Z","body":"@AlexThomasEOG I see you've adapted the new code to match our code style rules per the travis build process. Much thanks for that extra effort. Looks like the PR is ready to merge.\r\n\r\n@btfou: What do you think of these enhancements to LayerControl widget?"}}