{"action":"created","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/4701","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/4701/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/4701/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/4701/events","html_url":"https://github.com/openlayers/ol3/issues/4701","id":127869185,"number":4701,"title":"SVG tiles not rendered in IE11","user":{"login":"aristid","id":8337421,"avatar_url":"https://avatars.githubusercontent.com/u/8337421?v=3","gravatar_id":"","url":"https://api.github.com/users/aristid","html_url":"https://github.com/aristid","followers_url":"https://api.github.com/users/aristid/followers","following_url":"https://api.github.com/users/aristid/following{/other_user}","gists_url":"https://api.github.com/users/aristid/gists{/gist_id}","starred_url":"https://api.github.com/users/aristid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristid/subscriptions","organizations_url":"https://api.github.com/users/aristid/orgs","repos_url":"https://api.github.com/users/aristid/repos","events_url":"https://api.github.com/users/aristid/events{/privacy}","received_events_url":"https://api.github.com/users/aristid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-21T08:17:09Z","updated_at":"2016-01-21T08:19:30Z","closed_at":null,"body":"ol.layer.Tile() can display SVG tiles in Firefox and Chrome (see svg.html). However, in IE11 no tiles are shown and no errors are reported. After patching the OpenLayers source (see svg-fix.html) IE is able to render SVG tiles just fine.\r\n\r\n[svg-tiles.zip](https://github.com/openlayers/ol3/files/98871/svg-tiles.zip)\r\n\r\nI first thought it might be a security issue with tainted canvas etc., but it's not. In ol.ImageTile.prototype.handleImageLoad_() (lines 128-136 of src/ol/imagetile.js) naturalWidth and naturalHeight properties are used to determine whether the tile is loaded. These properties do not work for SVG images in IE. \r\n\r\nI'm not sure why OpenLayers checks for naturalWidth in ol.ImageTile.prototype.handleImageLoad_() but not in ol.Image.prototype.handleImageLoad_() or ol.style.IconImage_.prototype.handleImageLoad_().\r\n\r\nIf the check is needed, maybe it can be done in this manner:\r\n   if (goog.userAgent.IE && this.image_.complete ||\r\n      this.image_.naturalWidth && this.image_.naturalHeight) {\r\n    this.state = ol.TileState.LOADED;\r\n  } else {\r\n    this.state = ol.TileState.EMPTY;\r\n  }\r\n\r\nAt https://stereochro.me/ideas/detecting-broken-images-js it's claimed that \"During the onload event, IE correctly identifies any images that weren't downloaded as not complete.\". I haven't verified this."},"comment":{"url":"https://api.github.com/repos/openlayers/ol3/issues/comments/173492777","html_url":"https://github.com/openlayers/ol3/issues/4701#issuecomment-173492777","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/4701","id":173492777,"user":{"login":"ahocevar","id":211514,"avatar_url":"https://avatars.githubusercontent.com/u/211514?v=3","gravatar_id":"","url":"https://api.github.com/users/ahocevar","html_url":"https://github.com/ahocevar","followers_url":"https://api.github.com/users/ahocevar/followers","following_url":"https://api.github.com/users/ahocevar/following{/other_user}","gists_url":"https://api.github.com/users/ahocevar/gists{/gist_id}","starred_url":"https://api.github.com/users/ahocevar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahocevar/subscriptions","organizations_url":"https://api.github.com/users/ahocevar/orgs","repos_url":"https://api.github.com/users/ahocevar/repos","events_url":"https://api.github.com/users/ahocevar/events{/privacy}","received_events_url":"https://api.github.com/users/ahocevar/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T08:19:30Z","updated_at":"2016-01-21T08:19:30Z","body":"I'd say if this is not present in `ol.Image`, then it should not be necessary in `ol.ImageTile` either. Would you be willing to create a pull request to fix this?"}}