X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/91aaae1933183fc9e7311abd3b815b5b74ce2d3c..832b96b75ac05177e6baad7b414066ccfd7cfa51:/app/views/browse/start.rjs diff --git a/app/views/browse/start.rjs b/app/views/browse/start.rjs index c5247066e..b96e8c39c 100644 --- a/app/views/browse/start.rjs +++ b/app/views/browse/start.rjs @@ -2,7 +2,6 @@ page.replace_html :sidebar_title, t('browse.start_rjs.data_frame_title') page.replace_html :sidebar_content, :partial => 'start' page << <= 15) { - useMap(); + useMap(false); } else { setStatus("#{I18n.t('browse.start_rjs.zoom_or_select')}"); } @@ -47,8 +51,8 @@ page << < 0.25) { - setStatus("#{I18n.t('browse.start_rjs.unable_to_load')} " + size + " #{I18n.t('browse.start_rjs.must_be_smaller')}"); + if (size > #{MAX_REQUEST_AREA}) { + setStatus(i18n("#{I18n.t('browse.start_rjs.unable_to_load_size', :max_bbox_size => MAX_REQUEST_AREA)}", { bbox_size: size })); } else { - loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX()); + loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX(), reload); } } - function loadGML(url) { + function loadGML(url, reload) { setStatus("#{I18n.t('browse.start_rjs.loading')}"); $("browse_content").innerHTML = ""; - if (!browseDataLayer) { + var formatOptions = { + checkTags: true, + interestingTagsExclude: ['source','source_ref','source:ref','history','attribution','created_by','tiger:county','tiger:tlid','tiger:upload_uuid'] + }; + + if (areasHidden) formatOptions.areaTags = []; + + if (!browseDataLayer || reload) { var style = new OpenLayers.Style(); style.addRules([new OpenLayers.Rule({ @@ -208,12 +239,11 @@ page << <