{"action":"created","comment":{"url":"https://api.github.com/repos/mapseed/platform/pulls/comments/231281911","pull_request_review_id":172219058,"id":231281911,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTI4MTkxMQ==","diff_hunk":"@@ -433,21 +433,21 @@ export default (container, options) => {\n     ];\n   };\n \n-  const createVectorTileLayer = async ({\n-    id,\n-    url,\n-    style_url,\n-    source_layer,\n-  }) => {\n+  const createVectorTileLayer = async ({ id, url, layers, source_layer }) => {\n     sourcesCache[id] = {\n       type: \"vector\",\n       tiles: [url],\n     };\n     map.addSource(id, sourcesCache[id]);\n \n-    const style = await VectorTileClient.fetchStyle(style_url);\n+    // If layers is an array, assume we have a config-based set of mapbox\n+    // layers. Otherwise, assume we have a url to a remote-hosted mapbox\n+    // stylesheet.\n+    layers = Array.isArray(layers)\n+      ? layers\n+      : await VectorTileClient.fetchLayers(layers);\n \n-    layersCache[id] = style.layers.map(layer => {\n+    layersCache[id] = layers.map(layer => {\n       layer.source = id;\n       layer[\"source-layer\"] = source_layer;\n       return layer;","path":"src/base/static/libs/maps/mapboxgl-provider.js","position":29,"original_position":29,"commit_id":"eeb8faa07b73f8652743b96f820787ee78b89010","original_commit_id":"eeb8faa07b73f8652743b96f820787ee78b89010","user":{"login":"jalMogo","id":42042460,"node_id":"MDQ6VXNlcjQyMDQyNDYw","avatar_url":"https://avatars1.githubusercontent.com/u/42042460?v=4","gravatar_id":"","url":"https://api.github.com/users/jalMogo","html_url":"https://github.com/jalMogo","followers_url":"https://api.github.com/users/jalMogo/followers","following_url":"https://api.github.com/users/jalMogo/following{/other_user}","gists_url":"https://api.github.com/users/jalMogo/gists{/gist_id}","starred_url":"https://api.github.com/users/jalMogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalMogo/subscriptions","organizations_url":"https://api.github.com/users/jalMogo/orgs","repos_url":"https://api.github.com/users/jalMogo/repos","events_url":"https://api.github.com/users/jalMogo/events{/privacy}","received_events_url":"https://api.github.com/users/jalMogo/received_events","type":"User","site_admin":false},"body":"Not related to this PR, but we should fix this mutation of our `layer` config objects:\r\n\r\n```javascript\r\nlayers.map(layer => ({\r\n  ...layer,\r\n  source: id,\r\n  ['source-layer']: source_layer,\r\n}))\r\n```\r\n\r\nDoes that make sense?","created_at":"2018-11-06T20:35:10Z","updated_at":"2018-11-06T20:36:21Z","html_url":"https://github.com/mapseed/platform/pull/1073#discussion_r231281911","pull_request_url":"https://api.github.com/repos/mapseed/platform/pulls/1073","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mapseed/platform/pulls/comments/231281911"},"html":{"href":"https://github.com/mapseed/platform/pull/1073#discussion_r231281911"},"pull_request":{"href":"https://api.github.com/repos/mapseed/platform/pulls/1073"}}},"pull_request":{"url":"https://api.github.com/repos/mapseed/platform/pulls/1073","id":228554993,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NTU0OTkz","html_url":"https://github.com/mapseed/platform/pull/1073","diff_url":"https://github.com/mapseed/platform/pull/1073.diff","patch_url":"https://github.com/mapseed/platform/pull/1073.patch","issue_url":"https://api.github.com/repos/mapseed/platform/issues/1073","number":1073,"state":"open","locked":false,"title":"Support config-driven styling for vector tiles","user":{"login":"goldpbear","id":9222338,"node_id":"MDQ6VXNlcjkyMjIzMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/9222338?v=4","gravatar_id":"","url":"https://api.github.com/users/goldpbear","html_url":"https://github.com/goldpbear","followers_url":"https://api.github.com/users/goldpbear/followers","following_url":"https://api.github.com/users/goldpbear/following{/other_user}","gists_url":"https://api.github.com/users/goldpbear/gists{/gist_id}","starred_url":"https://api.github.com/users/goldpbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldpbear/subscriptions","organizations_url":"https://api.github.com/users/goldpbear/orgs","repos_url":"https://api.github.com/users/goldpbear/repos","events_url":"https://api.github.com/users/goldpbear/events{/privacy}","received_events_url":"https://api.github.com/users/goldpbear/received_events","type":"User","site_admin":false},"body":"Addresses: https://github.com/jalMogo/mgmt/issues/141\r\n\r\nAdd the ability to declare mapbox layers for vector tiles in the config. Previously, layers of type `vector-tile` required a url to a remotely-hosted list of layers to obtain their styling. Now we can declare those layers right in the config. This PR will make it easier to work on map styling changes required for data-intensive flavors like `palouse`.\r\n\r\nA useful future PR will be to refactor our layers of type `json` to follow the same pattern. Rather than declare special \"config layers\" which need to be converted to mapbox layers via special methods in `mapboxgl-provider`, we should just declare mapbox layers directly in the config. This will simplify our mapping abstraction and bring us closer to a common abstraction across products.\r\n\r\nThe only snag is how to deal with Place layers, which have unpredictable mapbox layer needs (because users have the ability to draw shapes and lines as well as place points). But we'll figure out a solution for that.","created_at":"2018-11-06T02:23:05Z","updated_at":"2018-11-06T20:36:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33a9ffc42f0e339e6bd042691df2a46740859eb4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapseed/platform/pulls/1073/commits","review_comments_url":"https://api.github.com/repos/mapseed/platform/pulls/1073/comments","review_comment_url":"https://api.github.com/repos/mapseed/platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapseed/platform/issues/1073/comments","statuses_url":"https://api.github.com/repos/mapseed/platform/statuses/eeb8faa07b73f8652743b96f820787ee78b89010","head":{"label":"mapseed:goldpbear/vector-tile-styling","ref":"goldpbear/vector-tile-styling","sha":"eeb8faa07b73f8652743b96f820787ee78b89010","user":{"login":"mapseed","id":7245803,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU4MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7245803?v=4","gravatar_id":"","url":"https://api.github.com/users/mapseed","html_url":"https://github.com/mapseed","followers_url":"https://api.github.com/users/mapseed/followers","following_url":"https://api.github.com/users/mapseed/following{/other_user}","gists_url":"https://api.github.com/users/mapseed/gists{/gist_id}","starred_url":"https://api.github.com/users/mapseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapseed/subscriptions","organizations_url":"https://api.github.com/users/mapseed/orgs","repos_url":"https://api.github.com/users/mapseed/repos","events_url":"https://api.github.com/users/mapseed/events{/privacy}","received_events_url":"https://api.github.com/users/mapseed/received_events","type":"Organization","site_admin":false},"repo":{"id":28108305,"node_id":"MDEwOlJlcG9zaXRvcnkyODEwODMwNQ==","name":"platform","full_name":"mapseed/platform","private":false,"owner":{"login":"mapseed","id":7245803,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU4MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7245803?v=4","gravatar_id":"","url":"https://api.github.com/users/mapseed","html_url":"https://github.com/mapseed","followers_url":"https://api.github.com/users/mapseed/followers","following_url":"https://api.github.com/users/mapseed/following{/other_user}","gists_url":"https://api.github.com/users/mapseed/gists{/gist_id}","starred_url":"https://api.github.com/users/mapseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapseed/subscriptions","organizations_url":"https://api.github.com/users/mapseed/orgs","repos_url":"https://api.github.com/users/mapseed/repos","events_url":"https://api.github.com/users/mapseed/events{/privacy}","received_events_url":"https://api.github.com/users/mapseed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mapseed/platform","description":"Mapseed is a simple, beautiful way to collect information and tell geographic stories.","fork":false,"url":"https://api.github.com/repos/mapseed/platform","forks_url":"https://api.github.com/repos/mapseed/platform/forks","keys_url":"https://api.github.com/repos/mapseed/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapseed/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapseed/platform/teams","hooks_url":"https://api.github.com/repos/mapseed/platform/hooks","issue_events_url":"https://api.github.com/repos/mapseed/platform/issues/events{/number}","events_url":"https://api.github.com/repos/mapseed/platform/events","assignees_url":"https://api.github.com/repos/mapseed/platform/assignees{/user}","branches_url":"https://api.github.com/repos/mapseed/platform/branches{/branch}","tags_url":"https://api.github.com/repos/mapseed/platform/tags","blobs_url":"https://api.github.com/repos/mapseed/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapseed/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapseed/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapseed/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapseed/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mapseed/platform/languages","stargazers_url":"https://api.github.com/repos/mapseed/platform/stargazers","contributors_url":"https://api.github.com/repos/mapseed/platform/contributors","subscribers_url":"https://api.github.com/repos/mapseed/platform/subscribers","subscription_url":"https://api.github.com/repos/mapseed/platform/subscription","commits_url":"https://api.github.com/repos/mapseed/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapseed/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapseed/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapseed/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapseed/platform/contents/{+path}","compare_url":"https://api.github.com/repos/mapseed/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapseed/platform/merges","archive_url":"https://api.github.com/repos/mapseed/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapseed/platform/downloads","issues_url":"https://api.github.com/repos/mapseed/platform/issues{/number}","pulls_url":"https://api.github.com/repos/mapseed/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mapseed/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mapseed/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapseed/platform/labels{/name}","releases_url":"https://api.github.com/repos/mapseed/platform/releases{/id}","deployments_url":"https://api.github.com/repos/mapseed/platform/deployments","created_at":"2014-12-16T21:51:30Z","updated_at":"2018-11-06T02:32:24Z","pushed_at":"2018-11-06T02:33:44Z","git_url":"git://github.com/mapseed/platform.git","ssh_url":"git@github.com:mapseed/platform.git","clone_url":"https://github.com/mapseed/platform.git","svn_url":"https://github.com/mapseed/platform","homepage":"http://mapseed.org","size":60349,"stargazers_count":54,"watchers_count":54,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":26,"open_issues":91,"watchers":54,"default_branch":"master"}},"base":{"label":"mapseed:master","ref":"master","sha":"2bf4eeba5e37f8f27d1ec7b5432b48ace19eb0e1","user":{"login":"mapseed","id":7245803,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU4MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7245803?v=4","gravatar_id":"","url":"https://api.github.com/users/mapseed","html_url":"https://github.com/mapseed","followers_url":"https://api.github.com/users/mapseed/followers","following_url":"https://api.github.com/users/mapseed/following{/other_user}","gists_url":"https://api.github.com/users/mapseed/gists{/gist_id}","starred_url":"https://api.github.com/users/mapseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapseed/subscriptions","organizations_url":"https://api.github.com/users/mapseed/orgs","repos_url":"https://api.github.com/users/mapseed/repos","events_url":"https://api.github.com/users/mapseed/events{/privacy}","received_events_url":"https://api.github.com/users/mapseed/received_events","type":"Organization","site_admin":false},"repo":{"id":28108305,"node_id":"MDEwOlJlcG9zaXRvcnkyODEwODMwNQ==","name":"platform","full_name":"mapseed/platform","private":false,"owner":{"login":"mapseed","id":7245803,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU4MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7245803?v=4","gravatar_id":"","url":"https://api.github.com/users/mapseed","html_url":"https://github.com/mapseed","followers_url":"https://api.github.com/users/mapseed/followers","following_url":"https://api.github.com/users/mapseed/following{/other_user}","gists_url":"https://api.github.com/users/mapseed/gists{/gist_id}","starred_url":"https://api.github.com/users/mapseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapseed/subscriptions","organizations_url":"https://api.github.com/users/mapseed/orgs","repos_url":"https://api.github.com/users/mapseed/repos","events_url":"https://api.github.com/users/mapseed/events{/privacy}","received_events_url":"https://api.github.com/users/mapseed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mapseed/platform","description":"Mapseed is a simple, beautiful way to collect information and tell geographic stories.","fork":false,"url":"https://api.github.com/repos/mapseed/platform","forks_url":"https://api.github.com/repos/mapseed/platform/forks","keys_url":"https://api.github.com/repos/mapseed/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapseed/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapseed/platform/teams","hooks_url":"https://api.github.com/repos/mapseed/platform/hooks","issue_events_url":"https://api.github.com/repos/mapseed/platform/issues/events{/number}","events_url":"https://api.github.com/repos/mapseed/platform/events","assignees_url":"https://api.github.com/repos/mapseed/platform/assignees{/user}","branches_url":"https://api.github.com/repos/mapseed/platform/branches{/branch}","tags_url":"https://api.github.com/repos/mapseed/platform/tags","blobs_url":"https://api.github.com/repos/mapseed/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapseed/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapseed/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapseed/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapseed/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mapseed/platform/languages","stargazers_url":"https://api.github.com/repos/mapseed/platform/stargazers","contributors_url":"https://api.github.com/repos/mapseed/platform/contributors","subscribers_url":"https://api.github.com/repos/mapseed/platform/subscribers","subscription_url":"https://api.github.com/repos/mapseed/platform/subscription","commits_url":"https://api.github.com/repos/mapseed/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapseed/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapseed/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapseed/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapseed/platform/contents/{+path}","compare_url":"https://api.github.com/repos/mapseed/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapseed/platform/merges","archive_url":"https://api.github.com/repos/mapseed/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapseed/platform/downloads","issues_url":"https://api.github.com/repos/mapseed/platform/issues{/number}","pulls_url":"https://api.github.com/repos/mapseed/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mapseed/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mapseed/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapseed/platform/labels{/name}","releases_url":"https://api.github.com/repos/mapseed/platform/releases{/id}","deployments_url":"https://api.github.com/repos/mapseed/platform/deployments","created_at":"2014-12-16T21:51:30Z","updated_at":"2018-11-06T02:32:24Z","pushed_at":"2018-11-06T02:33:44Z","git_url":"git://github.com/mapseed/platform.git","ssh_url":"git@github.com:mapseed/platform.git","clone_url":"https://github.com/mapseed/platform.git","svn_url":"https://github.com/mapseed/platform","homepage":"http://mapseed.org","size":60349,"stargazers_count":54,"watchers_count":54,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":26,"open_issues":91,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapseed/platform/pulls/1073"},"html":{"href":"https://github.com/mapseed/platform/pull/1073"},"issue":{"href":"https://api.github.com/repos/mapseed/platform/issues/1073"},"comments":{"href":"https://api.github.com/repos/mapseed/platform/issues/1073/comments"},"review_comments":{"href":"https://api.github.com/repos/mapseed/platform/pulls/1073/comments"},"review_comment":{"href":"https://api.github.com/repos/mapseed/platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapseed/platform/pulls/1073/commits"},"statuses":{"href":"https://api.github.com/repos/mapseed/platform/statuses/eeb8faa07b73f8652743b96f820787ee78b89010"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jalMogo"}}