{"action":"created","comment":{"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments/117228904","pull_request_review_id":38916073,"id":117228904,"diff_hunk":"@@ -0,0 +1,152 @@\n+goog.provide('ol.GaImageTile');\n+\n+goog.require('ol');\n+goog.require('ol.Tile');\n+goog.require('ol.dom');\n+goog.require('ol.events');\n+goog.require('ol.events.EventType');\n+\n+\n+/**\n+ * @constructor\n+ * @extends {ol.Tile}\n+ * @param {ol.TileCoord} tileCoord Tile coordinate.\n+ * @param {ol.TileState} state State.\n+ * @param {string} src Image source URI.\n+ * @param {?string} crossOrigin Cross origin.\n+ * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.\n+ * @api\n+ */\n+ol.GaImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) {\n+\n+  ol.Tile.call(this, tileCoord, state);\n+\n+  /**\n+   * Image URI\n+   *\n+   * @private\n+   * @type {string}\n+   */\n+  this.src_ = src;\n+\n+  /**\n+   * @private\n+   * @type {Image|HTMLCanvasElement}\n+   */\n+  this.image_ = new Image();\n+  if (crossOrigin !== null) {\n+    this.image_.crossOrigin = crossOrigin;\n+  }\n+\n+  /**\n+   * @private\n+   * @type {Array.<ol.EventsKey>}\n+   */\n+  this.imageListenerKeys_ = null;\n+\n+  /**\n+   * @private\n+   * @type {ol.TileLoadFunctionType}\n+   */\n+  this.tileLoadFunction_ = tileLoadFunction;\n+\n+};\n+ol.inherits(ol.GaImageTile, ol.Tile);\n+\n+\n+/**\n+ * @inheritDoc\n+ */\n+ol.GaImageTile.prototype.disposeInternal = function() {\n+  if (this.state == ol.TileState.LOADING) {\n+    this.unlistenImage_();\n+  }\n+  if (this.interimTile) {\n+    this.interimTile.dispose();\n+  }\n+  this.state = ol.TileState.ABORT;\n+  this.changed();\n+  ol.Tile.prototype.disposeInternal.call(this);\n+};\n+\n+\n+/**\n+ * Get the image element for this tile.\n+ * @inheritDoc\n+ * @api\n+ */\n+ol.GaImageTile.prototype.getImage = function() {\n+  return this.image_;\n+};\n+\n+\n+/**\n+ * @inheritDoc\n+ */\n+ol.GaImageTile.prototype.getKey = function() {\n+  return this.src_;\n+};\n+\n+\n+/**\n+ * Tracks loading or read errors.\n+ *\n+ * @private\n+ */\n+ol.GaImageTile.prototype.handleImageError_ = function() {\n+  var ctx = ol.dom.createCanvasContext2D(1, 1);\n+  ctx.fillStyle = \"#00000000\";\n+  ctx.fillRect(0, 0, 1, 1);\n+  this.image_ = ctx.canvas;\n+  this.state = ol.TileState.LOADED;\n+  this.unlistenImage_();\n+  this.changed();\n+};","path":"ol-cesium-plugin/ga-image-tile.js","position":104,"original_position":104,"commit_id":"bb8a978681bf6c41e3377ed8b91af09a5fe2bba5","original_commit_id":"bb8a978681bf6c41e3377ed8b91af09a5fe2bba5","user":{"login":"gjn","id":2572317,"avatar_url":"https://avatars1.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"body":"As far as I can tell, this is the only function that is different than the `ol.ImageTile` class from openlayers.\r\n\r\nWhy not derive `ol.GaImageTile` from `ol.ImageTile` class and only overwrite this function? It would facilitate updates from changes in `ol.ImageTile`.","created_at":"2017-05-18T12:02:01Z","updated_at":"2017-05-18T12:02:33Z","html_url":"https://github.com/geoadmin/mf-geoadmin3/pull/3662#discussion_r117228904","pull_request_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662","_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments/117228904"},"html":{"href":"https://github.com/geoadmin/mf-geoadmin3/pull/3662#discussion_r117228904"},"pull_request":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662"}}},"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662","id":98164613,"html_url":"https://github.com/geoadmin/mf-geoadmin3/pull/3662","diff_url":"https://github.com/geoadmin/mf-geoadmin3/pull/3662.diff","patch_url":"https://github.com/geoadmin/mf-geoadmin3/pull/3662.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/3662","number":3662,"state":"open","locked":false,"title":"Manage 204 tiles","user":{"login":"oterral","id":621420,"avatar_url":"https://avatars3.githubusercontent.com/u/621420?v=3","gravatar_id":"","url":"https://api.github.com/users/oterral","html_url":"https://github.com/oterral","followers_url":"https://api.github.com/users/oterral/followers","following_url":"https://api.github.com/users/oterral/following{/other_user}","gists_url":"https://api.github.com/users/oterral/gists{/gist_id}","starred_url":"https://api.github.com/users/oterral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oterral/subscriptions","organizations_url":"https://api.github.com/users/oterral/orgs","repos_url":"https://api.github.com/users/oterral/repos","events_url":"https://api.github.com/users/oterral/events{/privacy}","received_events_url":"https://api.github.com/users/oterral/received_events","type":"User","site_admin":false},"body":"Fix https://github.com/geoadmin/mf-geoadmin3/issues/3118 and https://github.com/geoadmin/mf-geoadmin3/issues/3656\r\n\r\nWith more work it could also fix #3331 \r\n\r\n [test](https://mf-geoadmin3.int.bgdi.ch/teo_204tiles/index.html?lang=fr&topic=ech&bgLayer=voidLayer&X=173855.81&Y=697243.83&dev3d=true&zoom=5&debug&layers=ch.swisstopo.zeitreihen,ch.bfs.gebaeude_wohnungs_register,ch.bav.haltestellen-oev,ch.swisstopo.swisstlm3d-wanderwege&layers_visibility=true,false,true,false&layers_timestamp=20131231,,,&time=2013)","created_at":"2016-12-15T14:51:34Z","updated_at":"2017-05-18T12:02:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cecb98521b8f6c46c2910c7f36de5ee3392baa5","assignee":{"login":"gjn","id":2572317,"avatar_url":"https://avatars1.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"assignees":[{"login":"gjn","id":2572317,"avatar_url":"https://avatars1.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/3662/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/bb8a978681bf6c41e3377ed8b91af09a5fe2bba5","head":{"label":"geoadmin:teo_204tiles","ref":"teo_204tiles","sha":"bb8a978681bf6c41e3377ed8b91af09a5fe2bba5","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars1.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399273,"name":"mf-geoadmin3","full_name":"geoadmin/mf-geoadmin3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars1.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-geoadmin3","description":"map.geo.admin.ch source code","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3","forks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/releases{/id}","deployments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/deployments","created_at":"2013-05-31T06:37:20Z","updated_at":"2017-05-18T06:52:58Z","pushed_at":"2017-05-18T08:42:50Z","git_url":"git://github.com/geoadmin/mf-geoadmin3.git","ssh_url":"git@github.com:geoadmin/mf-geoadmin3.git","clone_url":"https://github.com/geoadmin/mf-geoadmin3.git","svn_url":"https://github.com/geoadmin/mf-geoadmin3","homepage":"http://map.geo.admin.ch","size":261933,"stargazers_count":115,"watchers_count":115,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":78,"forks":52,"open_issues":78,"watchers":115,"default_branch":"master"}},"base":{"label":"geoadmin:teo_up","ref":"teo_up","sha":"1c8df0984eb5f8a74fb4bae92e2fb67a488f0852","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars1.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399273,"name":"mf-geoadmin3","full_name":"geoadmin/mf-geoadmin3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars1.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-geoadmin3","description":"map.geo.admin.ch source code","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3","forks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/releases{/id}","deployments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/deployments","created_at":"2013-05-31T06:37:20Z","updated_at":"2017-05-18T06:52:58Z","pushed_at":"2017-05-18T08:42:50Z","git_url":"git://github.com/geoadmin/mf-geoadmin3.git","ssh_url":"git@github.com:geoadmin/mf-geoadmin3.git","clone_url":"https://github.com/geoadmin/mf-geoadmin3.git","svn_url":"https://github.com/geoadmin/mf-geoadmin3","homepage":"http://map.geo.admin.ch","size":261933,"stargazers_count":115,"watchers_count":115,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":78,"forks":52,"open_issues":78,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662"},"html":{"href":"https://github.com/geoadmin/mf-geoadmin3/pull/3662"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/3662"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/3662/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/3662/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/bb8a978681bf6c41e3377ed8b91af09a5fe2bba5"}}}}
{"actor":{"display_login":"gjn"}}