X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c3500df1cf70dab16adb581535ba6950a9a3e56d..69d91bf24aa38c22640749c2e3b371f34a70ef6d:/app/views/browse/start.js.erb diff --git a/app/views/browse/start.js.erb b/app/views/browse/start.js.erb index 4426ed7e0..8f04d7a83 100644 --- a/app/views/browse/start.js.erb +++ b/app/views/browse/start.js.erb @@ -149,13 +149,13 @@ function endDrag(bbox) { $("#browse_select_view").show(); } -function displayFeatureWarning(count, callback) { +function displayFeatureWarning(count, limit, callback) { clearStatus(); var div = document.createElement("div"); var p = document.createElement("p"); - p.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.loaded_an_area_with_num_features' %>", { num_features: count }))); + p.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.loaded_an_area_with_num_features' %>", { num_features: count, max_features: limit }))); div.appendChild(p); var input = document.createElement("input"); @@ -182,7 +182,7 @@ function customDataLoader(resp, options) { if (!this.maxFeatures || resp.features.length <= this.maxFeatures) { options.callback.call(options.scope, resp); } else { - displayFeatureWarning(resp.features.length, function () { + displayFeatureWarning(resp.features.length, this.maxFeatures, function () { options.callback.call(options.scope, resp); }); }