{"action":"created","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/3876","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/3876/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/3876/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/3876/events","html_url":"https://github.com/openlayers/ol3/pull/3876","id":93280910,"number":3876,"title":"Remove extent to the list of loaded extent in case of server error/restriction","user":{"login":"geonux","id":2815691,"avatar_url":"https://avatars.githubusercontent.com/u/2815691?v=3","gravatar_id":"","url":"https://api.github.com/users/geonux","html_url":"https://github.com/geonux","followers_url":"https://api.github.com/users/geonux/followers","following_url":"https://api.github.com/users/geonux/following{/other_user}","gists_url":"https://api.github.com/users/geonux/gists{/gist_id}","starred_url":"https://api.github.com/users/geonux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geonux/subscriptions","organizations_url":"https://api.github.com/users/geonux/orgs","repos_url":"https://api.github.com/users/geonux/repos","events_url":"https://api.github.com/users/geonux/events{/privacy}","received_events_url":"https://api.github.com/users/geonux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-06T13:39:25Z","updated_at":"2015-07-13T00:39:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/3876","html_url":"https://github.com/openlayers/ol3/pull/3876","diff_url":"https://github.com/openlayers/ol3/pull/3876.diff","patch_url":"https://github.com/openlayers/ol3/pull/3876.patch"},"body":"This method offers the possibility of removing the current extent of the list of already loaded extent . In this way, the current extent ( or smaller extents ) can be (re)loaded on server error.\r\n\r\nThe creation of this code has been motivated by the impossibility to load \"children\" tiles when a lower zoom tile was marked as treated , even if the server returned an error (especially due to the async. of http method in JS). In my case, the data are too dense to be displayed at certain zoom levels, but may be drawn on a higher zoom level. I could probably use the notion of minZoom , but in my case, the threshold zoom level can not be determined beforehand.\r\n\r\nI'm not satisfied with the method name. Maybe can you have a better proposal ?\r\n\r\nUsage (example with http helper from AngularJS) :\r\n```\r\n            var vectorSource = new ol.source.Vector({\r\n              loader: function(extent, resolution, projection) {\r\n                var _url = options.featuresUrl.replace(\"{id}\", annotation.id) +\r\n                  \"?format=json&bbox=\" + extent.join(',');\r\n\r\n                $http.get(_url).success(function(data, status, headers, config) {\r\n                  var features = jsonFormat.readFeatures(data);\r\n                  vectorSource.addFeatures(features);\r\n                }).error(function(data, status, headers, config) {\r\n                  if (status === 500 && data.cause == \"Too many results\")\r\n                    vectorSource.removeFromLoadedExtent(extent);\r\n                });\r\n              },\r\n              strategy: ol.loadingstrategy.tile(ol.tilegrid.createXYZ({})),\r\n              projection: 'EPSG:3857'\r\n            });\r\n\r\n```\r\n\r\nCan also be a solution for :\r\nhttps://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ol3-dev/vu9eyrGLIrY/reV2RXkR5Q0J"},"comment":{"url":"https://api.github.com/repos/openlayers/ol3/issues/comments/120776519","html_url":"https://github.com/openlayers/ol3/pull/3876#issuecomment-120776519","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/3876","id":120776519,"user":{"login":"alvinlindstam","id":1712882,"avatar_url":"https://avatars.githubusercontent.com/u/1712882?v=3","gravatar_id":"","url":"https://api.github.com/users/alvinlindstam","html_url":"https://github.com/alvinlindstam","followers_url":"https://api.github.com/users/alvinlindstam/followers","following_url":"https://api.github.com/users/alvinlindstam/following{/other_user}","gists_url":"https://api.github.com/users/alvinlindstam/gists{/gist_id}","starred_url":"https://api.github.com/users/alvinlindstam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvinlindstam/subscriptions","organizations_url":"https://api.github.com/users/alvinlindstam/orgs","repos_url":"https://api.github.com/users/alvinlindstam/repos","events_url":"https://api.github.com/users/alvinlindstam/events{/privacy}","received_events_url":"https://api.github.com/users/alvinlindstam/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T00:39:13Z","updated_at":"2015-07-13T00:39:13Z","body":"Unlisting a failed request seems reasonable.\r\n\r\nAs noted in https://github.com/openlayers/ol3/issues/3812, clearing the extent from the loaded extents will cause infinite reloads, even without panning or interaction with the map. Polling the server continuously might not always be desired (if the problem is persistent). Should it be up to the loader function to keep track of that and ignore repeated calls as it sees fit, or should that somehow be included in ol3?\r\n\r\nHow does ol3 handle failed tile requests, are they ever retried?"}}