X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4e0cf1c5d30d66fc8b3feeaebd27828c4576ffa0..db9420ba57478114090806f8b92c48f528eae31f:/app/views/browse/start.rjs diff --git a/app/views/browse/start.rjs b/app/views/browse/start.rjs index ccb39e4ff..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('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 << <