Merge branch 'master' into openstreetbugs
Conflicts: Gemfile app/helpers/application_helper.rb app/views/site/index.html.erb
4
Gemfile
|
@ -24,14 +24,12 @@ gem 'composite_primary_keys', '>= 5.0.8'
|
|||
gem 'http_accept_language', '>= 1.0.2'
|
||||
gem 'paperclip', '~> 2.0'
|
||||
gem 'deadlock_retry', '>= 1.2.0'
|
||||
gem 'i18n-js', '>= 3.0.0.rc2'
|
||||
gem 'jsonify-rails'
|
||||
|
||||
# We need ruby-openid 2.2.0 or later for ruby 1.9 support
|
||||
gem 'ruby-openid', '>= 2.2.0'
|
||||
|
||||
# Browser detection support
|
||||
gem 'browser'
|
||||
|
||||
# Markdown formatting support
|
||||
gem 'redcarpet'
|
||||
|
||||
|
|
29
Gemfile.lock
|
@ -31,9 +31,8 @@ GEM
|
|||
multi_json (~> 1.0)
|
||||
arel (3.0.2)
|
||||
bigdecimal (1.1.0)
|
||||
browser (0.1.4)
|
||||
builder (3.0.0)
|
||||
cocaine (0.2.1)
|
||||
builder (3.0.3)
|
||||
cocaine (0.3.0)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
|
@ -55,10 +54,12 @@ GEM
|
|||
http_accept_language (1.0.2)
|
||||
httpauth (0.1)
|
||||
httpclient (2.2.7)
|
||||
i18n (0.6.0)
|
||||
i18n (0.6.1)
|
||||
i18n-js (3.0.0.rc2)
|
||||
i18n
|
||||
iconv (0.1)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.1.1)
|
||||
jquery-rails (2.1.2)
|
||||
railties (>= 3.1.0, < 5.0)
|
||||
thor (~> 0.14)
|
||||
json (1.7.5)
|
||||
|
@ -75,13 +76,13 @@ GEM
|
|||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
memcached (1.4.3)
|
||||
memcached (1.4.5)
|
||||
mime-types (1.19)
|
||||
minitest (3.3.0)
|
||||
minitest (3.4.0)
|
||||
multi_json (1.3.6)
|
||||
multipart-post (1.1.5)
|
||||
nokogiri (1.5.5)
|
||||
oauth (0.4.6)
|
||||
oauth (0.4.7)
|
||||
oauth-plugin (0.4.1)
|
||||
multi_json
|
||||
oauth (~> 0.4.4)
|
||||
|
@ -100,7 +101,7 @@ GEM
|
|||
activesupport (>= 2.3.2)
|
||||
cocaine (>= 0.0.2)
|
||||
mime-types
|
||||
pg (0.14.0)
|
||||
pg (0.14.1)
|
||||
polyglot (0.3.3)
|
||||
rack (1.4.1)
|
||||
rack-cache (1.2)
|
||||
|
@ -120,7 +121,7 @@ GEM
|
|||
activesupport (= 3.2.8)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.8)
|
||||
rails-i18n (0.6.5)
|
||||
rails-i18n (0.6.6)
|
||||
i18n (~> 0.5)
|
||||
railties (3.2.8)
|
||||
actionpack (= 3.2.8)
|
||||
|
@ -150,14 +151,14 @@ GEM
|
|||
libv8 (~> 3.3.10)
|
||||
thor (0.16.0)
|
||||
tilt (1.3.3)
|
||||
timecop (0.4.5)
|
||||
timecop (0.5.1)
|
||||
treetop (1.4.10)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.33)
|
||||
uglifier (1.2.7)
|
||||
uglifier (1.3.0)
|
||||
execjs (>= 0.3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_json (~> 1.0, >= 1.0.2)
|
||||
validates_email_format_of (1.5.3)
|
||||
|
||||
PLATFORMS
|
||||
|
@ -166,7 +167,6 @@ PLATFORMS
|
|||
DEPENDENCIES
|
||||
SystemTimer (>= 1.1.3)
|
||||
bigdecimal
|
||||
browser
|
||||
coffee-rails (~> 3.2.1)
|
||||
composite_primary_keys (>= 5.0.8)
|
||||
deadlock_retry (>= 1.2.0)
|
||||
|
@ -174,6 +174,7 @@ DEPENDENCIES
|
|||
htmlentities
|
||||
http_accept_language (>= 1.0.2)
|
||||
httpclient
|
||||
i18n-js (>= 3.0.0.rc2)
|
||||
iconv
|
||||
jquery-rails
|
||||
jsonify-rails
|
||||
|
|
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 13 KiB |
BIN
app/assets/images/sotmpdx.png
Executable file
After Width: | Height: | Size: 8.1 KiB |
|
@ -2,23 +2,46 @@
|
|||
//= require jquery_ujs
|
||||
//= require jquery.autogrowtextarea
|
||||
//= require jquery.timers
|
||||
//= require jquery.cookie
|
||||
//= require augment
|
||||
//= require openlayers
|
||||
//= require i18n/translations
|
||||
//= require globals
|
||||
//= require params
|
||||
//= require piwik
|
||||
//= require browse
|
||||
//= require export
|
||||
//= require map
|
||||
//= require key
|
||||
//= require menu
|
||||
//= require sidebar
|
||||
//= require richtext
|
||||
//= require resize
|
||||
//= require notes
|
||||
|
||||
function zoomPrecision(zoom) {
|
||||
var decimals = Math.pow(10, Math.floor(zoom/3));
|
||||
return function(x) {
|
||||
return Math.round(x * decimals) / decimals;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* Called as the user scrolls/zooms around to aniplate hrefs of the
|
||||
* view tab and various other links
|
||||
*/
|
||||
function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,objid) {
|
||||
var decimals = Math.pow(10, Math.floor(zoom/3));
|
||||
var toPrecision = zoomPrecision(zoom);
|
||||
var node;
|
||||
|
||||
lat = Math.round(lat * decimals) / decimals;
|
||||
lon = Math.round(lon * decimals) / decimals;
|
||||
lat = toPrecision(lat);
|
||||
lon = toPrecision(lon);
|
||||
|
||||
if (minlon) {
|
||||
minlon = Math.round(minlon * decimals) / decimals;
|
||||
minlat = Math.round(minlat * decimals) / decimals;
|
||||
maxlon = Math.round(maxlon * decimals) / decimals;
|
||||
maxlat = Math.round(maxlat * decimals) / decimals;
|
||||
minlon = toPrecision(minlon);
|
||||
minlat = toPrecision(minlat);
|
||||
maxlon = toPrecision(maxlon);
|
||||
maxlat = toPrecision(maxlat);
|
||||
}
|
||||
|
||||
$(".geolink").each(function (index, link) {
|
||||
|
@ -40,25 +63,21 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
|
|||
args[objtype] = objid;
|
||||
}
|
||||
|
||||
var classes = $(link).attr("class").split(" ");
|
||||
|
||||
$(classes).each(function (index, classname) {
|
||||
if (match = classname.match(/^minzoom([0-9]+)$/)) {
|
||||
var minzoom = match[1];
|
||||
var minzoom = $(link).data("minzoom");
|
||||
if (minzoom) {
|
||||
var name = link.id.replace(/anchor$/, "");
|
||||
|
||||
$(link).off("click.minzoom");
|
||||
|
||||
if (zoom >= minzoom) {
|
||||
$(link).attr("title", i18n("javascripts.site." + name + "_tooltip"));
|
||||
$(link).attr("title", I18n.t("javascripts.site." + name + "_tooltip"));
|
||||
$(link).removeClass("disabled");
|
||||
} else {
|
||||
$(link).on("click.minzoom", function () { alert(i18n("javascripts.site." + name + "_zoom_alert")); return false; });
|
||||
$(link).attr("title", i18n("javascripts.site." + name + "_disabled_tooltip"));
|
||||
$(link).on("click.minzoom", function () { alert(I18n.t("javascripts.site." + name + "_zoom_alert")); return false; });
|
||||
$(link).attr("title", I18n.t("javascripts.site." + name + "_disabled_tooltip"));
|
||||
$(link).addClass("disabled");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
link.href = setArgs(link.href, args);
|
||||
});
|
||||
|
@ -144,26 +163,6 @@ function setArgs(url, args) {
|
|||
return url.replace(/\?.*$/, "") + "?" + queryitems.join("&");
|
||||
}
|
||||
|
||||
/*
|
||||
* Called to interpolate JavaScript variables in strings using a
|
||||
* similar syntax to rails I18n string interpolation - the only
|
||||
* difference is that [[foo]] is the placeholder syntax instead
|
||||
* of {{foo}} which allows the same string to be processed by both
|
||||
* rails and then later by javascript.
|
||||
*/
|
||||
function i18n(string, keys) {
|
||||
string = i18n_strings[string] || string;
|
||||
|
||||
for (var key in keys) {
|
||||
var re_key = '\\[\\[' + key + '\\]\\]';
|
||||
var re = new RegExp(re_key, "g");
|
||||
|
||||
string = string.replace(re, keys[key]);
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called to interlace the bits in x and y, making a Morton code.
|
||||
*/
|
||||
|
@ -208,62 +207,18 @@ function makeShortCode(lat, lon, zoom) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Click handler to switch a rich text control to preview mode
|
||||
*/
|
||||
function previewRichtext(event) {
|
||||
var editor = $(this).parents(".richtext_container").find("textarea");
|
||||
var preview = $(this).parents(".richtext_container").find(".richtext_preview");
|
||||
var width = editor.outerWidth() - preview.outerWidth() + preview.innerWidth();
|
||||
var minHeight = editor.outerHeight() - preview.outerHeight() + preview.innerHeight();
|
||||
|
||||
if (preview.contents().length == 0) {
|
||||
preview.oneTime(500, "loading", function () {
|
||||
preview.addClass("loading");
|
||||
});
|
||||
|
||||
preview.load(editor.attr("data-preview-url"), { text: editor.val() }, function () {
|
||||
preview.stopTime("loading");
|
||||
preview.removeClass("loading");
|
||||
});
|
||||
}
|
||||
|
||||
editor.hide();
|
||||
preview.width(width);
|
||||
preview.css("min-height", minHeight + "px");
|
||||
preview.show();
|
||||
|
||||
$(this).siblings(".richtext_doedit").prop("disabled", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
/*
|
||||
* Click handler to switch a rich text control to edit mode
|
||||
*/
|
||||
function editRichtext(event) {
|
||||
var editor = $(this).parents(".richtext_container").find("textarea");
|
||||
var preview = $(this).parents(".richtext_container").find(".richtext_preview");
|
||||
|
||||
preview.hide();
|
||||
editor.show();
|
||||
|
||||
$(this).siblings(".richtext_dopreview").prop("disabled", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup any rich text controls
|
||||
* Forms which have been cached by rails may have he wrong
|
||||
* authenticity token, so patch up any forms with the correct
|
||||
* token taken from the page header.
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$(".richtext_preview").hide();
|
||||
$(".richtext_content textarea").change(function () {
|
||||
$(this).parents(".richtext_container").find(".richtext_preview").empty();
|
||||
});
|
||||
$(".richtext_doedit").prop("disabled", true);
|
||||
$(".richtext_dopreview").prop("disabled", false);
|
||||
$(".richtext_doedit").click(editRichtext);
|
||||
$(".richtext_dopreview").click(previewRichtext);
|
||||
var auth_token = $("meta[name=csrf-token]").attr("content");
|
||||
$("form input[name=authenticity_token]").val(auth_token);
|
||||
});
|
||||
|
||||
/*
|
||||
* Enable auto expansion for all text areas
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$("textarea").autoGrow();
|
||||
});
|
549
app/assets/javascripts/browse.js
Normal file
|
@ -0,0 +1,549 @@
|
|||
function startBrowse(sidebarHtml) {
|
||||
var browseBoxControl;
|
||||
var browseMode = "auto";
|
||||
var browseBounds;
|
||||
var browseFeatureList;
|
||||
var browseActiveFeature;
|
||||
var browseDataLayer;
|
||||
var browseSelectControl;
|
||||
var browseObjectList;
|
||||
var areasHidden = false;
|
||||
|
||||
OpenLayers.Feature.Vector.style['default'].strokeWidth = 3;
|
||||
OpenLayers.Feature.Vector.style['default'].cursor = "pointer";
|
||||
|
||||
map.dataLayer.active = true;
|
||||
|
||||
$("#sidebar_title").html(I18n.t('browse.start_rjs.data_frame_title'));
|
||||
$("#sidebar_content").html(sidebarHtml);
|
||||
|
||||
openSidebar();
|
||||
|
||||
var vectors = new OpenLayers.Layer.Vector();
|
||||
|
||||
browseBoxControl = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.RegularPolygon, {
|
||||
handlerOptions: {
|
||||
sides: 4,
|
||||
snapAngle: 90,
|
||||
irregular: true,
|
||||
persist: true
|
||||
}
|
||||
});
|
||||
browseBoxControl.handler.callbacks.done = endDrag;
|
||||
map.addControl(browseBoxControl);
|
||||
|
||||
map.events.register("moveend", map, updateData);
|
||||
map.events.triggerEvent("moveend");
|
||||
|
||||
$("#browse_select_view").click(useMap);
|
||||
|
||||
$("#browse_select_box").click(startDrag);
|
||||
|
||||
$("#browse_hide_areas_box").html(I18n.t('browse.start_rjs.hide_areas'));
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(hideAreas);
|
||||
|
||||
function updateData() {
|
||||
if (browseMode == "auto") {
|
||||
if (map.getZoom() >= 15) {
|
||||
useMap(false);
|
||||
} else {
|
||||
setStatus(I18n.t('browse.start_rjs.zoom_or_select'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#sidebar").one("closed", function () {
|
||||
if (map.dataLayer.active) {
|
||||
map.dataLayer.active = false;
|
||||
|
||||
if (browseSelectControl) {
|
||||
browseSelectControl.destroy();
|
||||
browseSelectControl = null;
|
||||
}
|
||||
|
||||
if (browseBoxControl) {
|
||||
browseBoxControl.destroy();
|
||||
browseBoxControl = null;
|
||||
}
|
||||
|
||||
if (browseActiveFeature) {
|
||||
browseActiveFeature.destroy();
|
||||
browseActiveFeature = null;
|
||||
}
|
||||
|
||||
if (browseDataLayer) {
|
||||
browseDataLayer.destroy();
|
||||
browseDataLayer = null;
|
||||
}
|
||||
|
||||
map.dataLayer.setVisibility(false);
|
||||
map.events.unregister("moveend", map, updateData);
|
||||
}
|
||||
});
|
||||
|
||||
function startDrag() {
|
||||
$("#browse_select_box").html(I18n.t('browse.start_rjs.drag_a_box'));
|
||||
|
||||
browseBoxControl.activate();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function useMap(reload) {
|
||||
var bounds = map.getExtent();
|
||||
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
if (!browseBounds || !browseBounds.containsBounds(projected)) {
|
||||
var center = bounds.getCenterLonLat();
|
||||
var tileWidth = bounds.getWidth() * 1.2;
|
||||
var tileHeight = bounds.getHeight() * 1.2;
|
||||
var tileBounds = new OpenLayers.Bounds(center.lon - (tileWidth / 2),
|
||||
center.lat - (tileHeight / 2),
|
||||
center.lon + (tileWidth / 2),
|
||||
center.lat + (tileHeight / 2));
|
||||
|
||||
browseBounds = tileBounds;
|
||||
getData(tileBounds, reload);
|
||||
|
||||
browseMode = "auto";
|
||||
|
||||
$("#browse_select_view").hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function hideAreas() {
|
||||
$("#browse_hide_areas_box").html(I18n.t('browse.start_rjs.show_areas'));
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(showAreas);
|
||||
|
||||
areasHidden = true;
|
||||
|
||||
useMap(true);
|
||||
}
|
||||
|
||||
function showAreas() {
|
||||
$("#browse_hide_areas_box").html(I18n.t('browse.start_rjs.hide_areas'));
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(hideAreas);
|
||||
|
||||
areasHidden = false;
|
||||
|
||||
useMap(true);
|
||||
}
|
||||
|
||||
function endDrag(bbox) {
|
||||
var bounds = bbox.getBounds();
|
||||
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
browseBoxControl.deactivate();
|
||||
browseBounds = projected;
|
||||
getData(bounds);
|
||||
|
||||
browseMode = "manual";
|
||||
|
||||
$("#browse_select_box").html(I18n.t('browse.start_rjs.manually_select'));
|
||||
$("#browse_select_view").show();
|
||||
}
|
||||
|
||||
function displayFeatureWarning(count, limit, callback) {
|
||||
clearStatus();
|
||||
|
||||
var div = document.createElement("div");
|
||||
|
||||
var p = document.createElement("p");
|
||||
p.appendChild(document.createTextNode(I18n.t("browse.start_rjs.loaded_an_area_with_num_features", { num_features: count, max_features: limit })));
|
||||
div.appendChild(p);
|
||||
|
||||
var input = document.createElement("input");
|
||||
input.type = "submit";
|
||||
input.value = I18n.t('browse.start_rjs.load_data');
|
||||
input.onclick = callback;
|
||||
div.appendChild(input);
|
||||
|
||||
$("#browse_content").html("");
|
||||
$("#browse_content").append(div);
|
||||
}
|
||||
|
||||
function customDataLoader(resp, options) {
|
||||
if (map.dataLayer.active) {
|
||||
var request = resp.priv;
|
||||
var doc = request.responseXML;
|
||||
|
||||
if (!doc || !doc.documentElement) {
|
||||
doc = request.responseText;
|
||||
}
|
||||
|
||||
resp.features = this.format.read(doc);
|
||||
|
||||
if (!this.maxFeatures || resp.features.length <= this.maxFeatures) {
|
||||
options.callback.call(options.scope, resp);
|
||||
} else {
|
||||
displayFeatureWarning(resp.features.length, this.maxFeatures, function () {
|
||||
options.callback.call(options.scope, resp);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getData(bounds, reload) {
|
||||
var projected = bounds.clone().transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));
|
||||
var size = projected.getWidth() * projected.getHeight();
|
||||
|
||||
if (size > OSM.MAX_REQUEST_AREA) {
|
||||
setStatus(I18n.t("browse.start_rjs.unable_to_load_size", { max_bbox_size: OSM.MAX_REQUEST_AREA, bbox_size: size }));
|
||||
} else {
|
||||
loadData("/api/" + OSM.API_VERSION + "/map?bbox=" + projected.toBBOX(), reload);
|
||||
}
|
||||
}
|
||||
|
||||
function loadData(url, reload) {
|
||||
setStatus(I18n.t('browse.start_rjs.loading'));
|
||||
|
||||
$("#browse_content").empty();
|
||||
|
||||
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({
|
||||
symbolizer: {
|
||||
Polygon: { fillColor: '#ff0000', strokeColor: '#ff0000' },
|
||||
Line: { fillColor: '#ffff00', strokeColor: '#000000', strokeOpacity: '0.4' },
|
||||
Point: { fillColor: '#00ff00', strokeColor: '#00ff00' }
|
||||
}
|
||||
})]);
|
||||
|
||||
if (browseDataLayer) browseDataLayer.destroyFeatures();
|
||||
|
||||
/*
|
||||
* Modern browsers are quite happy showing far more than 100 features in
|
||||
* the data browser, so increase the limit to 2000 by default, but keep
|
||||
* it restricted to 500 for IE8 and 100 for older IEs.
|
||||
*/
|
||||
var maxFeatures = 2000;
|
||||
|
||||
/*@cc_on
|
||||
if (navigator.appVersion < 8) {
|
||||
maxFeatures = 100;
|
||||
} else if (navigator.appVersion < 9) {
|
||||
maxFeatures = 500;
|
||||
}
|
||||
@*/
|
||||
|
||||
browseDataLayer = new OpenLayers.Layer.Vector("Data", {
|
||||
strategies: [
|
||||
new OpenLayers.Strategy.Fixed()
|
||||
],
|
||||
protocol: new OpenLayers.Protocol.HTTP({
|
||||
url: url,
|
||||
format: new OpenLayers.Format.OSM(formatOptions),
|
||||
maxFeatures: maxFeatures,
|
||||
handleRead: customDataLoader
|
||||
}),
|
||||
projection: new OpenLayers.Projection("EPSG:4326"),
|
||||
displayInLayerSwitcher: false,
|
||||
styleMap: new OpenLayers.StyleMap({
|
||||
'default': style,
|
||||
'select': { strokeColor: '#0000ff', strokeWidth: 8 }
|
||||
})
|
||||
});
|
||||
browseDataLayer.events.register("loadend", browseDataLayer, dataLoaded );
|
||||
map.addLayer(browseDataLayer);
|
||||
|
||||
browseSelectControl = new OpenLayers.Control.SelectFeature(browseDataLayer, { onSelect: onFeatureSelect });
|
||||
browseSelectControl.handlers.feature.stopDown = false;
|
||||
browseSelectControl.handlers.feature.stopUp = false;
|
||||
map.addControl(browseSelectControl);
|
||||
browseSelectControl.activate();
|
||||
} else {
|
||||
browseDataLayer.destroyFeatures();
|
||||
browseDataLayer.refresh({ url: url });
|
||||
}
|
||||
|
||||
browseActiveFeature = null;
|
||||
}
|
||||
|
||||
function dataLoaded() {
|
||||
if (this.map.dataLayer.active) {
|
||||
clearStatus();
|
||||
|
||||
browseObjectList = document.createElement("div");
|
||||
|
||||
var heading = document.createElement("p");
|
||||
heading.className = "browse_heading";
|
||||
heading.appendChild(document.createTextNode(I18n.t('browse.start_rjs.object_list.heading')));
|
||||
browseObjectList.appendChild(heading);
|
||||
|
||||
var list = document.createElement("ul");
|
||||
|
||||
for (var i = 0; i < this.features.length; i++) {
|
||||
var feature = this.features[i];
|
||||
|
||||
// Type, for linking
|
||||
var type = featureType(feature);
|
||||
var typeName = featureTypeName(feature);
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode(typeName + " "));
|
||||
|
||||
// Link, for viewing in the tab
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id;
|
||||
var name = featureName(feature);
|
||||
link.appendChild(document.createTextNode(name));
|
||||
link.feature = feature;
|
||||
link.onclick = OpenLayers.Function.bind(viewFeatureLink, link);
|
||||
li.appendChild(link);
|
||||
|
||||
list.appendChild(li);
|
||||
}
|
||||
|
||||
browseObjectList.appendChild(list);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = this.protocol.url;
|
||||
link.appendChild(document.createTextNode(I18n.t('browse.start_rjs.object_list.api')));
|
||||
browseObjectList.appendChild(link);
|
||||
|
||||
$("#browse_content").html(browseObjectList);
|
||||
}
|
||||
}
|
||||
|
||||
function viewFeatureLink() {
|
||||
var layer = this.feature.layer;
|
||||
|
||||
for (var i = 0; i < layer.selectedFeatures.length; i++) {
|
||||
var f = layer.selectedFeatures[i];
|
||||
layer.drawFeature(f, layer.styleMap.createSymbolizer(f, "default"));
|
||||
}
|
||||
|
||||
onFeatureSelect(this.feature);
|
||||
|
||||
if (browseMode != "auto") {
|
||||
map.setCenter(this.feature.geometry.getBounds().getCenterLonLat());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadObjectList() {
|
||||
$("#browse_content").empty();
|
||||
$("#browse_content").append(browseObjectList);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onFeatureSelect(feature) {
|
||||
// Unselect previously selected feature
|
||||
if (browseActiveFeature) {
|
||||
browseActiveFeature.layer.drawFeature(
|
||||
browseActiveFeature,
|
||||
browseActiveFeature.layer.styleMap.createSymbolizer(browseActiveFeature, "default")
|
||||
);
|
||||
}
|
||||
|
||||
// Redraw in selected style
|
||||
feature.layer.drawFeature(
|
||||
feature, feature.layer.styleMap.createSymbolizer(feature, "select")
|
||||
);
|
||||
|
||||
// If the current object is the list, don't innerHTML="", since that could clear it.
|
||||
if ($("#browse_content").firstChild == browseObjectList) {
|
||||
$("#browse_content").removeChild(browseObjectList);
|
||||
} else {
|
||||
$("#browse_content").empty();
|
||||
}
|
||||
|
||||
// Create a link back to the object list
|
||||
var div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
div.style.marginBottom = "20px";
|
||||
$("#browse_content").append(div);
|
||||
var link = document.createElement("a");
|
||||
link.href = "#";
|
||||
link.onclick = loadObjectList;
|
||||
link.appendChild(document.createTextNode(I18n.t('browse.start_rjs.object_list.back')));
|
||||
div.appendChild(link);
|
||||
|
||||
var table = document.createElement("table");
|
||||
table.width = "100%";
|
||||
table.className = "browse_heading";
|
||||
$("#browse_content").append(table);
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
table.appendChild(tr);
|
||||
|
||||
var heading = document.createElement("td");
|
||||
heading.appendChild(document.createTextNode(featureNameSelect(feature)));
|
||||
tr.appendChild(heading);
|
||||
|
||||
var td = document.createElement("td");
|
||||
td.align = "right";
|
||||
tr.appendChild(td);
|
||||
|
||||
var type = featureType(feature);
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id;
|
||||
link.appendChild(document.createTextNode(I18n.t('browse.start_rjs.object_list.details')));
|
||||
td.appendChild(link);
|
||||
|
||||
var div = document.createElement("div");
|
||||
div.className = "browse_details";
|
||||
|
||||
$("#browse_content").append(div);
|
||||
|
||||
// Now the list of attributes
|
||||
var ul = document.createElement("ul");
|
||||
for (var key in feature.attributes) {
|
||||
var li = document.createElement("li");
|
||||
var b = document.createElement("b");
|
||||
b.appendChild(document.createTextNode(key));
|
||||
li.appendChild(b);
|
||||
li.appendChild(document.createTextNode(": " + feature.attributes[key]));
|
||||
ul.appendChild(li);
|
||||
}
|
||||
|
||||
div.appendChild(ul);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id + "/history";
|
||||
link.appendChild(document.createTextNode(I18n.t('browse.start_rjs.show_history')));
|
||||
link.onclick = OpenLayers.Function.bind(loadHistory, {
|
||||
type: type, feature: feature, link: link
|
||||
});
|
||||
|
||||
div.appendChild(link);
|
||||
|
||||
// Stash the currently drawn feature
|
||||
browseActiveFeature = feature;
|
||||
}
|
||||
|
||||
function loadHistory() {
|
||||
this.link.href = "";
|
||||
this.link.innerHTML = I18n.t('browse.start_rjs.wait');
|
||||
|
||||
$.ajax("/api/" + OSM.API_VERSION + "/" + this.type + "/" + this.feature.osm_id + "/history", {
|
||||
complete: OpenLayers.Function.bind(displayHistory, this)
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function displayHistory(request) {
|
||||
if (browseActiveFeature.osm_id != this.feature.osm_id || $("#browse_content").firstChild == browseObjectList) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.link.parentNode.removeChild(this.link);
|
||||
|
||||
var doc = request.responseXML;
|
||||
|
||||
var table = document.createElement("table");
|
||||
table.width = "100%";
|
||||
table.className = "browse_heading";
|
||||
$("#browse_content").append(table);
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
table.appendChild(tr);
|
||||
|
||||
var heading = document.createElement("td");
|
||||
heading.appendChild(document.createTextNode(I18n.t("browse.start_rjs.history_for_feature", { feature: featureNameHistory(this.feature) })));
|
||||
tr.appendChild(heading);
|
||||
|
||||
var td = document.createElement("td");
|
||||
td.align = "right";
|
||||
tr.appendChild(td);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + this.type + "/" + this.feature.osm_id + "/history";
|
||||
link.appendChild(document.createTextNode(I18n.t('browse.start_rjs.details')));
|
||||
td.appendChild(link);
|
||||
|
||||
var div = document.createElement("div");
|
||||
div.className = "browse_details";
|
||||
|
||||
var nodes = doc.getElementsByTagName(this.type);
|
||||
var history = document.createElement("ul");
|
||||
for (var i = nodes.length - 1; i >= 0; i--) {
|
||||
var user = nodes[i].getAttribute("user") || I18n.t('browse.start_rjs.private_user');
|
||||
var timestamp = nodes[i].getAttribute("timestamp");
|
||||
var item = document.createElement("li");
|
||||
item.appendChild(document.createTextNode(I18n.t("browse.start_rjs.edited_by_user_at_timestamp", { user: user, timestamp: timestamp })));
|
||||
history.appendChild(item);
|
||||
}
|
||||
div.appendChild(history);
|
||||
|
||||
$("#browse_content").append(div);
|
||||
}
|
||||
|
||||
function featureType(feature) {
|
||||
if (feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
|
||||
return "node";
|
||||
} else {
|
||||
return "way";
|
||||
}
|
||||
}
|
||||
|
||||
function featureTypeName(feature) {
|
||||
if (featureType(feature) == "node") {
|
||||
return I18n.t('browse.start_rjs.object_list.type.node');
|
||||
} else if (featureType(feature) == "way") {
|
||||
return I18n.t('browse.start_rjs.object_list.type.way');
|
||||
}
|
||||
}
|
||||
|
||||
function featureName(feature) {
|
||||
var lang = $('html').attr('lang');
|
||||
if (feature.attributes['name:' + lang]) {
|
||||
return feature.attributes['name:' + lang];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else {
|
||||
return feature.osm_id;
|
||||
}
|
||||
}
|
||||
|
||||
function featureNameSelect(feature) {
|
||||
var lang = $('html').attr('lang');
|
||||
if (feature.attributes['name:' + lang]) {
|
||||
return feature.attributes['name:' + lang];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else if (featureType(feature) == "node") {
|
||||
return I18n.t("browse.start_rjs.object_list.selected.type.node", { id: feature.osm_id });
|
||||
} else if (featureType(feature) == "way") {
|
||||
return I18n.t("browse.start_rjs.object_list.selected.type.way", { id: feature.osm_id });
|
||||
}
|
||||
}
|
||||
|
||||
function featureNameHistory(feature) {
|
||||
var lang = $('html').attr('lang');
|
||||
if (feature.attributes['name:' + lang]) {
|
||||
return feature.attributes['name:' + lang];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else if (featureType(feature) == "node") {
|
||||
return I18n.t("browse.start_rjs.object_list.history.type.node", { id: feature.osm_id });
|
||||
} else if (featureType(feature) == "way") {
|
||||
return I18n.t("browse.start_rjs.object_list.history.type.way", { id: feature.osm_id });
|
||||
}
|
||||
}
|
||||
|
||||
function setStatus(status) {
|
||||
$("#browse_status").html(status);
|
||||
$("#browse_status").show();
|
||||
}
|
||||
|
||||
function clearStatus() {
|
||||
$("#browse_status").html("");
|
||||
$("#browse_status").hide();
|
||||
}
|
||||
}
|
318
app/assets/javascripts/export.js
Normal file
|
@ -0,0 +1,318 @@
|
|||
function startExport(sidebarHtml) {
|
||||
var vectors,
|
||||
box,
|
||||
transform,
|
||||
markerLayer,
|
||||
markerControl,
|
||||
epsg4326 = new OpenLayers.Projection("EPSG:4326"),
|
||||
epsg900913 = new OpenLayers.Projection("EPSG:900913");
|
||||
|
||||
vectors = new OpenLayers.Layer.Vector("Vector Layer", {
|
||||
displayInLayerSwitcher: false
|
||||
});
|
||||
map.addLayer(vectors);
|
||||
|
||||
box = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.RegularPolygon, {
|
||||
handlerOptions: {
|
||||
sides: 4,
|
||||
snapAngle: 90,
|
||||
irregular: true,
|
||||
persist: true
|
||||
}
|
||||
});
|
||||
box.handler.callbacks.done = endDrag;
|
||||
map.addControl(box);
|
||||
|
||||
transform = new OpenLayers.Control.TransformFeature(vectors, {
|
||||
rotate: false,
|
||||
irregular: true
|
||||
});
|
||||
transform.events.register("transformcomplete", transform, transformComplete);
|
||||
map.addControl(transform);
|
||||
|
||||
map.events.register("moveend", map, mapMoved);
|
||||
map.events.register("changebaselayer", map, htmlUrlChanged);
|
||||
|
||||
$("#sidebar_title").html(I18n.t('export.start_rjs.export'));
|
||||
$("#sidebar_content").html(sidebarHtml);
|
||||
|
||||
$("#maxlat,#minlon,#maxlon,#minlat").change(boundsChanged);
|
||||
|
||||
$("#drag_box").click(startDrag);
|
||||
|
||||
$("#add_marker").click(startMarker);
|
||||
|
||||
$("#format_osm,#format_mapnik,#format_html").click(formatChanged);
|
||||
|
||||
$("#mapnik_scale").change(mapnikSizeChanged);
|
||||
|
||||
openSidebar();
|
||||
|
||||
if (map.baseLayer.name == "Mapnik") {
|
||||
$("#format_mapnik").prop("checked", true);
|
||||
}
|
||||
|
||||
formatChanged();
|
||||
setBounds(map.getExtent());
|
||||
|
||||
$("body").removeClass("site-index").addClass("site-export");
|
||||
|
||||
$("#sidebar").one("closed", function () {
|
||||
$("body").removeClass("site-export").addClass("site-index");
|
||||
|
||||
clearBox();
|
||||
clearMarker();
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
map.events.unregister("changebaselayer", map, htmlUrlChanged);
|
||||
map.removeLayer(vectors);
|
||||
});
|
||||
|
||||
function getMercatorBounds() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(),
|
||||
$("#maxlon").val(), $("#maxlat").val());
|
||||
|
||||
return bounds.transform(epsg4326, epsg900913);
|
||||
}
|
||||
|
||||
function boundsChanged() {
|
||||
var bounds = getMercatorBounds();
|
||||
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
map.zoomToExtent(bounds);
|
||||
|
||||
clearBox();
|
||||
drawBox(bounds);
|
||||
|
||||
validateControls();
|
||||
mapnikSizeChanged();
|
||||
}
|
||||
|
||||
function startDrag() {
|
||||
$("#drag_box").html(I18n.t('export.start_rjs.drag_a_box'));
|
||||
|
||||
clearBox();
|
||||
box.activate();
|
||||
};
|
||||
|
||||
function endDrag(bbox) {
|
||||
var bounds = bbox.getBounds();
|
||||
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
setBounds(bounds);
|
||||
drawBox(bounds);
|
||||
box.deactivate();
|
||||
validateControls();
|
||||
|
||||
$("#drag_box").html(I18n.t('export.start_rjs.manually_select'));
|
||||
}
|
||||
|
||||
function transformComplete(event) {
|
||||
setBounds(event.feature.geometry.bounds);
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function startMarker() {
|
||||
$("#add_marker").html(I18n.t('export.start_rjs.click_add_marker'));
|
||||
|
||||
if (!markerLayer) {
|
||||
markerLayer = new OpenLayers.Layer.Vector("",{
|
||||
displayInLayerSwitcher: false,
|
||||
style: {
|
||||
externalGraphic: OpenLayers.Util.getImageLocation("marker.png"),
|
||||
graphicXOffset: -10.5,
|
||||
graphicYOffset: -25,
|
||||
graphicWidth: 21,
|
||||
graphicHeight: 25
|
||||
}
|
||||
});
|
||||
map.addLayer(markerLayer);
|
||||
|
||||
markerControl = new OpenLayers.Control.DrawFeature(markerLayer, OpenLayers.Handler.Point);
|
||||
map.addControl(markerControl);
|
||||
|
||||
markerLayer.events.on({ "featureadded": endMarker });
|
||||
}
|
||||
|
||||
markerLayer.destroyFeatures();
|
||||
markerControl.activate();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function endMarker(event) {
|
||||
markerControl.deactivate();
|
||||
|
||||
$("#add_marker").html(I18n.t('export.start_rjs.change_marker'));
|
||||
$("#marker_inputs").show();
|
||||
|
||||
var geom = event.feature.geometry.clone().transform(epsg900913, epsg4326);
|
||||
|
||||
$("#marker_lon").val(geom.x.toFixed(5));
|
||||
$("#marker_lat").val(geom.y.toFixed(5));
|
||||
|
||||
htmlUrlChanged();
|
||||
}
|
||||
|
||||
function clearMarker() {
|
||||
$("#marker_lon,#marker_lat").val("");
|
||||
$("#marker_inputs").hide();
|
||||
$("#add_marker").html(I18n.t('export.start_rjs.add_marker'));
|
||||
|
||||
if (markerLayer) {
|
||||
markerControl.destroy();
|
||||
markerLayer.destroy();
|
||||
markerLayer = null;
|
||||
markerControl = null;
|
||||
}
|
||||
}
|
||||
|
||||
function mapMoved() {
|
||||
setBounds(map.getExtent());
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function setBounds(bounds) {
|
||||
var toPrecision = zoomPrecision(map.getZoom());
|
||||
|
||||
bounds = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
$("#minlon").val(toPrecision(bounds.left));
|
||||
$("#minlat").val(toPrecision(bounds.bottom));
|
||||
$("#maxlon").val(toPrecision(bounds.right));
|
||||
$("#maxlat").val(toPrecision(bounds.top));
|
||||
|
||||
mapnikSizeChanged();
|
||||
htmlUrlChanged();
|
||||
}
|
||||
|
||||
function clearBox() {
|
||||
transform.deactivate();
|
||||
vectors.destroyFeatures();
|
||||
}
|
||||
|
||||
function drawBox(bounds) {
|
||||
var feature = new OpenLayers.Feature.Vector(bounds.toGeometry());
|
||||
|
||||
vectors.addFeatures(feature);
|
||||
transform.setFeature(feature);
|
||||
}
|
||||
|
||||
function validateControls() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
|
||||
if (bounds.getWidth() * bounds.getHeight() > OSM.MAX_REQUEST_AREA) {
|
||||
$("#export_osm_too_large").show();
|
||||
} else {
|
||||
$("#export_osm_too_large").hide();
|
||||
}
|
||||
|
||||
var max_scale = maxMapnikScale();
|
||||
var disabled = true;
|
||||
|
||||
if ($("#format_osm").prop("checked")) {
|
||||
disabled = bounds.getWidth() * bounds.getHeight() > OSM.MAX_REQUEST_AREA;
|
||||
} else if ($("#format_mapnik").prop("checked")) {
|
||||
disabled = $("#mapnik_scale").val() < max_scale;
|
||||
}
|
||||
|
||||
$("#export_commit").prop("disabled", disabled);
|
||||
$("#mapnik_max_scale").html(roundScale(max_scale));
|
||||
}
|
||||
|
||||
function htmlUrlChanged() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
var layerName = map.baseLayer.keyid;
|
||||
var url = "http://" + OSM.SERVER_URL + "/export/embed.html?bbox=" + bounds.toBBOX() + "&layer=" + layerName;
|
||||
var markerUrl = "";
|
||||
|
||||
if ($("#marker_lat").val() && $("#marker_lon").val()) {
|
||||
markerUrl = "&mlat=" + $("#marker_lat").val() + "&mlon=" + $("#marker_lon").val();
|
||||
url += "&marker=" + $("#marker_lat").val() + "," + $("#marker_lon").val();
|
||||
}
|
||||
|
||||
var html = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'" style="border: 1px solid black"></iframe>';
|
||||
|
||||
// Create "larger map" link
|
||||
var center = bounds.getCenterLonLat();
|
||||
|
||||
bounds.transform(epsg4326, epsg900913);
|
||||
var zoom = map.getZoomForExtent(bounds);
|
||||
|
||||
var layers = getMapLayers();
|
||||
|
||||
var text = I18n.t('export.start_rjs.view_larger_map');
|
||||
var escaped = [];
|
||||
|
||||
for (var i = 0; i < text.length; ++i) {
|
||||
var c = text.charCodeAt(i);
|
||||
escaped.push(c < 127 ? text.charAt(i) : "&#" + c + ";");
|
||||
}
|
||||
|
||||
html += '<br /><small><a href="http://' + OSM.SERVER_URL + '/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">'+escaped.join("")+'</a></small>';
|
||||
|
||||
$("#export_html_text").val(html);
|
||||
|
||||
if ($("#format_html").prop("checked")) {
|
||||
$("#export_html_text").prop("selected", true);
|
||||
}
|
||||
}
|
||||
|
||||
function formatChanged() {
|
||||
$("#export_commit").show();
|
||||
|
||||
if ($("#format_osm").prop("checked")) {
|
||||
$("#export_osm").show();
|
||||
} else {
|
||||
$("#export_osm").hide();
|
||||
}
|
||||
|
||||
if ($("#format_mapnik").prop("checked")) {
|
||||
$("#mapnik_scale").val(roundScale(map.getScale()));
|
||||
$("#export_mapnik").show();
|
||||
|
||||
mapnikSizeChanged();
|
||||
} else {
|
||||
$("#export_mapnik").hide();
|
||||
}
|
||||
|
||||
if ($("#format_html").prop("checked")) {
|
||||
$("#export_html").show();
|
||||
$("#export_commit").hide();
|
||||
$("#export_html_text").prop("selected", true);
|
||||
} else {
|
||||
$("#export_html").hide();
|
||||
|
||||
clearMarker();
|
||||
}
|
||||
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function maxMapnikScale() {
|
||||
var bounds = getMercatorBounds();
|
||||
|
||||
return Math.floor(Math.sqrt(bounds.getWidth() * bounds.getHeight() / 0.3136));
|
||||
}
|
||||
|
||||
function mapnikImageSize(scale) {
|
||||
var bounds = getMercatorBounds();
|
||||
|
||||
return new OpenLayers.Size(Math.round(bounds.getWidth() / scale / 0.00028),
|
||||
Math.round(bounds.getHeight() / scale / 0.00028));
|
||||
}
|
||||
|
||||
function roundScale(scale) {
|
||||
var precision = 5 * Math.pow(10, Math.floor(Math.LOG10E * Math.log(scale)) - 2);
|
||||
|
||||
return precision * Math.ceil(scale / precision);
|
||||
}
|
||||
|
||||
function mapnikSizeChanged() {
|
||||
var size = mapnikImageSize($("#mapnik_scale").val());
|
||||
|
||||
$("#mapnik_image_width").html(size.w);
|
||||
$("#mapnik_image_height").html(size.h);
|
||||
|
||||
validateControls();
|
||||
}
|
||||
}
|
9
app/assets/javascripts/globals.js.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
OSM = {
|
||||
<% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) %>
|
||||
PIWIK_LOCATION: <%= PIWIK_LOCATION.to_json %>,
|
||||
PIWIK_SITE: <%= PIWIK_SITE.to_json %>,
|
||||
<% end %>
|
||||
MAX_REQUEST_AREA: <%= MAX_REQUEST_AREA.to_json %>,
|
||||
SERVER_URL: <%= SERVER_URL.to_json %>,
|
||||
API_VERSION: <%= API_VERSION.to_json %>
|
||||
};
|
36
app/assets/javascripts/key.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
$(document).ready(function () {
|
||||
$("#open_map_key").click(function (e) {
|
||||
var url = $(this).attr('href'),
|
||||
title = $(this).text();
|
||||
|
||||
function updateMapKey() {
|
||||
var mapLayer = map.baseLayer.keyid,
|
||||
mapZoom = map.getZoom();
|
||||
|
||||
$(".mapkey-table-entry").each(function () {
|
||||
var data = $(this).data();
|
||||
|
||||
if (mapLayer == data.layer &&
|
||||
mapZoom >= data.zoomMin && mapZoom <= data.zoomMax) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#sidebar_content").load(url, updateMapKey);
|
||||
|
||||
openSidebar({ title: title });
|
||||
|
||||
$("#sidebar").one("closed", function () {
|
||||
map.events.unregister("zoomend", map, updateMapKey);
|
||||
map.events.unregister("changelayer", map, updateMapKey);
|
||||
});
|
||||
|
||||
map.events.register("zoomend", map, updateMapKey);
|
||||
map.events.register("changelayer", map, updateMapKey);
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
|
@ -22,7 +22,7 @@ function createMap(divName, options) {
|
|||
theme: "<%= asset_path 'theme/openstreetmap/style.css' %>"
|
||||
});
|
||||
|
||||
var mapnik = new OpenLayers.Layer.OSM.Mapnik(i18n("javascripts.map.base.standard"), {
|
||||
var mapnik = new OpenLayers.Layer.OSM.Mapnik(I18n.t("javascripts.map.base.standard"), {
|
||||
attribution: "",
|
||||
keyid: "mapnik",
|
||||
displayOutsideMaxExtent: true,
|
||||
|
@ -31,7 +31,7 @@ function createMap(divName, options) {
|
|||
});
|
||||
map.addLayer(mapnik);
|
||||
|
||||
var cyclemap = new OpenLayers.Layer.OSM.CycleMap(i18n("javascripts.map.base.cycle_map"), {
|
||||
var cyclemap = new OpenLayers.Layer.OSM.CycleMap(I18n.t("javascripts.map.base.cycle_map"), {
|
||||
attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
|
||||
keyid: "cyclemap",
|
||||
displayOutsideMaxExtent: true,
|
||||
|
@ -40,7 +40,7 @@ function createMap(divName, options) {
|
|||
});
|
||||
map.addLayer(cyclemap);
|
||||
|
||||
var transportmap = new OpenLayers.Layer.OSM.TransportMap(i18n("javascripts.map.base.transport_map"), {
|
||||
var transportmap = new OpenLayers.Layer.OSM.TransportMap(I18n.t("javascripts.map.base.transport_map"), {
|
||||
attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
|
||||
keyid: "transportmap",
|
||||
displayOutsideMaxExtent: true,
|
||||
|
@ -49,7 +49,7 @@ function createMap(divName, options) {
|
|||
});
|
||||
map.addLayer(transportmap);
|
||||
|
||||
var mapquest = new OpenLayers.Layer.OSM(i18n("javascripts.map.base.mapquest"), [
|
||||
var mapquest = new OpenLayers.Layer.OSM(I18n.t("javascripts.map.base.mapquest"), [
|
||||
"http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
|
||||
"http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
|
||||
"http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",
|
||||
|
@ -71,6 +71,16 @@ function createMap(divName, options) {
|
|||
});
|
||||
map.addLayer(markers);
|
||||
|
||||
map.dataLayer = new OpenLayers.Layer(I18n.t('browse.start_rjs.data_layer_name'), {
|
||||
visibility: false,
|
||||
displayInLayerSwitcher: false
|
||||
});
|
||||
map.addLayer(map.dataLayer);
|
||||
|
||||
$("#" + divName).on("resized", function () {
|
||||
map.updateSize();
|
||||
});
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,3 +35,5 @@ OpenLayers.Util.origGetImageLocation = OpenLayers.Util.getImageLocation;
|
|||
OpenLayers.Util.getImageLocation = function(image) {
|
||||
return OpenLayers.Util.imageURLs[image] || OpenLayers.Util.origGetImageLocation(image);
|
||||
};
|
||||
|
||||
OpenLayers.Lang.setCode($('html').attr('lang'));
|
||||
|
|
100
app/assets/javascripts/params.js
Normal file
|
@ -0,0 +1,100 @@
|
|||
OSM.mapParams = function (search) {
|
||||
var params = {}, mapParams = {}, loc;
|
||||
|
||||
search = (search || window.location.search).replace('?', '').split('&');
|
||||
|
||||
for (var i = 0; i < search.length; ++i) {
|
||||
var pair = search[i],
|
||||
j = pair.indexOf('='),
|
||||
key = pair.slice(0, j),
|
||||
val = pair.slice(++j);
|
||||
params[key] = decodeURIComponent(val);
|
||||
}
|
||||
|
||||
if (params.mlon && params.mlat) {
|
||||
mapParams.marker = true;
|
||||
mapParams.mlon = parseFloat(params.mlon);
|
||||
mapParams.mlat = parseFloat(params.mlat);
|
||||
}
|
||||
|
||||
if (params.layers) {
|
||||
mapParams.layers = params.layers;
|
||||
}
|
||||
|
||||
if (params.node || params.way || params.relation) {
|
||||
mapParams.object = true;
|
||||
mapParams.object_zoom = true;
|
||||
|
||||
if (params.node) {
|
||||
mapParams.object_type = 'node';
|
||||
mapParams.object_id = parseInt(params.node);
|
||||
} else if (params.way) {
|
||||
mapParams.object_type = 'way';
|
||||
mapParams.object_id = parseInt(params.way);
|
||||
} else if (params.relation) {
|
||||
mapParams.object_type = 'relation';
|
||||
mapParams.object_id = parseInt(params.relation);
|
||||
}
|
||||
}
|
||||
|
||||
// Decide on a lat lon to initialise the map with. Various ways of doing this
|
||||
if (params.bbox) {
|
||||
var bbox = params.bbox.split(",");
|
||||
mapParams.bbox = true;
|
||||
mapParams.minlon = parseFloat(bbox[0]);
|
||||
mapParams.minlat = parseFloat(bbox[1]);
|
||||
mapParams.maxlon = parseFloat(bbox[2]);
|
||||
mapParams.maxlat = parseFloat(bbox[3]);
|
||||
mapParams.object_zoom = false;
|
||||
} else if (params.minlon && params.minlat && params.maxlon && params.maxlat) {
|
||||
mapParams.bbox = true;
|
||||
mapParams.minlon = parseFloat(params.minlon);
|
||||
mapParams.minlat = parseFloat(params.minlat);
|
||||
mapParams.maxlon = parseFloat(params.maxlon);
|
||||
mapParams.maxlat = parseFloat(params.maxlat);
|
||||
mapParams.object_zoom = false;
|
||||
} else if (params.lon && params.lat) {
|
||||
mapParams.lon = parseFloat(params.lon);
|
||||
mapParams.lat = parseFloat(params.lat);
|
||||
mapParams.zoom = parseInt(params.zoom || 5);
|
||||
mapParams.object_zoom = false;
|
||||
} else if (params.mlon && params.mlat) {
|
||||
mapParams.lon = parseFloat(params.mlon);
|
||||
mapParams.lat = parseFloat(params.mlat);
|
||||
mapParams.zoom = parseInt(params.zoom || 12);
|
||||
mapParams.object_zoom = false;
|
||||
} else if (loc = $.cookie('_osm_location')) {
|
||||
loc = loc.split("|");
|
||||
mapParams.lon = parseFloat(loc[0]);
|
||||
mapParams.lat = parseFloat(loc[1]);
|
||||
mapParams.zoom = parseInt(loc[2]);
|
||||
mapParams.layers = loc[3];
|
||||
} else if (OSM.home) {
|
||||
mapParams.lon = OSM.home.lon;
|
||||
mapParams.lat = OSM.home.lat;
|
||||
mapParams.zoom = 10;
|
||||
} else if (OSM.location) {
|
||||
mapParams.bbox = true;
|
||||
mapParams.minlon = OSM.location.minlon;
|
||||
mapParams.minlat = OSM.location.minlat;
|
||||
mapParams.maxlon = OSM.location.maxlon;
|
||||
mapParams.maxlat = OSM.location.maxlat;
|
||||
} else {
|
||||
mapParams.lon = -0.1;
|
||||
mapParams.lat = 51.5;
|
||||
mapParams.zoom = parseInt(params.zoom || 5);
|
||||
}
|
||||
|
||||
if (mapParams.bbox) {
|
||||
mapParams.box = params.box == "yes";
|
||||
mapParams.lon = (mapParams.minlon + mapParams.maxlon) / 2;
|
||||
mapParams.lat = (mapParams.minlat + mapParams.maxlat) / 2;
|
||||
}
|
||||
|
||||
var scale = parseFloat(params.scale);
|
||||
if (scale > 0) {
|
||||
mapParams.zoom = Math.log(360.0 / (scale * 512.0)) / Math.log(2.0);
|
||||
}
|
||||
|
||||
return mapParams;
|
||||
};
|
21
app/assets/javascripts/piwik.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
if (OSM.PIWIK_LOCATION && OSM.PIWIK_SITE) {
|
||||
$(document).ready(function () {
|
||||
var base = document.location.protocol + "//" + OSM.PIWIK_LOCATION + "/";
|
||||
|
||||
$.ajax({
|
||||
url: base + "piwik.js",
|
||||
dataType: "script",
|
||||
cache: true,
|
||||
success: function () {
|
||||
var piwikTracker = Piwik.getTracker(base + "piwik.php", OSM.PIWIK_SITE);
|
||||
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
|
||||
$("meta[name=piwik-goal]").each(function () {
|
||||
piwikTracker.trackGoal($(this).attr("content"));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
53
app/assets/javascripts/resize.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
function resizeContent() {
|
||||
var content = $("#content");
|
||||
var leftMargin = parseInt(content.css("left"));
|
||||
var rightMargin = parseInt(content.css("right"));
|
||||
var bottomMargin = parseInt(content.css("bottom"));
|
||||
|
||||
if ($("html").attr("dir") == "ltr") {
|
||||
content.width($(window).width() - content.prop("offsetLeft") - rightMargin);
|
||||
} else {
|
||||
content.width($(window).width() - content.prop("offsetRight") - leftMargin);
|
||||
}
|
||||
|
||||
content.height($(window).height() - content.prop("offsetTop") - bottomMargin);
|
||||
}
|
||||
|
||||
function resizeMap() {
|
||||
var content_width = $("#content").width();
|
||||
var content_height = $("#content").height();
|
||||
var sidebar_width = 0;
|
||||
var left_border = parseFloat($("#map").css("border-left-width"));
|
||||
var right_border = parseFloat($("#map").css("border-right-width"));
|
||||
var top_border = parseFloat($("#map").css("border-top-width"));
|
||||
var bottom_border = parseFloat($("#map").css("border-bottom-width"));
|
||||
|
||||
$("#sidebar:visible").each(function () {
|
||||
sidebar_width = sidebar_width + $(this).outerWidth(true);
|
||||
});
|
||||
|
||||
if ($("html").attr("dir") == "ltr") {
|
||||
$("#map").css("left", (sidebar_width) + "px");
|
||||
} else {
|
||||
$("#map").css("right", (sidebar_width) + "px");
|
||||
}
|
||||
|
||||
$("#map").width(content_width - sidebar_width - left_border - right_border);
|
||||
$("#map").height(content_height - top_border - bottom_border);
|
||||
$("#map").trigger("resized");
|
||||
}
|
||||
|
||||
function handleResize() {
|
||||
var brokenContentSize = $("#content").prop("offsetWidth") == 0;
|
||||
|
||||
if (brokenContentSize) {
|
||||
resizeContent();
|
||||
}
|
||||
|
||||
resizeMap();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#sidebar").on("opened", resizeMap);
|
||||
$("#sidebar").on("closed", resizeMap);
|
||||
});
|
68
app/assets/javascripts/richtext.js
Normal file
|
@ -0,0 +1,68 @@
|
|||
$(document).ready(function () {
|
||||
/* Hide the preview panes */
|
||||
$(".richtext_preview").hide();
|
||||
|
||||
/*
|
||||
* When the text in an edit pane is changed, clear the contents of
|
||||
* the associated preview pne so that it will be regenerated when
|
||||
* the user next switches to it.
|
||||
*/
|
||||
$(".richtext_content textarea").change(function () {
|
||||
$(this).parents(".richtext_container").find(".richtext_preview").empty();
|
||||
});
|
||||
|
||||
/* Disable all the edit buttons */
|
||||
$(".richtext_doedit").prop("disabled", true);
|
||||
|
||||
/* Enable the preview buttons */
|
||||
$(".richtext_dopreview").prop("disabled", false);
|
||||
|
||||
/*
|
||||
* Install a click handler to switch to edit mode when the
|
||||
* edit button is pressed.
|
||||
*/
|
||||
$(".richtext_doedit").click(function (event) {
|
||||
var editor = $(this).parents(".richtext_container").find("textarea");
|
||||
var preview = $(this).parents(".richtext_container").find(".richtext_preview");
|
||||
|
||||
preview.hide();
|
||||
editor.show();
|
||||
|
||||
$(this).siblings(".richtext_dopreview").prop("disabled", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/*
|
||||
* Install a click handler to switch to preview mode when the
|
||||
* preview button is pressed.
|
||||
*/
|
||||
$(".richtext_dopreview").click(function (event) {
|
||||
var editor = $(this).parents(".richtext_container").find("textarea");
|
||||
var preview = $(this).parents(".richtext_container").find(".richtext_preview");
|
||||
var width = editor.outerWidth() - preview.outerWidth() + preview.innerWidth();
|
||||
var minHeight = editor.outerHeight() - preview.outerHeight() + preview.innerHeight();
|
||||
|
||||
if (preview.contents().length == 0) {
|
||||
preview.oneTime(500, "loading", function () {
|
||||
preview.addClass("loading");
|
||||
});
|
||||
|
||||
preview.load(editor.data("previewUrl"), { text: editor.val() }, function () {
|
||||
preview.stopTime("loading");
|
||||
preview.removeClass("loading");
|
||||
});
|
||||
}
|
||||
|
||||
editor.hide();
|
||||
preview.width(width);
|
||||
preview.css("min-height", minHeight + "px");
|
||||
preview.show();
|
||||
|
||||
$(this).siblings(".richtext_doedit").prop("disabled", false);
|
||||
$(this).prop("disabled", true);
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
24
app/assets/javascripts/sidebar.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
function openSidebar(options) {
|
||||
options = options || {};
|
||||
|
||||
$("#sidebar").trigger("closed");
|
||||
|
||||
if (options.title) { $("#sidebar_title").html(options.title); }
|
||||
|
||||
if (options.width) { $("#sidebar").width(options.width); }
|
||||
else { $("#sidebar").width("30%"); }
|
||||
|
||||
$("#sidebar").css("display", "block");
|
||||
|
||||
$("#sidebar").trigger("opened");
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".sidebar_close").click(function (e) {
|
||||
$("#sidebar").css("display", "none");
|
||||
|
||||
$("#sidebar").trigger("closed");
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
|
@ -64,6 +64,10 @@ h2 {
|
|||
margin: 25px 0 5px 0;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#logo h1 {
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
|
@ -83,6 +87,10 @@ h2 {
|
|||
display: none;
|
||||
}
|
||||
|
||||
#small-title img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
/* Rules for the introductory text displayed in the left sidebar to new users */
|
||||
|
||||
.sidebar-copy {
|
||||
|
@ -322,9 +330,16 @@ h2 {
|
|||
padding: 5px 10px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
-webkit-transition: color 200ms ease-in;
|
||||
-moz-transition: color 200ms ease-in;
|
||||
-o-transition: color 200ms ease-in;
|
||||
transition: color 200ms ease-in;
|
||||
}
|
||||
|
||||
#tabnav a:link.active, #tabnav a:visited.active {
|
||||
body.site-index #tabnav a#viewanchor,
|
||||
body.site-edit #tabnav a#editanchor,
|
||||
body.changeset-list #tabnav a#historyanchor,
|
||||
body.site-export #tabnav a#exportanchor {
|
||||
border-bottom: 1px solid #aaa;
|
||||
background: #9ed485;
|
||||
color: #000;
|
||||
|
@ -383,6 +398,7 @@ h2 {
|
|||
|
||||
#map {
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
@ -496,7 +512,10 @@ h2 {
|
|||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#mapkey .mapkey-table-key {
|
||||
#mapkey .mapkey-table-key img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#mapkey .mapkey-table-value {
|
||||
|
@ -595,9 +614,9 @@ h2 {
|
|||
bottom: 0px;
|
||||
}
|
||||
|
||||
#content.site_index,
|
||||
#content.site_edit,
|
||||
#content.site_export {
|
||||
.site-index #content,
|
||||
.site-edit #content,
|
||||
.site-export #content {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
@ -635,7 +654,7 @@ h2 {
|
|||
|
||||
/* Rules for the home page */
|
||||
|
||||
.site_index #map {
|
||||
.site-index #map {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
|
@ -643,7 +662,7 @@ h2 {
|
|||
right: 0px;
|
||||
}
|
||||
|
||||
.site_export #map {
|
||||
.site-export #map {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
|
@ -653,12 +672,13 @@ h2 {
|
|||
|
||||
/* Rules for the edit page */
|
||||
|
||||
.site_edit #map {
|
||||
.site-edit #map {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Rules for the changeset list shown by the history tab etc */
|
||||
|
@ -941,14 +961,14 @@ p#contributorGuidance {
|
|||
|
||||
/* Rules for the user view */
|
||||
|
||||
.user_view .user_map {
|
||||
.user-view .user_map {
|
||||
position: relative;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.user_view .user_map p#no_home_location {
|
||||
.user-view .user_map p#no_home_location {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
|
|
|
@ -148,17 +148,21 @@ html body {
|
|||
|
||||
/* Rules for the diary list */
|
||||
|
||||
.diary_entry_list img.user_thumbnail {
|
||||
.diary_entry-list img.user_image {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.diary_entry-list img.user_thumbnail {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Rules for the diary entry view */
|
||||
|
||||
.diary_entry_view img.user_image {
|
||||
.diary_entry-view img.user_image {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.diary_entry_view img.user_thumbnail {
|
||||
.diary_entry-view img.user_thumbnail {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
@ -180,11 +184,11 @@ form#termsForm input#agree {
|
|||
|
||||
/* Rules for the user view */
|
||||
|
||||
.user_view img.user_image {
|
||||
.user-view img.user_image {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.user_view .user_map {
|
||||
.user-view .user_map {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,17 +148,21 @@ html body {
|
|||
|
||||
/* Rules for the diary list */
|
||||
|
||||
.diary_entry_list img.user_thumbnail {
|
||||
.diary_entry-list img.user_image {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.diary_entry-list img.user_thumnbail {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Rules for the diary entry view */
|
||||
|
||||
.diary_entry_view img.user_image {
|
||||
.diary_entry-view img.user_image {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.diary_entry_view img.user_thumbnail {
|
||||
.diary_entry-view img.user_thumbnail {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
@ -180,11 +184,11 @@ form#termsForm input#agree {
|
|||
|
||||
/* Rules for the user view */
|
||||
|
||||
.user_view img.user_image {
|
||||
.user-view img.user_image {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.user_view .user_map {
|
||||
.user-view .user_map {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ h1 {
|
|||
border-right: 0px;
|
||||
}
|
||||
|
||||
#content.site_index {
|
||||
.site-index #content {
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
top: 38px;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class BrowseController < ApplicationController
|
||||
layout 'site'
|
||||
layout 'site', :except => [ :start ]
|
||||
|
||||
before_filter :authorize_web
|
||||
before_filter :set_locale
|
||||
|
@ -7,11 +7,6 @@ class BrowseController < ApplicationController
|
|||
around_filter :web_timeout, :except => [:start]
|
||||
|
||||
def start
|
||||
@max_features = case
|
||||
when browser.ie? && browser.version.to_i < 8 then 100
|
||||
when browser.ie? && browser.version.to_i < 9 then 500
|
||||
else 2000
|
||||
end
|
||||
end
|
||||
|
||||
def relation
|
||||
|
|
|
@ -37,6 +37,7 @@ class DiaryEntryController < ApplicationController
|
|||
default_lang = @user.preferences.where(:k => "diary.default_language").first
|
||||
lang_code = default_lang ? default_lang.v : @user.preferred_language
|
||||
@diary_entry = DiaryEntry.new(:language_code => lang_code)
|
||||
set_map_location
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
@ -47,11 +48,11 @@ class DiaryEntryController < ApplicationController
|
|||
|
||||
if @user != @diary_entry.user
|
||||
redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
|
||||
elsif params[:diary_entry]
|
||||
if @diary_entry.update_attributes(params[:diary_entry])
|
||||
redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
|
||||
end
|
||||
elsif params[:diary_entry] and @diary_entry.update_attributes(params[:diary_entry])
|
||||
redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
|
||||
end
|
||||
|
||||
set_map_location
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render :action => "no_such_entry", :status => :not_found
|
||||
end
|
||||
|
@ -212,4 +213,22 @@ private
|
|||
def user_specific_list?
|
||||
params[:friends] or params[:nearby]
|
||||
end
|
||||
|
||||
##
|
||||
# decide on a location for the diary entry map
|
||||
def set_map_location
|
||||
if @diary_entry.latitude and @diary_entry.longitude
|
||||
@lon = @diary_entry.longitude
|
||||
@lat = @diary_entry.latitude
|
||||
@zoom = 12
|
||||
elsif @user.home_lat.nil? or @user.home_lon.nil?
|
||||
@lon = params[:lon] || -0.1
|
||||
@lat = params[:lat] || 51.5
|
||||
@zoom = params[:zoom] || 4
|
||||
else
|
||||
@lon = @user.home_lon
|
||||
@lat = @user.home_lat
|
||||
@zoom = 12
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -132,84 +132,6 @@ class GeocoderController < ApplicationController
|
|||
render :action => "error"
|
||||
end
|
||||
|
||||
def search_osm_namefinder
|
||||
# get query parameters
|
||||
query = params[:query]
|
||||
|
||||
# create result array
|
||||
@results = Array.new
|
||||
|
||||
# ask OSM namefinder
|
||||
response = fetch_xml("http://gazetteer.openstreetmap.org/namefinder/search.xml?find=#{escape_query(query)}")
|
||||
|
||||
# parse the response
|
||||
response.elements.each("searchresults/named") do |named|
|
||||
lat = named.attributes["lat"].to_s
|
||||
lon = named.attributes["lon"].to_s
|
||||
zoom = named.attributes["zoom"].to_s
|
||||
place = named.elements["place/named"] || named.elements["nearestplaces/named"]
|
||||
type = named.attributes["info"].to_s.capitalize
|
||||
name = named.attributes["name"].to_s
|
||||
description = named.elements["description"].to_s
|
||||
|
||||
if name.empty?
|
||||
prefix = ""
|
||||
name = type
|
||||
else
|
||||
prefix = t "geocoder.search_osm_namefinder.prefix", :type => type
|
||||
end
|
||||
|
||||
if place
|
||||
distance = format_distance(place.attributes["approxdistance"].to_i)
|
||||
direction = format_direction(place.attributes["direction"].to_i)
|
||||
placename = format_name(place.attributes["name"].to_s)
|
||||
suffix = t "geocoder.search_osm_namefinder.suffix_place", :distance => distance, :direction => direction, :placename => placename
|
||||
|
||||
if place.attributes["rank"].to_i <= 30
|
||||
parent = nil
|
||||
parentrank = 0
|
||||
parentscore = 0
|
||||
|
||||
place.elements.each("nearestplaces/named") do |nearest|
|
||||
nearestrank = nearest.attributes["rank"].to_i
|
||||
nearestscore = nearestrank / nearest.attributes["distance"].to_f
|
||||
|
||||
if nearestrank > 30 and
|
||||
( nearestscore > parentscore or
|
||||
( nearestscore == parentscore and nearestrank > parentrank ) )
|
||||
parent = nearest
|
||||
parentrank = nearestrank
|
||||
parentscore = nearestscore
|
||||
end
|
||||
end
|
||||
|
||||
if parent
|
||||
parentname = format_name(parent.attributes["name"].to_s)
|
||||
|
||||
if place.attributes["info"].to_s == "suburb"
|
||||
suffix = t "geocoder.search_osm_namefinder.suffix_suburb", :suffix => suffix, :parentname => parentname
|
||||
else
|
||||
parentdistance = format_distance(parent.attributes["approxdistance"].to_i)
|
||||
parentdirection = format_direction(parent.attributes["direction"].to_i)
|
||||
suffix = t "geocoder.search_osm_namefinder.suffix_parent", :suffix => suffix, :parentdistance => parentdistance, :parentdirection => parentdirection, :parentname => parentname
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
suffix = ""
|
||||
end
|
||||
|
||||
@results.push({:lat => lat, :lon => lon, :zoom => zoom,
|
||||
:prefix => prefix, :name => name, :suffix => suffix,
|
||||
:description => description})
|
||||
end
|
||||
|
||||
render :action => "results"
|
||||
rescue Exception => ex
|
||||
@error = "Error contacting gazetteer.openstreetmap.org: #{ex.to_s}"
|
||||
render :action => "error"
|
||||
end
|
||||
|
||||
def search_osm_nominatim
|
||||
# get query parameters
|
||||
query = params[:query]
|
||||
|
@ -299,42 +221,6 @@ class GeocoderController < ApplicationController
|
|||
@sources.push({ :name => "geonames" })
|
||||
end
|
||||
|
||||
def description_osm_namefinder
|
||||
# get query parameters
|
||||
lat = params[:lat]
|
||||
lon = params[:lon]
|
||||
types = params[:types]
|
||||
max = params[:max]
|
||||
|
||||
# create result array
|
||||
@results = Array.new
|
||||
|
||||
# ask OSM namefinder
|
||||
response = fetch_xml("http://gazetteer.openstreetmap.org/namefinder/search.xml?find=#{types}+near+#{lat},#{lon}&max=#{max}")
|
||||
|
||||
# parse the response
|
||||
response.elements.each("searchresults/named") do |named|
|
||||
lat = named.attributes["lat"].to_s
|
||||
lon = named.attributes["lon"].to_s
|
||||
zoom = named.attributes["zoom"].to_s
|
||||
place = named.elements["place/named"] || named.elements["nearestplaces/named"]
|
||||
type = named.attributes["info"].to_s
|
||||
name = named.attributes["name"].to_s
|
||||
description = named.elements["description"].to_s
|
||||
distance = format_distance(place.attributes["approxdistance"].to_i)
|
||||
direction = format_direction((place.attributes["direction"].to_i - 180) % 360)
|
||||
prefix = t "geocoder.description_osm_namefinder.prefix", :distance => distance, :direction => direction, :type => type
|
||||
@results.push({:lat => lat, :lon => lon, :zoom => zoom,
|
||||
:prefix => prefix.capitalize, :name => name,
|
||||
:description => description})
|
||||
end
|
||||
|
||||
render :action => "results"
|
||||
rescue Exception => ex
|
||||
@error = "Error contacting gazetteer.openstreetmap.org: #{ex.to_s}"
|
||||
render :action => "error"
|
||||
end
|
||||
|
||||
def description_osm_nominatim
|
||||
# get query parameters
|
||||
lat = params[:lat]
|
||||
|
@ -344,7 +230,7 @@ class GeocoderController < ApplicationController
|
|||
# create result array
|
||||
@results = Array.new
|
||||
|
||||
# ask OSM namefinder
|
||||
# ask nominatim
|
||||
response = fetch_xml("#{NOMINATIM_URL}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{request.user_preferred_languages.join(',')}")
|
||||
|
||||
# parse the response
|
||||
|
|
|
@ -38,6 +38,8 @@ class MessageController < ApplicationController
|
|||
message = Message.find(params[:message_id])
|
||||
|
||||
if message.to_user_id == @user.id then
|
||||
message.update_attribute(:message_read, true)
|
||||
|
||||
@body = "On #{message.sent_on} #{message.sender.display_name} wrote:\n\n#{message.body.gsub(/^/, '> ')}"
|
||||
@title = @subject = "Re: #{message.title.sub(/^Re:\s*/, '')}"
|
||||
@this_user = User.find(message.from_user_id)
|
||||
|
|
|
@ -6,8 +6,10 @@ class SiteController < ApplicationController
|
|||
before_filter :set_locale
|
||||
before_filter :require_user, :only => [:edit]
|
||||
|
||||
def export
|
||||
render :action => 'index'
|
||||
def index
|
||||
unless STATUS == :database_readonly or STATUS == :database_offline
|
||||
session[:location] ||= OSM::IPLocation(request.env['REMOTE_ADDR'])
|
||||
end
|
||||
end
|
||||
|
||||
def permalink
|
||||
|
@ -37,48 +39,6 @@ class SiteController < ApplicationController
|
|||
|
||||
if editor == "remote"
|
||||
render :action => :index
|
||||
else
|
||||
# Decide on a lat lon to initialise potlatch with. Various ways of doing this
|
||||
if params['lon'] and params['lat']
|
||||
@lon = params['lon'].to_f
|
||||
@lat = params['lat'].to_f
|
||||
@zoom = params['zoom'].to_i
|
||||
|
||||
elsif params['mlon'] and params['mlat']
|
||||
@lon = params['mlon'].to_f
|
||||
@lat = params['mlat'].to_f
|
||||
@zoom = params['zoom'].to_i
|
||||
|
||||
elsif params['bbox']
|
||||
bbox = BoundingBox.from_bbox_params(params)
|
||||
|
||||
@lon = bbox.centre_lon
|
||||
@lat = bbox.centre_lat
|
||||
@zoom = 16
|
||||
elsif params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat']
|
||||
bbox = BoundingBox.from_lon_lat_params(params)
|
||||
|
||||
@lon = bbox.centre_lon
|
||||
@lat = bbox.centre_lat
|
||||
@zoom = 16
|
||||
|
||||
elsif params['gpx']
|
||||
@lon = Trace.find(params['gpx']).longitude
|
||||
@lat = Trace.find(params['gpx']).latitude
|
||||
|
||||
elsif cookies.key?("_osm_location")
|
||||
@lon, @lat, @zoom, layers = cookies["_osm_location"].split("|")
|
||||
|
||||
elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
|
||||
@lon = @user.home_lon
|
||||
@lat = @user.home_lat
|
||||
|
||||
else
|
||||
#catch all. Do nothing. lat=nil, lon=nil
|
||||
#Currently this results in potlatch starting up at 0,0 (Atlantic ocean).
|
||||
end
|
||||
|
||||
@zoom = '17' if @zoom.nil?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -259,10 +259,6 @@ class UserController < ApplicationController
|
|||
else
|
||||
password_authentication(params[:username], params[:password])
|
||||
end
|
||||
elsif params[:notice]
|
||||
flash.now[:notice] = t "user.login.notice_#{params[:notice]}"
|
||||
elsif flash[:notice].nil?
|
||||
flash.now[:notice] = t 'user.login.notice'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,14 +9,6 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def html_escape_unicode(text)
|
||||
chars = ActiveSupport::Multibyte::Unicode.u_unpack(text).map do |c|
|
||||
c < 127 ? c.chr : "&##{c.to_s};"
|
||||
end
|
||||
|
||||
return chars.join("")
|
||||
end
|
||||
|
||||
def rss_link_to(*args)
|
||||
return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" });
|
||||
end
|
||||
|
@ -25,17 +17,6 @@ module ApplicationHelper
|
|||
return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" });
|
||||
end
|
||||
|
||||
def javascript_strings
|
||||
js = ""
|
||||
|
||||
js << "<script type='text/javascript'>\n"
|
||||
js << "i18n_strings = new Array();\n"
|
||||
js << javascript_strings_for_key("javascripts")
|
||||
js << "</script>\n"
|
||||
|
||||
return raw(js)
|
||||
end
|
||||
|
||||
def style_rules
|
||||
css = ""
|
||||
|
||||
|
@ -118,21 +99,4 @@ module ApplicationHelper
|
|||
link_to h(object.author_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author_name})
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def javascript_strings_for_key(key)
|
||||
js = ""
|
||||
value = I18n.t(key, :locale => "en")
|
||||
|
||||
if value.is_a?(String)
|
||||
js << "i18n_strings['#{key}'] = '" << escape_javascript(t(key)) << "';\n"
|
||||
else
|
||||
value.each_key do |k|
|
||||
js << javascript_strings_for_key("#{key}.#{k}")
|
||||
end
|
||||
end
|
||||
|
||||
return js
|
||||
end
|
||||
end
|
||||
|
|
|
@ -200,6 +200,7 @@ class User < ActiveRecord::Base
|
|||
self.image = nil
|
||||
self.email_valid = false
|
||||
self.new_email = nil
|
||||
self.openid_url = nil
|
||||
self.status = "deleted"
|
||||
self.save
|
||||
end
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
<%= javascript_include_tag 'openlayers.js' %>
|
||||
<%= javascript_include_tag 'map.js' %>
|
||||
|
||||
<iframe id="linkloader" style="display: none">
|
||||
</iframe>
|
||||
|
||||
|
@ -45,8 +42,6 @@
|
|||
|
||||
<% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %>
|
||||
<script type="text/javascript">
|
||||
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
|
||||
|
||||
function remoteEditHandler(event, bbox, select) {
|
||||
var left = bbox.left - 0.0001;
|
||||
var top = bbox.top + 0.0001;
|
||||
|
|
|
@ -1,533 +0,0 @@
|
|||
var browseBoxControl;
|
||||
var browseMode = "auto";
|
||||
var browseBounds;
|
||||
var browseFeatureList;
|
||||
var browseActiveFeature;
|
||||
var browseDataLayer;
|
||||
var browseSelectControl;
|
||||
var browseObjectList;
|
||||
var areasHidden = false;
|
||||
|
||||
OpenLayers.Feature.Vector.style['default'].strokeWidth = 3;
|
||||
OpenLayers.Feature.Vector.style['default'].cursor = "pointer";
|
||||
|
||||
function startBrowse() {
|
||||
map.dataLayer.active = true;
|
||||
|
||||
$("#sidebar_title").html("<%=j t 'browse.start_rjs.data_frame_title' %>");
|
||||
$("#sidebar_content").html("<%=j render :partial => "sidebar" %>");
|
||||
|
||||
openSidebar({ onclose: stopBrowse });
|
||||
|
||||
var vectors = new OpenLayers.Layer.Vector();
|
||||
|
||||
browseBoxControl = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.RegularPolygon, {
|
||||
handlerOptions: {
|
||||
sides: 4,
|
||||
snapAngle: 90,
|
||||
irregular: true,
|
||||
persist: true
|
||||
}
|
||||
});
|
||||
browseBoxControl.handler.callbacks.done = endDrag;
|
||||
map.addControl(browseBoxControl);
|
||||
|
||||
map.events.register("moveend", map, updateData);
|
||||
map.events.triggerEvent("moveend");
|
||||
|
||||
$("#browse_select_view").click(useMap);
|
||||
|
||||
$("#browse_select_box").click(startDrag);
|
||||
|
||||
$("#browse_hide_areas_box").html("<%=j t 'browse.start_rjs.hide_areas' %>");
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(hideAreas);
|
||||
}
|
||||
|
||||
function updateData() {
|
||||
if (browseMode == "auto") {
|
||||
if (map.getZoom() >= 15) {
|
||||
useMap(false);
|
||||
} else {
|
||||
setStatus("<%=j t 'browse.start_rjs.zoom_or_select' %>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function stopBrowse() {
|
||||
if (map.dataLayer.active) {
|
||||
map.dataLayer.active = false;
|
||||
|
||||
if (browseSelectControl) {
|
||||
browseSelectControl.destroy();
|
||||
browseSelectControl = null;
|
||||
}
|
||||
|
||||
if (browseBoxControl) {
|
||||
browseBoxControl.destroy();
|
||||
browseBoxControl = null;
|
||||
}
|
||||
|
||||
if (browseActiveFeature) {
|
||||
browseActiveFeature.destroy();
|
||||
browseActiveFeature = null;
|
||||
}
|
||||
|
||||
if (browseDataLayer) {
|
||||
browseDataLayer.destroy();
|
||||
browseDataLayer = null;
|
||||
}
|
||||
|
||||
map.dataLayer.setVisibility(false);
|
||||
map.events.unregister("moveend", map, updateData);
|
||||
}
|
||||
}
|
||||
|
||||
function startDrag() {
|
||||
$("#browse_select_box").html("<%=j t 'browse.start_rjs.drag_a_box' %>");
|
||||
|
||||
browseBoxControl.activate();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function useMap(reload) {
|
||||
var bounds = map.getExtent();
|
||||
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
if (!browseBounds || !browseBounds.containsBounds(projected)) {
|
||||
var center = bounds.getCenterLonLat();
|
||||
var tileWidth = bounds.getWidth() * 1.2;
|
||||
var tileHeight = bounds.getHeight() * 1.2;
|
||||
var tileBounds = new OpenLayers.Bounds(center.lon - (tileWidth / 2),
|
||||
center.lat - (tileHeight / 2),
|
||||
center.lon + (tileWidth / 2),
|
||||
center.lat + (tileHeight / 2));
|
||||
|
||||
browseBounds = tileBounds;
|
||||
getData(tileBounds, reload);
|
||||
|
||||
browseMode = "auto";
|
||||
|
||||
$("#browse_select_view").hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function hideAreas() {
|
||||
$("#browse_hide_areas_box").html("<%=j t 'browse.start_rjs.show_areas' %>");
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(showAreas);
|
||||
|
||||
areasHidden = true;
|
||||
|
||||
useMap(true);
|
||||
}
|
||||
|
||||
function showAreas() {
|
||||
$("#browse_hide_areas_box").html("<%=j t 'browse.start_rjs.hide_areas' %>");
|
||||
$("#browse_hide_areas_box").show();
|
||||
$("#browse_hide_areas_box").click(hideAreas);
|
||||
|
||||
areasHidden = false;
|
||||
|
||||
useMap(true);
|
||||
}
|
||||
|
||||
function endDrag(bbox) {
|
||||
var bounds = bbox.getBounds();
|
||||
var projected = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
browseBoxControl.deactivate();
|
||||
browseBounds = projected;
|
||||
getData(bounds);
|
||||
|
||||
browseMode = "manual";
|
||||
|
||||
$("#browse_select_box").html("<%=j t 'browse.start_rjs.manually_select' %>");
|
||||
$("#browse_select_view").show();
|
||||
}
|
||||
|
||||
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, max_features: limit })));
|
||||
div.appendChild(p);
|
||||
|
||||
var input = document.createElement("input");
|
||||
input.type = "submit";
|
||||
input.value = "<%=j t 'browse.start_rjs.load_data' %>";
|
||||
input.onclick = callback;
|
||||
div.appendChild(input);
|
||||
|
||||
$("#browse_content").html("");
|
||||
$("#browse_content").append(div);
|
||||
}
|
||||
|
||||
function customDataLoader(resp, options) {
|
||||
if (map.dataLayer.active) {
|
||||
var request = resp.priv;
|
||||
var doc = request.responseXML;
|
||||
|
||||
if (!doc || !doc.documentElement) {
|
||||
doc = request.responseText;
|
||||
}
|
||||
|
||||
resp.features = this.format.read(doc);
|
||||
|
||||
if (!this.maxFeatures || resp.features.length <= this.maxFeatures) {
|
||||
options.callback.call(options.scope, resp);
|
||||
} else {
|
||||
displayFeatureWarning(resp.features.length, this.maxFeatures, function () {
|
||||
options.callback.call(options.scope, resp);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getData(bounds, reload) {
|
||||
var projected = bounds.clone().transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));
|
||||
var size = projected.getWidth() * projected.getHeight();
|
||||
|
||||
if (size > <%= MAX_REQUEST_AREA %>) {
|
||||
setStatus(i18n("<%=j t 'browse.start_rjs.unable_to_load_size', :max_bbox_size => MAX_REQUEST_AREA %>", { bbox_size: size }));
|
||||
} else {
|
||||
loadData("/api/<%= API_VERSION %>/map?bbox=" + projected.toBBOX(), reload);
|
||||
}
|
||||
}
|
||||
|
||||
function loadData(url, reload) {
|
||||
setStatus("<%=j t 'browse.start_rjs.loading' %>");
|
||||
|
||||
$("#browse_content").empty();
|
||||
|
||||
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({
|
||||
symbolizer: {
|
||||
Polygon: { fillColor: '#ff0000', strokeColor: '#ff0000' },
|
||||
Line: { fillColor: '#ffff00', strokeColor: '#000000', strokeOpacity: '0.4' },
|
||||
Point: { fillColor: '#00ff00', strokeColor: '#00ff00' }
|
||||
}
|
||||
})]);
|
||||
|
||||
if (browseDataLayer) browseDataLayer.destroyFeatures();
|
||||
|
||||
browseDataLayer = new OpenLayers.Layer.Vector("Data", {
|
||||
strategies: [
|
||||
new OpenLayers.Strategy.Fixed()
|
||||
],
|
||||
protocol: new OpenLayers.Protocol.HTTP({
|
||||
url: url,
|
||||
format: new OpenLayers.Format.OSM(formatOptions),
|
||||
maxFeatures: <%= @max_features %>,
|
||||
handleRead: customDataLoader
|
||||
}),
|
||||
projection: new OpenLayers.Projection("EPSG:4326"),
|
||||
displayInLayerSwitcher: false,
|
||||
styleMap: new OpenLayers.StyleMap({
|
||||
'default': style,
|
||||
'select': { strokeColor: '#0000ff', strokeWidth: 8 }
|
||||
})
|
||||
});
|
||||
browseDataLayer.events.register("loadend", browseDataLayer, dataLoaded );
|
||||
map.addLayer(browseDataLayer);
|
||||
|
||||
browseSelectControl = new OpenLayers.Control.SelectFeature(browseDataLayer, { onSelect: onFeatureSelect });
|
||||
browseSelectControl.handlers.feature.stopDown = false;
|
||||
browseSelectControl.handlers.feature.stopUp = false;
|
||||
map.addControl(browseSelectControl);
|
||||
browseSelectControl.activate();
|
||||
} else {
|
||||
browseDataLayer.destroyFeatures();
|
||||
browseDataLayer.refresh({ url: url });
|
||||
}
|
||||
|
||||
browseActiveFeature = null;
|
||||
}
|
||||
|
||||
function dataLoaded() {
|
||||
if (this.map.dataLayer.active) {
|
||||
clearStatus();
|
||||
|
||||
browseObjectList = document.createElement("div");
|
||||
|
||||
var heading = document.createElement("p");
|
||||
heading.className = "browse_heading";
|
||||
heading.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.object_list.heading' %>"));
|
||||
browseObjectList.appendChild(heading);
|
||||
|
||||
var list = document.createElement("ul");
|
||||
|
||||
for (var i = 0; i < this.features.length; i++) {
|
||||
var feature = this.features[i];
|
||||
|
||||
// Type, for linking
|
||||
var type = featureType(feature);
|
||||
var typeName = featureTypeName(feature);
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode(typeName + " "));
|
||||
|
||||
// Link, for viewing in the tab
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id;
|
||||
var name = featureName(feature);
|
||||
link.appendChild(document.createTextNode(name));
|
||||
link.feature = feature;
|
||||
link.onclick = OpenLayers.Function.bind(viewFeatureLink, link);
|
||||
li.appendChild(link);
|
||||
|
||||
list.appendChild(li);
|
||||
}
|
||||
|
||||
browseObjectList.appendChild(list);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = this.protocol.url;
|
||||
link.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.object_list.api' %>"));
|
||||
browseObjectList.appendChild(link);
|
||||
|
||||
$("#browse_content").html(browseObjectList);
|
||||
}
|
||||
}
|
||||
|
||||
function viewFeatureLink() {
|
||||
var layer = this.feature.layer;
|
||||
|
||||
for (var i = 0; i < layer.selectedFeatures.length; i++) {
|
||||
var f = layer.selectedFeatures[i];
|
||||
layer.drawFeature(f, layer.styleMap.createSymbolizer(f, "default"));
|
||||
}
|
||||
|
||||
onFeatureSelect(this.feature);
|
||||
|
||||
if (browseMode != "auto") {
|
||||
map.setCenter(this.feature.geometry.getBounds().getCenterLonLat());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadObjectList() {
|
||||
$("#browse_content").empty();
|
||||
$("#browse_content").append(browseObjectList);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onFeatureSelect(feature) {
|
||||
// Unselect previously selected feature
|
||||
if (browseActiveFeature) {
|
||||
browseActiveFeature.layer.drawFeature(
|
||||
browseActiveFeature,
|
||||
browseActiveFeature.layer.styleMap.createSymbolizer(browseActiveFeature, "default")
|
||||
);
|
||||
}
|
||||
|
||||
// Redraw in selected style
|
||||
feature.layer.drawFeature(
|
||||
feature, feature.layer.styleMap.createSymbolizer(feature, "select")
|
||||
);
|
||||
|
||||
// If the current object is the list, don't innerHTML="", since that could clear it.
|
||||
if ($("#browse_content").firstChild == browseObjectList) {
|
||||
$("#browse_content").removeChild(browseObjectList);
|
||||
} else {
|
||||
$("#browse_content").empty();
|
||||
}
|
||||
|
||||
// Create a link back to the object list
|
||||
var div = document.createElement("div");
|
||||
div.style.textAlign = "center";
|
||||
div.style.marginBottom = "20px";
|
||||
$("#browse_content").append(div);
|
||||
var link = document.createElement("a");
|
||||
link.href = "#";
|
||||
link.onclick = loadObjectList;
|
||||
link.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.object_list.back' %>"));
|
||||
div.appendChild(link);
|
||||
|
||||
var table = document.createElement("table");
|
||||
table.width = "100%";
|
||||
table.className = "browse_heading";
|
||||
$("#browse_content").append(table);
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
table.appendChild(tr);
|
||||
|
||||
var heading = document.createElement("td");
|
||||
heading.appendChild(document.createTextNode(featureNameSelect(feature)));
|
||||
tr.appendChild(heading);
|
||||
|
||||
var td = document.createElement("td");
|
||||
td.align = "right";
|
||||
tr.appendChild(td);
|
||||
|
||||
var type = featureType(feature);
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id;
|
||||
link.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.object_list.details' %>"));
|
||||
td.appendChild(link);
|
||||
|
||||
var div = document.createElement("div");
|
||||
div.className = "browse_details";
|
||||
|
||||
$("#browse_content").append(div);
|
||||
|
||||
// Now the list of attributes
|
||||
var ul = document.createElement("ul");
|
||||
for (var key in feature.attributes) {
|
||||
var li = document.createElement("li");
|
||||
var b = document.createElement("b");
|
||||
b.appendChild(document.createTextNode(key));
|
||||
li.appendChild(b);
|
||||
li.appendChild(document.createTextNode(": " + feature.attributes[key]));
|
||||
ul.appendChild(li);
|
||||
}
|
||||
|
||||
div.appendChild(ul);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + type + "/" + feature.osm_id + "/history";
|
||||
link.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.show_history' %>"));
|
||||
link.onclick = OpenLayers.Function.bind(loadHistory, {
|
||||
type: type, feature: feature, link: link
|
||||
});
|
||||
|
||||
div.appendChild(link);
|
||||
|
||||
// Stash the currently drawn feature
|
||||
browseActiveFeature = feature;
|
||||
}
|
||||
|
||||
function loadHistory() {
|
||||
this.link.href = "";
|
||||
this.link.innerHTML = "<%=j t 'browse.start_rjs.wait' %>";
|
||||
|
||||
$.ajax("/api/<%= API_VERSION %>/" + this.type + "/" + this.feature.osm_id + "/history", {
|
||||
complete: OpenLayers.Function.bind(displayHistory, this)
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function displayHistory(request) {
|
||||
if (browseActiveFeature.osm_id != this.feature.osm_id || $("#browse_content").firstChild == browseObjectList) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.link.parentNode.removeChild(this.link);
|
||||
|
||||
var doc = request.responseXML;
|
||||
|
||||
var table = document.createElement("table");
|
||||
table.width = "100%";
|
||||
table.className = "browse_heading";
|
||||
$("#browse_content").append(table);
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
table.appendChild(tr);
|
||||
|
||||
var heading = document.createElement("td");
|
||||
heading.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.history_for_feature' %>", { feature: featureNameHistory(this.feature) })));
|
||||
tr.appendChild(heading);
|
||||
|
||||
var td = document.createElement("td");
|
||||
td.align = "right";
|
||||
tr.appendChild(td);
|
||||
|
||||
var link = document.createElement("a");
|
||||
link.href = "/browse/" + this.type + "/" + this.feature.osm_id + "/history";
|
||||
link.appendChild(document.createTextNode("<%=j t 'browse.start_rjs.details' %>"));
|
||||
td.appendChild(link);
|
||||
|
||||
var div = document.createElement("div");
|
||||
div.className = "browse_details";
|
||||
|
||||
var nodes = doc.getElementsByTagName(this.type);
|
||||
var history = document.createElement("ul");
|
||||
for (var i = nodes.length - 1; i >= 0; i--) {
|
||||
var user = nodes[i].getAttribute("user") || "<%=j t 'browse.start_rjs.private_user' %>";
|
||||
var timestamp = nodes[i].getAttribute("timestamp");
|
||||
var item = document.createElement("li");
|
||||
item.appendChild(document.createTextNode(i18n("<%=j t 'browse.start_rjs.edited_by_user_at_timestamp' %>", { user: user, timestamp: timestamp })));
|
||||
history.appendChild(item);
|
||||
}
|
||||
div.appendChild(history);
|
||||
|
||||
$("#browse_content").append(div);
|
||||
}
|
||||
|
||||
function featureType(feature) {
|
||||
if (feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
|
||||
return "node";
|
||||
} else {
|
||||
return "way";
|
||||
}
|
||||
}
|
||||
|
||||
function featureTypeName(feature) {
|
||||
if (featureType(feature) == "node") {
|
||||
return "<%=j t 'browse.start_rjs.object_list.type.node' %>";
|
||||
} else if (featureType(feature) == "way") {
|
||||
return "<%=j t 'browse.start_rjs.object_list.type.way' %>";
|
||||
}
|
||||
}
|
||||
|
||||
function featureName(feature) {
|
||||
if (feature.attributes['name:<%= I18n.locale %>']) {
|
||||
return feature.attributes['name:<%= I18n.locale %>'];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else {
|
||||
return feature.osm_id;
|
||||
}
|
||||
}
|
||||
|
||||
function featureNameSelect(feature) {
|
||||
if (feature.attributes['name:<%= I18n.locale %>']) {
|
||||
return feature.attributes['name:<%= I18n.locale %>'];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else if (featureType(feature) == "node") {
|
||||
return i18n("<%=j t 'browse.start_rjs.object_list.selected.type.node' %>", { id: feature.osm_id });
|
||||
} else if (featureType(feature) == "way") {
|
||||
return i18n("<%=j t 'browse.start_rjs.object_list.selected.type.way' %>", { id: feature.osm_id });
|
||||
}
|
||||
}
|
||||
|
||||
function featureNameHistory(feature) {
|
||||
if (feature.attributes['name:<%= I18n.locale %>']) {
|
||||
return feature.attributes['name:<%= I18n.locale %>'];
|
||||
} else if (feature.attributes.name) {
|
||||
return feature.attributes.name;
|
||||
} else if (featureType(feature) == "node") {
|
||||
return i18n("<%=j t 'browse.start_rjs.object_list.history.type.node' %>", { id: feature.osm_id });
|
||||
} else if (featureType(feature) == "way") {
|
||||
return i18n("<%=j t 'browse.start_rjs.object_list.history.type.way' %>", { id: feature.osm_id });
|
||||
}
|
||||
}
|
||||
|
||||
function setStatus(status) {
|
||||
$("#browse_status").html(status);
|
||||
$("#browse_status").show();
|
||||
}
|
||||
|
||||
function clearStatus() {
|
||||
$("#browse_status").html("");
|
||||
$("#browse_status").hide();
|
||||
}
|
||||
|
||||
startBrowse();
|
|
@ -1,12 +1,7 @@
|
|||
<%= javascript_include_tag 'openlayers.js' %>
|
||||
<%= javascript_include_tag 'map.js' %>
|
||||
|
||||
<div id="changeset_list_map">
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
|
||||
|
||||
var highlight;
|
||||
|
||||
function highlightChangeset(id) {
|
||||
|
|
|
@ -35,30 +35,11 @@
|
|||
</table>
|
||||
<% end %>
|
||||
|
||||
<% if @diary_entry.latitude and @diary_entry.longitude %>
|
||||
<% lon = @diary_entry.longitude %>
|
||||
<% lat = @diary_entry.latitude %>
|
||||
<% zoom = '12' %>
|
||||
<% elsif @user.home_lat.nil? or @user.home_lon.nil? %>
|
||||
<% lon = h(params['lon'] || '-0.1') %>
|
||||
<% lat = h(params['lat'] || '51.5') %>
|
||||
<% zoom = h(params['zoom'] || '4') %>
|
||||
<% else %>
|
||||
<% lon = @user.home_lon %>
|
||||
<% lat = @user.home_lat %>
|
||||
<% zoom = '12' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_include_tag 'openlayers.js' %>
|
||||
<%= javascript_include_tag 'map.js' %>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var marker;
|
||||
|
||||
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
|
||||
|
||||
function setLocation( e ) {
|
||||
function setLocation( e ) {
|
||||
closeMapPopup();
|
||||
|
||||
var lonlat = getEventPosition(e);
|
||||
|
@ -77,8 +58,8 @@
|
|||
$("#map").show();
|
||||
$("#usemap").hide();
|
||||
|
||||
var centre = new OpenLayers.LonLat(<%= lon %>, <%= lat %>);
|
||||
var zoom = <%= zoom %>;
|
||||
var centre = new OpenLayers.LonLat(<%= @lon %>, <%= @lat %>);
|
||||
var zoom = <%= @zoom %>;
|
||||
|
||||
var map = createMap("map");
|
||||
|
||||
|
|
|
@ -1,326 +0,0 @@
|
|||
var vectors;
|
||||
var box;
|
||||
var transform;
|
||||
var markerLayer;
|
||||
var markerControl;
|
||||
|
||||
function startExport() {
|
||||
vectors = new OpenLayers.Layer.Vector("Vector Layer", {
|
||||
displayInLayerSwitcher: false
|
||||
});
|
||||
map.addLayer(vectors);
|
||||
|
||||
box = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.RegularPolygon, {
|
||||
handlerOptions: {
|
||||
sides: 4,
|
||||
snapAngle: 90,
|
||||
irregular: true,
|
||||
persist: true
|
||||
}
|
||||
});
|
||||
box.handler.callbacks.done = endDrag;
|
||||
map.addControl(box);
|
||||
|
||||
transform = new OpenLayers.Control.TransformFeature(vectors, {
|
||||
rotate: false,
|
||||
irregular: true
|
||||
});
|
||||
transform.events.register("transformcomplete", transform, transformComplete);
|
||||
map.addControl(transform);
|
||||
|
||||
map.events.register("moveend", map, mapMoved);
|
||||
map.events.register("changebaselayer", map, htmlUrlChanged);
|
||||
|
||||
$("#sidebar_title").html("<%=j t 'export.start_rjs.export' %>");
|
||||
$("#sidebar_content").html("<%=j render :partial => "sidebar" %>");
|
||||
|
||||
$("#maxlat").change(boundsChanged);
|
||||
$("#minlon").change(boundsChanged);
|
||||
$("#maxlon").change(boundsChanged);
|
||||
$("#minlat").change(boundsChanged);
|
||||
|
||||
$("#drag_box").click(startDrag);
|
||||
|
||||
$("#add_marker").click(startMarker);
|
||||
|
||||
$("#format_osm").click(formatChanged);
|
||||
$("#format_mapnik").click(formatChanged);
|
||||
$("#format_html").click(formatChanged);
|
||||
|
||||
$("#mapnik_scale").change(mapnikSizeChanged);
|
||||
|
||||
openSidebar({ onclose: stopExport });
|
||||
|
||||
if (map.baseLayer.name == "Mapnik") {
|
||||
$("#format_mapnik").prop("checked", true);
|
||||
}
|
||||
|
||||
formatChanged();
|
||||
setBounds(map.getExtent());
|
||||
|
||||
$("#viewanchor").removeClass("active");
|
||||
$("#exportanchor").addClass("active");
|
||||
}
|
||||
|
||||
function stopExport() {
|
||||
$("#viewanchor").addClass("active");
|
||||
$("#exportanchor").removeClass("active");
|
||||
|
||||
clearBox();
|
||||
clearMarker();
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
map.events.unregister("changebaselayer", map, htmlUrlChanged);
|
||||
map.removeLayer(vectors);
|
||||
}
|
||||
|
||||
function boundsChanged() {
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(),
|
||||
$("#maxlon").val(), $("#maxlat").val());
|
||||
|
||||
bounds.transform(epsg4326, map.getProjectionObject());
|
||||
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
map.zoomToExtent(bounds);
|
||||
|
||||
clearBox();
|
||||
drawBox(bounds);
|
||||
|
||||
validateControls();
|
||||
mapnikSizeChanged();
|
||||
}
|
||||
|
||||
function startDrag() {
|
||||
$("#drag_box").html("<%=j t 'export.start_rjs.drag_a_box' %>");
|
||||
|
||||
clearBox();
|
||||
box.activate();
|
||||
};
|
||||
|
||||
function endDrag(bbox) {
|
||||
var bounds = bbox.getBounds();
|
||||
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
setBounds(bounds);
|
||||
drawBox(bounds);
|
||||
box.deactivate();
|
||||
validateControls();
|
||||
|
||||
$("#drag_box").html("<%=j t 'export.start_rjs.manually_select' %>");
|
||||
}
|
||||
|
||||
function transformComplete(event) {
|
||||
setBounds(event.feature.geometry.bounds);
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function startMarker() {
|
||||
$("#add_marker").html("<%=j t 'export.start_rjs.click_add_marker' %>");
|
||||
|
||||
if (!markerLayer) {
|
||||
markerLayer = new OpenLayers.Layer.Vector("",{
|
||||
displayInLayerSwitcher: false,
|
||||
style: {
|
||||
externalGraphic: OpenLayers.Util.getImageLocation("marker.png"),
|
||||
graphicXOffset: -10.5,
|
||||
graphicYOffset: -25,
|
||||
graphicWidth: 21,
|
||||
graphicHeight: 25
|
||||
}
|
||||
});
|
||||
map.addLayer(markerLayer);
|
||||
|
||||
markerControl = new OpenLayers.Control.DrawFeature(markerLayer, OpenLayers.Handler.Point);
|
||||
map.addControl(markerControl);
|
||||
|
||||
markerLayer.events.on({ "featureadded": endMarker });
|
||||
}
|
||||
|
||||
markerLayer.destroyFeatures();
|
||||
markerControl.activate();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function endMarker(event) {
|
||||
markerControl.deactivate();
|
||||
|
||||
$("#add_marker").html("<%=j t 'export.start_rjs.change_marker' %>");
|
||||
$("#marker_inputs").show();
|
||||
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var epsg900913 = new OpenLayers.Projection("EPSG:900913");
|
||||
var geom = event.feature.geometry.clone().transform(epsg900913, epsg4326);
|
||||
|
||||
$("#marker_lon").val(geom.x.toFixed(5));
|
||||
$("#marker_lat").val(geom.y.toFixed(5));
|
||||
|
||||
htmlUrlChanged();
|
||||
}
|
||||
|
||||
function clearMarker() {
|
||||
$("#marker_lon").val("");
|
||||
$("#marker_lat").val("");
|
||||
$("#marker_inputs").hide();
|
||||
$("#add_marker").html("<%=j t 'export.start_rjs.add_marker' %>");
|
||||
|
||||
if (markerLayer) {
|
||||
markerControl.destroy();
|
||||
markerLayer.destroy();
|
||||
markerLayer = null;
|
||||
markerControl = null;
|
||||
}
|
||||
}
|
||||
|
||||
function mapMoved() {
|
||||
setBounds(map.getExtent());
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function setBounds(bounds) {
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var decimals = Math.pow(10, Math.floor(map.getZoom() / 3));
|
||||
|
||||
bounds = bounds.clone().transform(map.getProjectionObject(), epsg4326);
|
||||
|
||||
$("#minlon").val(Math.round(bounds.left * decimals) / decimals);
|
||||
$("#minlat").val(Math.round(bounds.bottom * decimals) / decimals);
|
||||
$("#maxlon").val(Math.round(bounds.right * decimals) / decimals);
|
||||
$("#maxlat").val(Math.round(bounds.top * decimals) / decimals);
|
||||
|
||||
mapnikSizeChanged();
|
||||
htmlUrlChanged();
|
||||
}
|
||||
|
||||
function clearBox() {
|
||||
transform.deactivate();
|
||||
vectors.destroyFeatures();
|
||||
}
|
||||
|
||||
function drawBox(bounds) {
|
||||
var feature = new OpenLayers.Feature.Vector(bounds.toGeometry());
|
||||
|
||||
vectors.addFeatures(feature);
|
||||
transform.setFeature(feature);
|
||||
}
|
||||
|
||||
function validateControls() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
|
||||
if (bounds.getWidth() * bounds.getHeight() > <%= MAX_REQUEST_AREA %>) {
|
||||
$("#export_osm_too_large").show();
|
||||
} else {
|
||||
$("#export_osm_too_large").hide();
|
||||
}
|
||||
|
||||
var max_scale = maxMapnikScale();
|
||||
var disabled = true;
|
||||
|
||||
if ($("#format_osm").prop("checked")) {
|
||||
disabled = bounds.getWidth() * bounds.getHeight() > <%= MAX_REQUEST_AREA %>;
|
||||
} else if ($("#format_mapnik").prop("checked")) {
|
||||
disabled = $("#mapnik_scale").val() < max_scale;
|
||||
}
|
||||
|
||||
$("#export_commit").prop("disabled", disabled);
|
||||
$("#mapnik_max_scale").html(roundScale(max_scale));
|
||||
}
|
||||
|
||||
function htmlUrlChanged() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
var layerName = map.baseLayer.keyid;
|
||||
var url = "http://<%= SERVER_URL %>/export/embed.html?bbox=" + bounds.toBBOX() + "&layer=" + layerName;
|
||||
var markerUrl = "";
|
||||
|
||||
if ($("#marker_lat").val() && $("#marker_lon").val()) {
|
||||
markerUrl = "&mlat=" + $("#marker_lat").val() + "&mlon=" + $("#marker_lon").val();
|
||||
url += "&marker=" + $("#marker_lat").val() + "," + $("#marker_lon").val();
|
||||
}
|
||||
|
||||
var html = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'" style="border: 1px solid black"></iframe>';
|
||||
|
||||
// Create "larger map" link
|
||||
var center = bounds.getCenterLonLat();
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var epsg900913 = new OpenLayers.Projection("EPSG:900913");
|
||||
|
||||
bounds.transform(epsg4326, epsg900913);
|
||||
var zoom = map.getZoomForExtent(bounds);
|
||||
|
||||
var layers = getMapLayers();
|
||||
|
||||
html += '<br /><small><a href="http://<%= SERVER_URL %>/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">'+"<%= html_escape_unicode(I18n.t('export.start_rjs.view_larger_map')) %>"+'</a></small>';
|
||||
|
||||
$("#export_html_text").val(html);
|
||||
|
||||
if ($("#format_html").prop("checked")) {
|
||||
$("#export_html_text").prop("selected", true);
|
||||
}
|
||||
}
|
||||
|
||||
function formatChanged() {
|
||||
$("#export_commit").show();
|
||||
|
||||
if ($("#format_osm").prop("checked")) {
|
||||
$("#export_osm").show();
|
||||
} else {
|
||||
$("#export_osm").hide();
|
||||
}
|
||||
|
||||
if ($("#format_mapnik").prop("checked")) {
|
||||
$("#mapnik_scale").val(roundScale(map.getScale()));
|
||||
$("#export_mapnik").show();
|
||||
} else {
|
||||
$("#export_mapnik").hide();
|
||||
}
|
||||
|
||||
if ($("#format_html").prop("checked")) {
|
||||
$("#export_html").show();
|
||||
$("#export_commit").hide();
|
||||
$("#export_html_text").prop("selected", true);
|
||||
} else {
|
||||
$("#export_html").hide();
|
||||
|
||||
clearMarker();
|
||||
}
|
||||
|
||||
validateControls();
|
||||
}
|
||||
|
||||
function maxMapnikScale() {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var epsg900913 = new OpenLayers.Projection("EPSG:900913");
|
||||
|
||||
bounds.transform(epsg4326, epsg900913);
|
||||
|
||||
return Math.floor(Math.sqrt(bounds.getWidth() * bounds.getHeight() / 0.3136));
|
||||
}
|
||||
|
||||
function mapnikImageSize(scale) {
|
||||
var bounds = new OpenLayers.Bounds($("#minlon").val(), $("#minlat").val(), $("#maxlon").val(), $("#maxlat").val());
|
||||
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
|
||||
var epsg900913 = new OpenLayers.Projection("EPSG:900913");
|
||||
|
||||
bounds.transform(epsg4326, epsg900913);
|
||||
|
||||
return new OpenLayers.Size(Math.round(bounds.getWidth() / scale / 0.00028),
|
||||
Math.round(bounds.getHeight() / scale / 0.00028));
|
||||
}
|
||||
|
||||
function roundScale(scale) {
|
||||
var precision = 5 * Math.pow(10, Math.floor(Math.LOG10E * Math.log(scale)) - 2);
|
||||
|
||||
return precision * Math.ceil(scale / precision);
|
||||
}
|
||||
|
||||
function mapnikSizeChanged() {
|
||||
var size = mapnikImageSize($("#mapnik_scale").val());
|
||||
|
||||
$("#mapnik_image_width").html(size.w);
|
||||
$("#mapnik_image_height").html(size.h);
|
||||
|
||||
validateControls();
|
||||
}
|
||||
|
||||
startExport();
|
|
@ -1,8 +1,6 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/>
|
||||
<%= javascript_strings %>
|
||||
<%= javascript_include_tag "site" %>
|
||||
<%= javascript_include_tag "menu" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<!--[if lt IE 7]><%= javascript_include_tag "pngfix" %><![endif]--> <!-- thanks, microsoft! -->
|
||||
<%= stylesheet_link_tag "small-#{t 'html.dir'}", :media => "only screen and (max-width:641px)" %>
|
||||
<%= stylesheet_link_tag "large-#{t 'html.dir'}", :media => "screen and (min-width: 642px)" %>
|
||||
|
@ -13,8 +11,24 @@
|
|||
<%= tag("link", { :rel => "publisher", :href => "https://plus.google.com/111953119785824514010" }) %>
|
||||
<%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") }) %>
|
||||
<%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %>
|
||||
<% if flash[:piwik_goal] -%>
|
||||
<%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %>
|
||||
<% end -%>
|
||||
<%= style_rules %>
|
||||
<%= yield :head %>
|
||||
<%= csrf_meta_tag %>
|
||||
<script type="text/javascript">
|
||||
I18n.defaultLocale = "<%= I18n.default_locale %>";
|
||||
I18n.locale = "<%= I18n.locale %>";
|
||||
I18n.fallbacks = true;
|
||||
|
||||
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
|
||||
OSM.home = <%= { :lat => @user.home_lat, :lon => @user.home_lon }.to_json.html_safe %>;
|
||||
<% end %>
|
||||
|
||||
<% if session[:location] %>
|
||||
OSM.location = <%= session[:location].to_json.html_safe %>;
|
||||
<% end %>
|
||||
</script>
|
||||
<title><%= t 'layouts.project_name.title' %><%= ' | '+ @title if @title %></title>
|
||||
</head>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
(function(){ var u="<%= request.protocol %><%= PIWIK_LOCATION %>/";
|
||||
_paq.push(['setSiteId', <%= PIWIK_SITE %>]);
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
<% if flash[:piwik_goal] -%>
|
||||
_paq.push(['setSiteId', <%= flash[:piwik_goal] %>);
|
||||
<% end -%>
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'piwik.js';
|
||||
s.parentNode.insertBefore(g,s); })();
|
||||
</script>
|
||||
<noscript><p><img src="<%= request.protocol %><%= PIWIK_LOCATION %>/piwik.php?idsite=<%= PIWIK_SITE %>" style="border:0" alt="" /></p></noscript>
|
|
@ -1,88 +1,92 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>" dir="<%= t'html.dir' %>">
|
||||
<%= render :partial => "layouts/head" %>
|
||||
<body class="<%= params[:controller] %>">
|
||||
<body class="<%= params[:controller] %> <%= params[:controller] %>-<%= params[:action] %>">
|
||||
<div id="small-title">
|
||||
<%= link_to(image_tag("osm_logo.png", :size => "16x16", :border => 0, :alt => t('layouts.logo.alt_text')), :controller => 'site', :action => 'index') %>
|
||||
<%= link_to(image_tag("osm_logo.png", :size => "16x16", :alt => t('layouts.logo.alt_text')), root_path) %>
|
||||
<h1><%= t 'layouts.project_name.h1' %></h1>
|
||||
</div>
|
||||
<div id="content" class="<%= params[:controller] %>_<%= params[:action] %>">
|
||||
<div id="content">
|
||||
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
<div id='top-bar'>
|
||||
<span id="greeting">
|
||||
<% if @user and @user.id %>
|
||||
<span id="full-greeting"><%= raw(t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), {:controller => 'user', :action => 'view', :display_name => @user.display_name}, :title => t('layouts.welcome_user_link_tooltip'))) %></span>
|
||||
<span id="small-greeting"><%= link_to t('layouts.welcome_user_link_tooltip'), {:controller => 'user', :action => 'view', :display_name => @user.display_name} %></span> |
|
||||
<span id="full-greeting"><%= raw(t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), user_path(:display_name => @user.display_name), :title => t('layouts.welcome_user_link_tooltip'))) %></span>
|
||||
<span id="small-greeting"><%= link_to t('layouts.welcome_user_link_tooltip'), user_path(:display_name => @user.display_name) %></span> |
|
||||
<%= yield :greeting %>
|
||||
<%= render :partial => "layouts/inbox" %> |
|
||||
<%= link_to t('layouts.logout'), {:controller => 'user', :action => 'logout', :session => request.session_options[:id], :referer => request.fullpath}, {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%>
|
||||
<%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath), {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%>
|
||||
<% else %>
|
||||
<%= link_to t('layouts.log_in'), {:controller => 'user', :action => 'login', :referer => request.fullpath}, {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %> |
|
||||
<%= link_to t('layouts.sign_up'), {:controller => 'user', :action => 'new'}, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %>
|
||||
<%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %> |
|
||||
<%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %>
|
||||
<% end %>
|
||||
</span>
|
||||
<ul id="tabnav">
|
||||
<%
|
||||
viewclass = 'geolink llz layers'
|
||||
editclass = 'geolink llz object minzoom13 disabled'
|
||||
historyclass = 'geolink bbox minzoom11'
|
||||
exportclass = 'geolink llz layers'
|
||||
viewclass += ' active' if params['controller'] == 'site' and params['action'] == 'index'
|
||||
editclass += ' active' if params['controller'] == 'site' and params['action'] == 'edit'
|
||||
historyclass += ' active' if params['controller'] == 'changeset' and params['action'] == 'list'
|
||||
exportclass += ' active' if params['controller'] == 'site' and params['action'] == 'export'
|
||||
%>
|
||||
<li><%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
|
||||
<li><%= link_to h(t('layouts.edit')) + content_tag(:span, "▾", :class => "menuicon"), {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('javascripts.site.edit_tooltip'), :class => editclass} %></li>
|
||||
<li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('javascripts.site.history_tooltip'), :class => historyclass} %></li>
|
||||
<li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
|
||||
<li><%= link_to t('layouts.view'), root_path, {
|
||||
:id => 'viewanchor',
|
||||
:title => t('layouts.view_tooltip'),
|
||||
:class => 'geolink llz layers'
|
||||
} %></li>
|
||||
<li><%= link_to h(t('layouts.edit')) + content_tag(:span, "▾", :class => "menuicon"), edit_path, {
|
||||
:id => 'editanchor',
|
||||
:title => t('javascripts.site.edit_tooltip'),
|
||||
:data => { :minzoom => 13 },
|
||||
:class => 'geolink llz object disabled'
|
||||
} %></li>
|
||||
<li><%= link_to t('layouts.history'), browse_changesets_path, {
|
||||
:id => 'historyanchor',
|
||||
:data => { :minzoom => 11 },
|
||||
:title => t('javascripts.site.history_tooltip'),
|
||||
:class => 'geolink bbox'
|
||||
} %></li>
|
||||
<li><%= link_to t('layouts.export'), export_path, {
|
||||
:id => 'exportanchor',
|
||||
:title => t('layouts.export_tooltip'),
|
||||
:class => 'geolink llz layers'
|
||||
} %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="editmenu" class="menu">
|
||||
<ul>
|
||||
<% Editors::ALL_EDITORS.each do |editor| %>
|
||||
<li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")), {:controller => 'site', :action => 'edit', :editor => editor}, {:id => editor + 'anchor', :class => "geolink llz object"} %></li>
|
||||
<li><%= link_to t('layouts.edit_with',
|
||||
:editor => t("editor.#{editor}.description")),
|
||||
edit_path(:editor => editor), {
|
||||
:id => editor + 'anchor',
|
||||
:class => "geolink llz object"
|
||||
} %></li>
|
||||
<% end %>
|
||||
<%= yield :editmenu %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
createMenu("editanchor", "editmenu", "left");
|
||||
</script>
|
||||
|
||||
<div id="left">
|
||||
<div id="logo">
|
||||
<%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0, :alt => t('layouts.logo.alt_text')), :controller => 'site', :action => 'index') %><br/>
|
||||
<%= link_to(image_tag("osm_logo.png",
|
||||
:size => "120x120",
|
||||
:alt => t('layouts.logo.alt_text')),
|
||||
root_path) %><br/>
|
||||
<h1><%= t 'layouts.project_name.h1' %></h1>
|
||||
<h2 class="nowrap"><%= t('layouts.tag_line') %></h2>
|
||||
</div>
|
||||
|
||||
<%= yield :optionals %>
|
||||
|
||||
<% unless @user %>
|
||||
<div class="sidebar-copy intro">
|
||||
<p>
|
||||
<%= t 'layouts.intro_1' %>
|
||||
</p>
|
||||
<p><%= t 'layouts.intro_1' %></p>
|
||||
<p>
|
||||
<%= t 'layouts.intro_2_html',
|
||||
:download => link_to(t('layouts.intro_2_download'), "http://planet.openstreetmap.org/"),
|
||||
:use => link_to(t('layouts.intro_2_use'), t('layouts.intro_2_use_url')),
|
||||
:license => link_to(t('layouts.intro_2_license'),
|
||||
url_for({:controller => 'site', :action => 'copyright'})),
|
||||
:create_account => link_to(t('layouts.intro_2_create_account'),
|
||||
url_for({:controller => 'user', :action => 'new'}))
|
||||
:download => link_to(t('layouts.intro_2_download'), "http://planet.openstreetmap.org/"),
|
||||
:use => link_to(t('layouts.intro_2_use'), t('layouts.intro_2_use_url')),
|
||||
:license => link_to(t('layouts.intro_2_license'), copyright_path),
|
||||
:create_account => link_to(t('layouts.intro_2_create_account'), user_new_path)
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if STATUS == :database_offline or STATUS == :api_offline %>
|
||||
<div class="sidebar-alert">
|
||||
<p><%= t 'layouts.osm_offline' %></p>
|
||||
|
@ -92,68 +96,56 @@
|
|||
<p><%= t 'layouts.osm_read_only' %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if false %>
|
||||
<div class="sidebar-notice">
|
||||
<p><%= raw t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="left_menu" class="left_menu">
|
||||
<ul>
|
||||
<li><%= t'layouts.help' %>
|
||||
<ul>
|
||||
<li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
|
||||
<li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
|
||||
<li><%= link_to t('layouts.copyright'), {:controller => 'site', :action => 'copyright'} %></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
|
||||
<li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
|
||||
<li><%= link_to t('layouts.copyright'), copyright_path %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><%= t'layouts.community' %>
|
||||
<ul>
|
||||
<li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
|
||||
<li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
|
||||
<li><%= link_to(t('layouts.user_diaries'), {
|
||||
:controller => 'diary_entry',
|
||||
:action => 'list',
|
||||
:display_name => nil
|
||||
}, {
|
||||
:title => t('layouts.user_diaries_tooltip')
|
||||
}) %></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
|
||||
<li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
|
||||
<li><%= link_to(t('layouts.user_diaries'), diary_path, {
|
||||
:title => t('layouts.user_diaries_tooltip')
|
||||
}) %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip') } %></li>
|
||||
<li><%= link_to t('layouts.gps_traces'), traces_path, {
|
||||
:id => 'traceanchor',
|
||||
:title => t('layouts.gps_traces_tooltip')
|
||||
} %></li>
|
||||
<%= yield :left_menu %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sotm">
|
||||
<%= link_to image_tag("sotm.png", :alt => t('layouts.sotm2012'), :title => t('layouts.sotm2012'), :border => "0"), "http://stateofthemap.org/register-now/" %>
|
||||
<%= link_to image_tag("sotmpdx.png",
|
||||
:alt => t('layouts.sotm2012'),
|
||||
:title => t('layouts.sotm2012'),
|
||||
:border => "0"), "http://stateofthemap.us/" %>
|
||||
</div>
|
||||
|
||||
<div class="donate">
|
||||
<a href="http://donate.openstreetmap.org/" title="<%= h(t('layouts.make_a_donation.title')) %>"><%= h(t('layouts.make_a_donation.text')) %></a>
|
||||
</div>
|
||||
<div class='sidebar-copy'>
|
||||
<p class='deemphasize'><%= t 'layouts.partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
|
||||
</p>
|
||||
<p class='deemphasize'><%= t 'layouts.partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var auth_token = $("meta[name=csrf-token]").attr("content");
|
||||
$("form input[name=authenticity_token]").val(auth_token);
|
||||
|
||||
$("textarea").autoGrow();
|
||||
});
|
||||
</script>
|
||||
|
||||
<% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) -%>
|
||||
<%= render :partial => "layouts/piwik" %>
|
||||
<noscript><p><img src="<%= request.protocol %><%= PIWIK_LOCATION %>/piwik.php?idsite=<%= PIWIK_SITE %>" style="border:0" alt="" /></p></noscript>
|
||||
<% end -%>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,31 +1,3 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var updateMapKey = function () {
|
||||
$("#sidebar_content").load("<%= url_for :action => :key %>", {
|
||||
layer: map.baseLayer.keyid,
|
||||
zoom: map.getZoom()
|
||||
});
|
||||
}
|
||||
|
||||
var closeMapKey = function () {
|
||||
map.events.unregister("zoomend", map, updateMapKey);
|
||||
map.events.unregister("changelayer", map, updateMapKey);
|
||||
}
|
||||
|
||||
$("#open_map_key").click(function () {
|
||||
updateMapKey();
|
||||
|
||||
openSidebar({
|
||||
title: "<%= t('site.key.map_key') %>",
|
||||
onclose: closeMapKey
|
||||
});
|
||||
|
||||
map.events.register("zoomend", map, updateMapKey);
|
||||
map.events.register("changelayer", map, updateMapKey);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<% content_for :left_menu do %>
|
||||
<li><%= link_to t("site.key.map_key"), "#", :id => "open_map_key", :title => t("site.key.map_key_tooltip") %></li>
|
||||
<li><%= link_to t("site.key.map_key"), {:action => :key}, :id => "open_map_key", :title => t("site.key.map_key_tooltip") %></li>
|
||||
<% end %>
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
// 700,600 for fixed size, 100%,100% for resizable
|
||||
}
|
||||
|
||||
doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
|
||||
var params = OSM.mapParams();
|
||||
doSWF(params.lat, params.lon, params.zoom || 17);
|
||||
|
||||
$(document).ready(function () {
|
||||
$("body").on("click", "a.set_position", function () {
|
||||
|
|
|
@ -69,8 +69,12 @@
|
|||
<% elsif params[:way] -%>
|
||||
<% bbox = Way.find(params[:way]).bbox.to_unscaled -%>
|
||||
doSWF(<%= bbox.centre_lat %>,<%= bbox.centre_lon %>,16);
|
||||
<% elsif params[:gpx] -%>
|
||||
<% trace = Trace.find(params[:gpx]) -%>
|
||||
doSWF(<%= trace.latitude %>,<%= trace.longitude %>,16);
|
||||
<% else -%>
|
||||
doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
|
||||
var params = OSM.mapParams();
|
||||
doSWF(params.lat, params.lon, params.zoom || 17);
|
||||
<% end -%>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
<script type="text/javascript">
|
||||
var brokenContentSize = $("#content").prop("offsetWidth") == 0;
|
||||
|
||||
function resizeContent() {
|
||||
var content = $("#content");
|
||||
var leftMargin = parseInt(content.css("left"));
|
||||
var rightMargin = parseInt(content.css("right"));
|
||||
var bottomMargin = parseInt(content.css("bottom"));
|
||||
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
content.width($(window).width() - content.prop("offsetLeft") - rightMargin);
|
||||
<% else -%>
|
||||
content.width($(window).width() - content.prop("offsetRight") - leftMargin);
|
||||
<% end -%>
|
||||
content.height($(window).height() - content.prop("offsetTop") - bottomMargin);
|
||||
}
|
||||
|
||||
function resizeMap() {
|
||||
var content_width = $("#content").width();
|
||||
var content_height = $("#content").height();
|
||||
var sidebar_width = 0;
|
||||
var left_border = parseFloat($("#map").css("border-left-width"));
|
||||
var right_border = parseFloat($("#map").css("border-right-width"));
|
||||
var top_border = parseFloat($("#map").css("border-top-width"));
|
||||
var bottom_border = parseFloat($("#map").css("border-bottom-width"));
|
||||
|
||||
$("#sidebar:visible").each(function () {
|
||||
sidebar_width = sidebar_width + $(this).outerWidth(true);
|
||||
});
|
||||
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
$("#map").css("left", (sidebar_width) + "px");
|
||||
<% else -%>
|
||||
$("#map").css("right", (sidebar_width) + "px");
|
||||
<% end -%>
|
||||
$("#map").width(content_width - sidebar_width - left_border - right_border);
|
||||
$("#map").height(content_height - top_border - bottom_border);
|
||||
|
||||
<% if params[:controller] == "site" and params[:action] == "index" -%>
|
||||
map.updateSize();
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
function handleResize() {
|
||||
if (brokenContentSize) {
|
||||
resizeContent();
|
||||
}
|
||||
|
||||
resizeMap();
|
||||
}
|
||||
</script>
|
|
@ -2,51 +2,9 @@
|
|||
<table class="sidebar_title" width="100%">
|
||||
<tr>
|
||||
<td id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
|
||||
<td id="sidebar_close"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
|
||||
<td id="sidebar_close"><a class="sidebar_close" href="#"><%= t 'site.sidebar.close' %></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="sidebar_content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var onclose;
|
||||
|
||||
function openSidebar(options) {
|
||||
options = options || {};
|
||||
|
||||
if (onclose) {
|
||||
onclose();
|
||||
onclose = null;
|
||||
}
|
||||
|
||||
if (options.title) { $("#sidebar_title").html(options.title); }
|
||||
|
||||
if (options.width) { $("#sidebar").width(options.width); }
|
||||
else { $("#sidebar").width("30%"); }
|
||||
|
||||
$("#sidebar").css("display", "block");
|
||||
|
||||
<%= onopen %>
|
||||
|
||||
onclose = options.onclose;
|
||||
}
|
||||
|
||||
function closeSidebar() {
|
||||
$("#sidebar").css("display", "none");
|
||||
|
||||
<%= onclose %>
|
||||
|
||||
if (onclose) {
|
||||
onclose();
|
||||
onclose = null;
|
||||
}
|
||||
}
|
||||
|
||||
function updateSidebar(title, content) {
|
||||
$("#sidebar_title").html(title);
|
||||
$("#sidebar_content").html(content);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
<p id="cc_logo">
|
||||
<%= link_to(
|
||||
image_tag("cc_button.png",
|
||||
:alt => t('layouts.license.alt'),
|
||||
:border => 0,
|
||||
:width => 88,
|
||||
:height => 31,
|
||||
:title => t('layouts.license.title')),
|
||||
"http://creativecommons.org/licenses/by-sa/2.0/",
|
||||
{ :rel => "license" }) %>
|
||||
</p>
|
||||
|
||||
<% if @locale == 'en' %>
|
||||
<!-- Maybe ease foreigners back to their native page -->
|
||||
<% if t('license_page.legal_babble', :locale => I18n.locale) != t('license_page.legal_babble', :locale => :en) %>
|
||||
|
@ -45,6 +33,7 @@
|
|||
|
||||
<p><%= t "license_page.legal_babble.intro_1_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.intro_2_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.intro_3_html", :locale => @locale %></p>
|
||||
|
||||
<h3><%= t "license_page.legal_babble.credit_title_html", :locale => @locale %></h3>
|
||||
<p><%= t "license_page.legal_babble.credit_1_html", :locale => @locale %></p>
|
||||
|
@ -53,20 +42,21 @@
|
|||
<h3><%= t "license_page.legal_babble.more_title_html", :locale => @locale %></h3>
|
||||
<p><%= t "license_page.legal_babble.more_1_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.more_2_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.more_3_html", :locale => @locale %></p>
|
||||
|
||||
<h3><%= t "license_page.legal_babble.contributors_title_html", :locale => @locale %></h3>
|
||||
<p><%= t "license_page.legal_babble.contributors_intro_html", :locale => @locale %></p>
|
||||
<ul id="contributors">
|
||||
<li><%= t "license_page.legal_babble.contributors_au_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_at_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_ca_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_fr_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_nl_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_nz_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_pl_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_za_html", :locale => @locale %></li>
|
||||
<li><%= t "license_page.legal_babble.contributors_gb_html", :locale => @locale %></li>
|
||||
</ul>
|
||||
<p><%= t "license_page.legal_babble.contributors_footer_1_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.contributors_footer_2_html", :locale => @locale %></p>
|
||||
|
||||
<h3><%= t "license_page.legal_babble.infringement_title_html", :locale => @locale %></h3>
|
||||
<p><%= t "license_page.legal_babble.infringement_1_html", :locale => @locale %></p>
|
||||
<p><%= t "license_page.legal_babble.infringement_2_html", :locale => @locale %></p>
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<%= render :partial => 'search' %>
|
||||
<%= render :partial => 'resize' %>
|
||||
|
||||
<%= render :partial => preferred_editor %>
|
||||
|
||||
|
@ -27,11 +26,11 @@
|
|||
$("#greeting").hide();
|
||||
$("#tabnav").hide();
|
||||
|
||||
$("#content").css("top", "10px");
|
||||
$("#content").css("top", "0px");
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
$("#content").css("left", "10px");
|
||||
$("#content").css("left", "0px");
|
||||
<% else -%>
|
||||
$("#content").css("right", "10px");
|
||||
$("#content").css("right", "0px");
|
||||
<% end -%>
|
||||
|
||||
handleResize();
|
||||
|
@ -42,11 +41,11 @@
|
|||
$("#greeting").show();
|
||||
$("#tabnav").show();
|
||||
|
||||
$("#content").css("top", "35px");
|
||||
$("#content").css("top", "30px");
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
$("#content").css("left", "192px");
|
||||
$("#content").css("left", "185px");
|
||||
<% else -%>
|
||||
$("#content").css("right", "192px");
|
||||
$("#content").css("right", "185px");
|
||||
<% end -%>
|
||||
|
||||
handleResize();
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
<% unless STATUS == :api_offline or STATUS == :database_offline -%>
|
||||
<% content_for :editmenu do -%>
|
||||
<li><%= link_to t("browse.start_rjs.notes_layer_name"), "#", :id => "show_notes" %></li>
|
||||
<li><%= link_to t("browse.start_rjs.data_layer_name"), "#", :id => "show_data" %></li>
|
||||
<li><%= link_to t("browse.start_rjs.data_layer_name"), { :controller => :browse, :action => :start }, :id => "show_data" %></li>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<%= render :partial => 'key' %>
|
||||
<%= render :partial => 'search' %>
|
||||
|
||||
|
@ -40,104 +40,15 @@
|
|||
<td class="attribution_project"><%= t'site.index.license.project_url' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="attribution_notice"><%=
|
||||
t'site.index.license.notice',
|
||||
:license_name => t('site.index.license.license_name'),
|
||||
:project_name => t('site.index.license.project_name')
|
||||
%></td>
|
||||
<td colspan="2" class="attribution_notice"><%= t'site.index.license.copyright' %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<%
|
||||
if params[:mlon] and params[:mlat]
|
||||
marker = true
|
||||
mlon = params[:mlon].to_f
|
||||
mlat = params[:mlat].to_f
|
||||
end
|
||||
|
||||
if params[:node] or params[:way] or params[:relation]
|
||||
object = true
|
||||
object_zoom = true
|
||||
|
||||
if params[:node]
|
||||
object_type = 'node'
|
||||
object_id = params[:node].to_i
|
||||
elsif params[:way]
|
||||
object_type = 'way'
|
||||
object_id = params[:way].to_i
|
||||
elsif params[:relation]
|
||||
object_type = 'relation'
|
||||
object_id = params[:relation].to_i
|
||||
end
|
||||
end
|
||||
|
||||
# Decide on a lat lon to initialise the map with. Various ways of doing this
|
||||
if params[:bbox]
|
||||
bbox = true
|
||||
minlon, minlat, maxlon, maxlat = params[:bbox].split(",").collect { |c| c.to_f }
|
||||
layers = params[:layers]
|
||||
box = true if params[:box] == "yes"
|
||||
object_zoom = false
|
||||
elsif params[:minlon] and params[:minlat] and params[:maxlon] and params[:maxlat]
|
||||
bbox = true
|
||||
minlon = params[:minlon].to_f
|
||||
minlat = params[:minlat].to_f
|
||||
maxlon = params[:maxlon].to_f
|
||||
maxlat = params[:maxlat].to_f
|
||||
layers = params[:layers]
|
||||
box = true if params[:box]=="yes"
|
||||
object_zoom = false
|
||||
elsif params[:lon] and params[:lat]
|
||||
lon = params[:lon].to_f
|
||||
lat = params[:lat].to_f
|
||||
zoom = params.fetch(:zoom, 5).to_i
|
||||
layers = params[:layers]
|
||||
object_zoom = false
|
||||
elsif params[:mlon] and params[:mlat]
|
||||
lon = params[:mlon].to_f
|
||||
lat = params[:mlat].to_f
|
||||
zoom = params.fetch(:zoom, 12).to_i
|
||||
layers = params[:layers]
|
||||
object_zoom = false
|
||||
elsif cookies.key?("_osm_location")
|
||||
lon,lat,zoom,layers = cookies["_osm_location"].split("|")
|
||||
elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil?
|
||||
lon = @user.home_lon
|
||||
lat = @user.home_lat
|
||||
zoom = 10
|
||||
else
|
||||
unless STATUS == :database_readonly or STATUS == :database_offline
|
||||
session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location]
|
||||
end
|
||||
|
||||
if session[:location]
|
||||
bbox = true
|
||||
minlon = session[:location][:minlon]
|
||||
minlat = session[:location][:minlat]
|
||||
maxlon = session[:location][:maxlon]
|
||||
maxlat = session[:location][:maxlat]
|
||||
else
|
||||
lon = -0.1
|
||||
lat = 51.5
|
||||
zoom = params.fetch(:zoom, 5).to_i
|
||||
end
|
||||
|
||||
layers = params[:layers]
|
||||
end
|
||||
%>
|
||||
|
||||
<%= javascript_include_tag 'openlayers.js' %>
|
||||
<%= javascript_include_tag 'map.js' %>
|
||||
<%= javascript_include_tag 'notes.js' %>
|
||||
|
||||
<%= render :partial => 'resize' %>
|
||||
|
||||
<script type="text/javascript">
|
||||
var marker;
|
||||
var map;
|
||||
|
||||
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
|
||||
var params = OSM.mapParams();
|
||||
|
||||
<% if @user %>
|
||||
var loginName = "<%= @user.display_name %>"
|
||||
|
@ -160,44 +71,37 @@ end
|
|||
<% end -%>
|
||||
<% end %>
|
||||
|
||||
<% unless object_zoom %>
|
||||
<% if bbox %>
|
||||
var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);
|
||||
if (!params.object_zoom) {
|
||||
if (params.bbox) {
|
||||
var bbox = new OpenLayers.Bounds(params.minlon, params.minlat, params.maxlon, params.maxlat);
|
||||
|
||||
map.zoomToExtent(proj(bbox));
|
||||
|
||||
<% if box %>
|
||||
if (params.box) {
|
||||
$(window).load(function() { addBoxToMap(bbox) });
|
||||
<% end %>
|
||||
<% else %>
|
||||
var centre = new OpenLayers.LonLat(<%= lon %>, <%= lat %>);
|
||||
<% if params[:scale].to_f > 0 then -%>
|
||||
var zoom = <%= scale_to_zoom params[:scale] %>;
|
||||
<% else -%>
|
||||
var zoom = <%= zoom %>;
|
||||
<% end -%>
|
||||
}
|
||||
} else {
|
||||
setMapCenter(new OpenLayers.LonLat(params.lon, params.lat), params.zoom);
|
||||
}
|
||||
}
|
||||
|
||||
setMapCenter(centre, zoom);
|
||||
<% end %>
|
||||
<% end %>
|
||||
if (params.layers) {
|
||||
setMapLayers(params.layers);
|
||||
}
|
||||
|
||||
<% if !layers.nil? and !layers.empty? %>
|
||||
setMapLayers("<%= layers %>");
|
||||
<% end %>
|
||||
if (params.marker) {
|
||||
marker = addMarkerToMap(new OpenLayers.LonLat(params.mlon, params.mlat));
|
||||
}
|
||||
|
||||
<% if marker %>
|
||||
marker = addMarkerToMap(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>));
|
||||
<% end %>
|
||||
if (params.object) {
|
||||
var url = "/api/" + OSM.API_VERSION + "/" + params.object_type + "/" + params.object_id;
|
||||
|
||||
<% if object %>
|
||||
var url = "/api/<%= "#{API_VERSION}" %>/<%= object_type %>/<%= object_id %>";
|
||||
|
||||
<% if object_type != "node" %>
|
||||
if (params.object_type != "node") {
|
||||
url += "/full";
|
||||
<% end %>
|
||||
}
|
||||
|
||||
$(window).load(function() { addObjectToMap(url, <%= object_zoom %>) });
|
||||
<% end %>
|
||||
$(window).load(function() { addObjectToMap(url, params.object_zoom) });
|
||||
}
|
||||
|
||||
map.events.register("moveend", map, updateLocation);
|
||||
map.events.register("changelayer", map, updateLocation);
|
||||
|
@ -211,8 +115,11 @@ end
|
|||
map.noteLayer.setVisibility(true);
|
||||
});
|
||||
|
||||
$("#show_data").click(function () {
|
||||
$.ajax({ url: "<%= url_for :controller => :browse, :action => :start %>" });
|
||||
$("#show_data").click(function (e) {
|
||||
$.ajax({ url: $(this).attr('href'), success: function (sidebarHtml) {
|
||||
startBrowse(sidebarHtml);
|
||||
}});
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("body").on("click", "a.set_position", function () {
|
||||
|
@ -249,18 +156,11 @@ end
|
|||
var layers = getMapLayers();
|
||||
var extents = unproj(map.getExtent());
|
||||
var expiry = new Date();
|
||||
var objtype;
|
||||
var objid;
|
||||
|
||||
<% if object %>
|
||||
objtype = "<%= object_type %>";
|
||||
objid = <%= object_id %>;
|
||||
<% end %>
|
||||
|
||||
updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, objtype, objid);
|
||||
updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, params.object_type, params.object_id);
|
||||
|
||||
expiry.setYear(expiry.getFullYear() + 10);
|
||||
document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers + "; expires=" + expiry.toGMTString();
|
||||
$.cookie("_osm_location", [lonlat.lon, lonlat.lat, zoom, layers].join("|"), {expires: expiry});
|
||||
}
|
||||
|
||||
function remoteEditHandler(event) {
|
||||
|
@ -304,12 +204,14 @@ end
|
|||
|
||||
$(document).ready(function () {
|
||||
$("#exportanchor").click(function (e) {
|
||||
$.ajax({ url: "<%= url_for :controller => :export, :action => :start %>" });
|
||||
$.ajax({ url: "<%= url_for :controller => :export, :action => :start %>", success: function (sidebarHtml) {
|
||||
startExport(sidebarHtml);
|
||||
}});
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
<% if params[:action] == 'export' -%>
|
||||
$.ajax({ url: "<%= url_for :controller => :export, :action => :start %>" });
|
||||
<% if params[:export] -%>
|
||||
$("#exportanchor").click();
|
||||
<% end -%>
|
||||
|
||||
<% if params[:query] -%>
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
<div id="mapkey">
|
||||
<table class="mapkey-table">
|
||||
<% YAML.load_file("#{Rails.root}/config/key.yml").each do |name,data| %>
|
||||
<% if params[:layer] == name %>
|
||||
<% data.each do |entry| %>
|
||||
<% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %>
|
||||
<tr>
|
||||
<td class="mapkey-table-key" align="center">
|
||||
<%= image_tag "key/#{name}/#{entry['image']}" %>
|
||||
</td>
|
||||
<td class="mapkey-table-value">
|
||||
<%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% data.each do |entry| %>
|
||||
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry['min_zoom'] %>" data-zoom-max="<%= entry['max_zoom'] %>">
|
||||
<td class="mapkey-table-key">
|
||||
<%= image_tag "key/#{name}/#{entry['image']}" %>
|
||||
</td>
|
||||
<td class="mapkey-table-value">
|
||||
<%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
|
|
|
@ -13,15 +13,10 @@ else
|
|||
end
|
||||
%>
|
||||
|
||||
<%= javascript_include_tag 'openlayers.js' %>
|
||||
<%= javascript_include_tag 'map.js' %>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var marker;
|
||||
|
||||
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
|
||||
|
||||
function init(){
|
||||
var centre = new OpenLayers.LonLat(<%= lon %>, <%= lat %>);
|
||||
<% if params[:scale].to_f > 0 then -%>
|
||||
|
|
|
@ -82,16 +82,20 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<p><b><%= t 'user.view.mapper since' %></b> <%= l @this_user.creation_time, :format => :friendly %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %></p>
|
||||
<div id="description"><%= @this_user.description.to_html %></div>
|
||||
|
||||
<p><b><%= t 'user.view.ct status' %></b>
|
||||
<p class='deemphasize'><small>
|
||||
<%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %>
|
||||
/
|
||||
<%= t 'user.view.ct status' %>
|
||||
<% if not @this_user.terms_agreed.nil? -%>
|
||||
<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
|
||||
<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
|
||||
<% elsif not @this_user.terms_seen? -%>
|
||||
<%= t 'user.view.ct undecided' %>
|
||||
<% else -%>
|
||||
<%= t 'user.view.ct declined' %>
|
||||
<% end -%>
|
||||
</small>
|
||||
</p>
|
||||
|
||||
<% if @user and @user.administrator? -%>
|
||||
|
@ -103,10 +107,6 @@
|
|||
<p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
|
||||
<% end -%>
|
||||
|
||||
<h3><%= t 'user.view.description' %></h3>
|
||||
|
||||
<div id="description"><%= @this_user.description.to_html %></div>
|
||||
|
||||
<% if @user and @this_user.id == @user.id %>
|
||||
<div id="map" class="user_map">
|
||||
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
|
||||
|
|
|
@ -56,8 +56,7 @@ OpenStreetMap::Application.configure do
|
|||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||
config.assets.precompile += %w( map.js menu.js pngfix.js site.js swfobject.js )
|
||||
config.assets.precompile += %w( openlayers.js )
|
||||
config.assets.precompile += %w( pngfix.js swfobject.js )
|
||||
config.assets.precompile += %w( large-ltr.css small-ltr.css print-ltr.css )
|
||||
config.assets.precompile += %w( large-rtl.css small-rtl.css print-rtl.css )
|
||||
config.assets.precompile += %w( browse.css theme/openstreetmap/style.css )
|
||||
|
|
|
@ -3,6 +3,9 @@ defaults: &defaults
|
|||
server_url: "www.openstreetmap.org"
|
||||
# The generator
|
||||
generator: "OpenStreetMap server"
|
||||
copyright_owner: "OpenStreetMap and contributors"
|
||||
attribution_url: "http://www.openstreetmap.org/copyright"
|
||||
license_url: "http://opendatacommons.org/licenses/odbl/1-0/"
|
||||
# Sender addresses for emails
|
||||
email_from: "OpenStreetMap <webmaster@openstreetmap.org>"
|
||||
email_return_path: "bounces@openstreetmap.org"
|
||||
|
|
28
config/i18n-js.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Split context in several files.
|
||||
# By default only one file with all translations is exported and
|
||||
# no configuration is required. Your settings for asset pipeline
|
||||
# are automatically recognized.
|
||||
#
|
||||
# If you want to split translations into several files or specify
|
||||
# locale contexts that will be exported, just use this file to do
|
||||
# so.
|
||||
#
|
||||
# If you're going to use the Rails 3.1 asset pipeline, change
|
||||
# the following configuration to something like this:
|
||||
#
|
||||
# translations:
|
||||
# - file: "app/assets/javascripts/i18n/translations.js"
|
||||
#
|
||||
# If you're running an old version, you can use something
|
||||
# like this:
|
||||
#
|
||||
# translations:
|
||||
# - file: "public/javascripts/translations.js"
|
||||
# only: "*"
|
||||
#
|
||||
translations:
|
||||
- file: "app/assets/javascripts/i18n/translations.js"
|
||||
only:
|
||||
- "*.browse.start_rjs.*"
|
||||
- "*.export.start_rjs.*"
|
||||
- "*.javascripts.*"
|
|
@ -16,6 +16,32 @@ module I18n
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module JS
|
||||
class << self
|
||||
def make_ordered(unordered)
|
||||
ordered = ActiveSupport::OrderedHash.new
|
||||
|
||||
unordered.keys.sort { |a,b| a.to_s <=> b.to_s }.each do |key|
|
||||
value = unordered[key]
|
||||
|
||||
if value.is_a?(Hash)
|
||||
ordered[key] = make_ordered(value)
|
||||
else
|
||||
ordered[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
ordered
|
||||
end
|
||||
|
||||
def filtered_translations_with_order
|
||||
make_ordered(filtered_translations_without_order)
|
||||
end
|
||||
|
||||
alias_method_chain :filtered_translations, :order
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
|
||||
|
|
|
@ -50,42 +50,3 @@ mapnik:
|
|||
- { min_zoom: 15, max_zoom: 18, name: permissive, image: permissive.png }
|
||||
- { min_zoom: 15, max_zoom: 18, name: destination, image: destination.png }
|
||||
- { min_zoom: 12, max_zoom: 18, name: construction, image: construction.png }
|
||||
|
||||
osmarender:
|
||||
- { min_zoom: 0, max_zoom: 18, name: motorway, image: motorway.png }
|
||||
- { min_zoom: 0, max_zoom: 18, name: trunk, image: trunk.png }
|
||||
- { min_zoom: 7, max_zoom: 18, name: primary, image: primary.png }
|
||||
- { min_zoom: 9, max_zoom: 18, name: secondary, image: secondary.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: unsurfaced, image: unsurfaced.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: track, image: track.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: byway, image: byway.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: bridleway, image: bridleway.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: cycleway, image: cycleway.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: footway, image: footway.png }
|
||||
- { min_zoom: 8, max_zoom: 18, name: rail, image: rail.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: subway, image: subway.png }
|
||||
- { min_zoom: 13, max_zoom: 18, name: tram, image: tram.png }
|
||||
- { min_zoom: 0, max_zoom: 18, name: admin, image: admin.png }
|
||||
- { min_zoom: 9, max_zoom: 18, name: forest, image: forest.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: wood, image: wood.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: park, image: park.png }
|
||||
- { min_zoom: 8, max_zoom: 18, name: resident, image: resident.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: tourist, image: tourist.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: common, image: common.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: retail, image: retail.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: industrial, image: industrial.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: commercial, image: commercial.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: heathland, image: heathland.png }
|
||||
- { min_zoom: 7, max_zoom: 18, name: lake, image: lake.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: farm, image: farm.png }
|
||||
- { min_zoom: 10, max_zoom: 18, name: brownfield, image: brownfield.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: cemetery, image: cemetery.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: allotments, image: allotments.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: pitch, image: pitch.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: centre, image: centre.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: reserve, image: reserve.png }
|
||||
- { min_zoom: 11, max_zoom: 18, name: military, image: military.png }
|
||||
- { min_zoom: 12, max_zoom: 18, name: school, image: school.png }
|
||||
- { min_zoom: 12, max_zoom: 18, name: building, image: building.png }
|
||||
- { min_zoom: 12, max_zoom: 18, name: station, image: station.png }
|
||||
- { min_zoom: 12, max_zoom: 18, name: summit, image: summit.png }
|
||||
|
|
|
@ -140,10 +140,10 @@ af:
|
|||
data_layer_name: Data
|
||||
details: Details
|
||||
drag_a_box: Trek 'n boks op die kaart om 'n gebied te kies
|
||||
edited_by_user_at_timestamp: Verander deur [[user]] om [[timestamp]]
|
||||
history_for_feature: Geskiedenis van [[feature]]
|
||||
edited_by_user_at_timestamp: Verander deur %{user} om %{timestamp}
|
||||
history_for_feature: Geskiedenis van %{feature}
|
||||
load_data: Laai data
|
||||
loaded_an_area_with_num_features: Hierdie area het [[num_features]] items. Party webblaaiers mag stadig raak wanneer hulle om soveel data te vertoon. Om nietemin aan te gaan, kies die skakel hier onder.
|
||||
loaded_an_area_with_num_features: Hierdie area het %{num_features} items. Party webblaaiers mag stadig raak wanneer hulle om soveel data te vertoon. Om nietemin aan te gaan, kies die skakel hier onder.
|
||||
loading: Laai...
|
||||
manually_select: Kies 'n ander gebied handmatig
|
||||
object_list:
|
||||
|
@ -153,18 +153,18 @@ af:
|
|||
heading: Objeklys
|
||||
history:
|
||||
type:
|
||||
node: Node [[id]]
|
||||
way: Weg [[id]]
|
||||
node: Node %{id}
|
||||
way: Weg %{id}
|
||||
selected:
|
||||
type:
|
||||
node: Node [[id]]
|
||||
way: Weg [[id]]
|
||||
node: Node %{id}
|
||||
way: Weg %{id}
|
||||
type:
|
||||
node: Node
|
||||
way: Weg
|
||||
private_user: private gebruiker
|
||||
show_history: Wys Geskiedenis
|
||||
unable_to_load_size: Aflaai van data onmoontlik. Area van grootte [[bbox_size]] is te groot. Moet kleiner as %{max_bbox_size} wees
|
||||
unable_to_load_size: Aflaai van data onmoontlik. Area van grootte %{bbox_size} is te groot. Moet kleiner as %{max_bbox_size} wees
|
||||
wait: Wag asseblief...
|
||||
zoom_or_select: Zoom in of kies 'n gebied op die kaart om te besigtig
|
||||
tag_details:
|
||||
|
@ -893,10 +893,6 @@ af:
|
|||
anon_edits_link_text: Lees waarom dit die geval is.
|
||||
user_page_link: gebruikersbladsy
|
||||
index:
|
||||
license:
|
||||
license_name: Creative Commons Naamsvermelding 2.0
|
||||
notice: Gelisensieer onder die %{license_name} lisensie deur die %{project_name} en sy bydraers.
|
||||
project_name: OpenStreetMap-projek
|
||||
permalink: Permanente skakel
|
||||
shortlink: Kort skakel
|
||||
key:
|
||||
|
|
|
@ -100,12 +100,14 @@ aln:
|
|||
closed_at: "U mshel në:"
|
||||
created_at: "U krijue en:"
|
||||
has_nodes:
|
||||
other: one=
|
||||
one: "Has the following %{count} node:"
|
||||
other: "Has the following %{count} nodes:"
|
||||
has_relations:
|
||||
one: "Ka pas %{count} lidhje:"
|
||||
other: "Ka pas marrëdhënieve %{count} :"
|
||||
has_ways:
|
||||
other: one=
|
||||
one: "Has the following %{count} way:"
|
||||
other: "Has the following %{count} ways:"
|
||||
no_bounding_box: Nuk ka barok qe osht kon vnu n'kto ndrryshime.
|
||||
show_area_box: Tregoje kutinë e fushës
|
||||
common_details:
|
||||
|
@ -190,10 +192,10 @@ aln:
|
|||
data_layer_name: Të dhanunat
|
||||
details: Detajet
|
||||
drag_a_box: Tërhjeke nji kuti n'hartë për me e zgjedhë zonën
|
||||
edited_by_user_at_timestamp: E ka ndryshue [[user]] në [[timestamp]]
|
||||
history_for_feature: Historia për [[feature]]
|
||||
edited_by_user_at_timestamp: E ka ndryshue %{user} në %{timestamp}
|
||||
history_for_feature: Historia për %{feature}
|
||||
load_data: Ngarkoji të dhanunat
|
||||
loaded_an_area_with_num_features: "Ti e ke marrë ni zonë që ka [[num_features]] . E do browsera nuk e qesin fort mirë kualitetin e t'dhanunave me ta. Browseri duhet me i kallxue ma pak se 100 t'dhanuna në t'njejtin vakt: me bo diqka tjetër munet me ta ngadalsue browserin. Nëse je i/e sigurtë, nësë don mi pa t'dhanunat, duhesh me klikue ktë pullë."
|
||||
loaded_an_area_with_num_features: "Ti e ke marrë ni zonë që ka %{num_features} . E do browsera nuk e qesin fort mirë kualitetin e t'dhanunave me ta. Browseri duhet me i kallxue ma pak se 100 t'dhanuna në t'njejtin vakt: me bo diqka tjetër munet me ta ngadalsue browserin. Nëse je i/e sigurtë, nësë don mi pa t'dhanunat, duhesh me klikue ktë pullë."
|
||||
loading: Tu u ngarkue...
|
||||
manually_select: Zgjidhe nji fushë tjetër
|
||||
object_list:
|
||||
|
@ -203,18 +205,18 @@ aln:
|
|||
heading: Lista e t'dhanunave
|
||||
history:
|
||||
type:
|
||||
node: Pika [[id]]
|
||||
way: Udha [[id]]
|
||||
node: Pika %{id}
|
||||
way: Udha %{id}
|
||||
selected:
|
||||
type:
|
||||
node: Pika [[id]]
|
||||
way: Rruga [[id]]
|
||||
node: Pika %{id}
|
||||
way: Rruga %{id}
|
||||
type:
|
||||
node: Pikë
|
||||
way: Udhë
|
||||
private_user: Përdorues privat
|
||||
show_history: Kqyre Historinë
|
||||
unable_to_load_size: "Nuk kemi muejt me e shfaqë: madhësinë e kutisë [[bbox_size]] asht shum e madhe (duhet me kenë ma e vogël se %{max_bbox_size})"
|
||||
unable_to_load_size: "Nuk kemi muejt me e shfaqë: madhësinë e kutisë %{bbox_size} asht shum e madhe (duhet me kenë ma e vogël se %{max_bbox_size})"
|
||||
wait: Pritni...
|
||||
zoom_or_select: Afroje ose zgedhe zonën n'hartë qe po don me e pa.
|
||||
tag_details:
|
||||
|
@ -840,8 +842,6 @@ aln:
|
|||
other: Kutia jote ka %{count} mesazhe të palexume
|
||||
zero: Kutia jote nuk ka asnjë mesazh të palexume
|
||||
intro_1: OpenStreetMap është një hartë e lirë editable e tërë botës. Kjo është bërë nga njerëzit si ju.
|
||||
license:
|
||||
title: Të dhënat OpenStreetMap është i liçensuar nën Creative Commons Attribution-Share njësoj License 2,0 Generic
|
||||
log_in: log in
|
||||
log_in_tooltip: Hyni që me një llogari ekzistuese
|
||||
logo:
|
||||
|
@ -868,7 +868,6 @@ aln:
|
|||
text: Në ni ngjarje të ni konflikti me faqen e përkthyme dhe %{english_original_link}, faqja anglisht ka përparsi
|
||||
title: Rreth kti përkthimi
|
||||
legal_babble:
|
||||
contributors_au_html: "<strong> Australi </ strong>: Përmban të dhëna të bazuara periferi\n në Zyra Australiane e Statistikave të dhënave."
|
||||
contributors_ca_html: "<strong> Kanada </ strong>: Përmban të dhëna nga\n GeoBase ®, GeoGratis (© Departamenti i Natyrore\n Burimet Kanada), CanVec (Departamenti i Natyrore ©\n Burimet Kanada), dhe StatCan (Divizioni Gjeografia,\n Statistika Kanada)."
|
||||
contributors_footer_2_html: " Përfshirja e të dhënave në OpenStreetMap nuk do të thotë që origjinal\n dhënave miraton ofrues OpenStreetMap, ofron çdo garanci ose\n pranon ndonjë përgjegjësi."
|
||||
contributors_gb_html: "<strong> Mbretëria e Bashkuar </ strong>: Përmban të pajisjeve\n Anketa të dhënat © Crown copyright bazës së të dhënave dhe të drejtë\n 2010."
|
||||
|
@ -882,7 +881,6 @@ aln:
|
|||
intro_2_html: "Ju jeni të lirë ta kopjoni, shpërndani, përcjell dhe përshtatur hartat tona\n dhe të dhënat, për aq kohë sa ju e kreditit OpenStreetMap e saj\n kontribuesve. Nëse ju ndryshoni ose me ndërtimin e hartave tona ose të dhëna, ju\n mund të shpërndani rezultat vetëm në bazë të licencës të njëjtën.\n <Plotë një\n href = \"http://creativecommons.org/licenses/by-sa/2.0/legalcode\"> ligjore\n <Kod / a> shpjegon të drejtat tuaja dhe të përgjegjësive."
|
||||
more_1_html: "Lexo më shumë lidhje me përdorimin e të dhënave tona në <a\n href = \"http://wiki.openstreetmap.org/wiki/Legal_FAQ\"> Ligjore\n FAQ </ a>."
|
||||
more_2_html: "OSM janë kontribuesit kujtoi kurrë për të shtuar të dhënat nga ndonjë\n Burime copyright (p.sh. Google Maps apo të shtypura harta) pa\n lejen shprehimisht nga mbajtësit të drejtën e autorit."
|
||||
more_3_html: "Edhe pse OpenStreetMap është e hapur të dhëna, ne nuk mund të sigurojë një\n pa-e-ngarkuar hartë API për zhvilluesit e palëve të treta.\n\n Shiko <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\"> tonë API Perdorimi Politika </ a>,\n <a href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\"> tjegull Perdorimi Politika </ a>\n dhe <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\"> Nominatim Perdorimi Politika </ a>."
|
||||
more_title_html: Gjetja më shumë
|
||||
title_html: Copyright
|
||||
native:
|
||||
|
@ -1109,10 +1107,6 @@ aln:
|
|||
index:
|
||||
js_1: Ju jeni tuj e përdor naj shfletues që nuk e përkrah JavaScript, ose ju e keni ndalu JavaScript.
|
||||
js_2: OpenStreetMap përdor Java skriptet për planet e saj të rrëshqitshëm.
|
||||
license:
|
||||
license_name: Creative Commons Attribution-Share Alike 2.0
|
||||
notice: E licencume nëpërmjet %{license_name} licenca prej %{project_name} dhe kontribuuesve të tij.
|
||||
project_name: Projekti OpenStreetMap
|
||||
permalink: Permalink
|
||||
shortlink: Shortlink
|
||||
key:
|
||||
|
|
|
@ -83,6 +83,8 @@ ar:
|
|||
application:
|
||||
require_cookies:
|
||||
cookies_needed: يبدو أن الكوكيز عندك معطلة - يرجى تفعيل الكوكيز في متصفحك قبل المتابعة.
|
||||
require_moderator:
|
||||
not_a_moderator: عليك أن تكون وسيط لتنفيذ هذا الإجراء
|
||||
setup_user_auth:
|
||||
blocked: لقد تم عرقلة وصولك إلى الـ API. يرجى تسجيل الدخول من صفحة الموقع لمعرفة المزيد.
|
||||
browse:
|
||||
|
@ -118,6 +120,7 @@ ar:
|
|||
common_details:
|
||||
changeset_comment: "التعليق:"
|
||||
deleted_at: "حذف في:"
|
||||
deleted_by: "تم الحذف من:"
|
||||
edited_at: "عُدّل في:"
|
||||
edited_by: "عُدّل بواسطة:"
|
||||
in_changeset: "في حزمة التغييرات:"
|
||||
|
@ -127,6 +130,11 @@ ar:
|
|||
entry_role: العلاقة %{relation_name} (كــ %{relation_role})
|
||||
map:
|
||||
deleted: تم الحذف
|
||||
edit:
|
||||
area: حرّر مساحة
|
||||
node: حرّر عقدة
|
||||
relation: حرّر علاقة
|
||||
way: حرّر طريق
|
||||
larger:
|
||||
area: اعرض المنطقة على خريطة أكبر
|
||||
node: اعرض العقدة على خريطة أكبر
|
||||
|
@ -152,7 +160,7 @@ ar:
|
|||
edit: تعديل العقدة
|
||||
node: عقدة
|
||||
node_title: "عقدة: %{node_name}"
|
||||
view_history: اعرض التاريخ
|
||||
view_history: شاهد الخط الزمني
|
||||
node_details:
|
||||
coordinates: "إحداثيات:"
|
||||
part_of: "جزء من:"
|
||||
|
@ -160,7 +168,7 @@ ar:
|
|||
download_xml: نزّل إكس إم أل
|
||||
node_history: تاريخ العقدة
|
||||
node_history_title: "تاريخ العقدة: %{node_name}"
|
||||
view_details: اعرض التفاصيل
|
||||
view_details: شاهد التفاصيل
|
||||
not_found:
|
||||
sorry: عفوًا، لم يتم العثور على %{type} بالمعرّف %{id}.
|
||||
type:
|
||||
|
@ -171,11 +179,17 @@ ar:
|
|||
paging_nav:
|
||||
of: من
|
||||
showing_page: إظهار الصفحة
|
||||
redacted:
|
||||
redaction: التنقيح %{id}
|
||||
type:
|
||||
node: العقدة
|
||||
relation: علاقة
|
||||
way: طريق
|
||||
relation:
|
||||
download_xml: نزّل إكس إم إل
|
||||
relation: العلاقة
|
||||
relation_title: "العلاقة: %{relation_name}"
|
||||
view_history: اعرض التاريخ
|
||||
view_history: شاهد الخط الزمني
|
||||
relation_details:
|
||||
members: "الأعضاء:"
|
||||
part_of: "جزء من:"
|
||||
|
@ -183,7 +197,7 @@ ar:
|
|||
download_xml: نزّل إكس إم أل
|
||||
relation_history: تاريخ العلاقة
|
||||
relation_history_title: "تاريخ العلاقة: %{relation_name}"
|
||||
view_details: اعرض التفاصيل
|
||||
view_details: شاهد التفاصيل
|
||||
relation_member:
|
||||
entry_role: "%{type} %{name} كــ %{role}"
|
||||
type:
|
||||
|
@ -198,11 +212,11 @@ ar:
|
|||
data_layer_name: تصفح بيانات الخريطة
|
||||
details: التفاصيل
|
||||
drag_a_box: اسحب مربع على الخريطة لاختيار منطقة
|
||||
edited_by_user_at_timestamp: عُدّل بواسطة [[user]] في [[timestamp]]
|
||||
edited_by_user_at_timestamp: عُدّل بواسطة %{user} في %{timestamp}
|
||||
hide_areas: إخفاء المناطق
|
||||
history_for_feature: تاريخ الــ[[feature]]
|
||||
history_for_feature: تاريخ الــ%{feature}
|
||||
load_data: تحميل البيانات
|
||||
loaded_an_area_with_num_features: "لقد قمت بتحميل منطقة تحتوي على [[num_features]] ميّزة. بصفة عامّة، بعض المتصفحات قد لا تتوافق بشكل جيد مع عرض هذه الكمية من البيانات. عمومًا، تعمل المتصفحات بشكل أفضل في عرض أقل من 100 ميّزة في وقت واحد: القيام بأي شيء آخر قد يجعل المتصفح بطيء أو لن يستجيب. إن كنت متأكدًا من أنك ترغب في عرض هذه البيانات، يمكنك القيام بذلك عن طريق النقر على الزر أدناه."
|
||||
loaded_an_area_with_num_features: "لقد قمت بتحميل منطقة تحتوي على %{num_features} ميّزة. بصفة عامّة، بعض المتصفحات قد لا تتوافق بشكل جيد مع عرض هذه الكمية من البيانات. عمومًا، تعمل المتصفحات بشكل أفضل في عرض أقل من 100 ميّزة في وقت واحد: القيام بأي شيء آخر قد يجعل المتصفح بطيء أو لن يستجيب. إن كنت متأكدًا من أنك ترغب في عرض هذه البيانات، يمكنك القيام بذلك عن طريق النقر على الزر أدناه."
|
||||
loading: جاري التحميل...
|
||||
manually_select: اختر يدويًا منطقة أخرى
|
||||
object_list:
|
||||
|
@ -212,23 +226,24 @@ ar:
|
|||
heading: قائمة الكائنات
|
||||
history:
|
||||
type:
|
||||
node: عقدة [[id]]
|
||||
way: طريق [[id]]
|
||||
node: عقدة %{id}
|
||||
way: طريق %{id}
|
||||
selected:
|
||||
type:
|
||||
node: عقدة [[id]]
|
||||
way: طريق [[id]]
|
||||
node: عقدة %{id}
|
||||
way: طريق %{id}
|
||||
type:
|
||||
node: عقدة
|
||||
way: طريق
|
||||
private_user: مستخدم الخاص
|
||||
show_areas: أظهر المناطق
|
||||
show_history: أظهر التاريخ
|
||||
unable_to_load_size: "غير قادر على التحميل: حجم مربع الإحاطة [[bbox_size]] كبير جدًا (يجب أن يكون أصغر من %{max_bbox_size})"
|
||||
unable_to_load_size: "غير قادر على التحميل: حجم مربع الإحاطة %{bbox_size} كبير جدًا (يجب أن يكون أصغر من %{max_bbox_size})"
|
||||
wait: انتظر...
|
||||
zoom_or_select: قم بالتكبير أو اختر منطقة من الخريطة لعرضها
|
||||
tag_details:
|
||||
tags: "الوسوم:"
|
||||
wikipedia_link: الـ%{page} مقالة على ويكيبيديا
|
||||
timeout:
|
||||
sorry: عذرًا، بيانات %{type} بالمعرّف %{id} استغرقت وقتًا طويلا للاسترداد.
|
||||
type:
|
||||
|
@ -239,7 +254,7 @@ ar:
|
|||
way:
|
||||
download_xml: نزّل إكس إم إل
|
||||
edit: تعديل الطريق
|
||||
view_history: اعرض التاريخ
|
||||
view_history: شاهد الخط الزمني
|
||||
way: طريق
|
||||
way_title: "طريق: %{way_name}"
|
||||
way_details:
|
||||
|
@ -251,7 +266,7 @@ ar:
|
|||
part_of: "جزء من:"
|
||||
way_history:
|
||||
download_xml: نزّل إكس إم إل
|
||||
view_details: اعرض التفاصيل
|
||||
view_details: شاهد التفاصيل
|
||||
way_history: تاريخ الطريق
|
||||
way_history_title: "تاريخ الطريق: %{way_name}"
|
||||
changeset:
|
||||
|
@ -276,17 +291,33 @@ ar:
|
|||
list:
|
||||
description: التغييرات الحديثة
|
||||
description_bbox: حزم التغييرات داخل %{bbox}
|
||||
description_friend: حزم التغييرات من قبل أصدقائك
|
||||
description_nearby: حزم التغييرات من قبل المسخدمين في المقربة
|
||||
description_user: حزم التغييرات بواسطة %{user}
|
||||
description_user_bbox: حزم التغييرات بواسطة %{user} داخل %{bbox}
|
||||
empty_anon_html: لا يوجد تغييرات حتى الآن
|
||||
empty_user_html: يبدو أنك لم تقم بأي تغييرات حتى الآن. للبدء بالعمل، أنظر إلى <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.3'>دليل المبتدئين</a>.
|
||||
heading: حزم التغييرات
|
||||
heading_bbox: حزم التغييرات
|
||||
heading_friend: حزم التغييرات
|
||||
heading_nearby: حزم التغييرات
|
||||
heading_user: حزم التغييرات
|
||||
heading_user_bbox: حزم التغييرات
|
||||
title: حزم التغييرات
|
||||
title_bbox: حزم التغييرات داخل %{bbox}
|
||||
title_friend: حزم التغييرات بواسطة أصدقائك
|
||||
title_user: حزم التغييرات بواسطة %{user}
|
||||
title_user_bbox: حزم التغييرات بواسطة %{user} داخل %{bbox}
|
||||
timeout:
|
||||
sorry: عذراً، لقد إستمرت لائحة حزم التغييرات اللتي طلبتها وقتاً طويلاً للسحب.
|
||||
diary_entry:
|
||||
comments:
|
||||
ago: "%{ago} سابقاً"
|
||||
comment: التعليق
|
||||
has_commented_on: "%{display_name} علّق على مدخلات اليومية التالية"
|
||||
newer_comments: التعليقات الجديدة
|
||||
older_comments: التعليقات القديمة
|
||||
when: متى
|
||||
diary_comment:
|
||||
comment_from: تعليق من %{link_user} في %{comment_created_at}
|
||||
confirm: أكّد
|
||||
|
@ -334,6 +365,8 @@ ar:
|
|||
older_entries: المدخلات الأقدم
|
||||
recent_entries: "المدخلات اليومية الحديثة:"
|
||||
title: يوميات المستخدمين
|
||||
title_friends: يوميات الأصدقاء
|
||||
title_nearby: يوميات/مفكرات المستخدمين في المقبرة
|
||||
user_title: يومية %{user}
|
||||
location:
|
||||
edit: تعديل
|
||||
|
@ -353,6 +386,13 @@ ar:
|
|||
title: يوميات %{user} | %{title}
|
||||
user_title: يومية %{user}
|
||||
editor:
|
||||
default: الغيابي (حالياً %{name})
|
||||
potlatch:
|
||||
description: Potlatch 1 (محرّر ضمن المتصفح)
|
||||
name: Potlatch 1
|
||||
potlatch2:
|
||||
description: Potlatch 2 (محرّر ضمن المتصفح)
|
||||
name: Potlatch 2
|
||||
remote:
|
||||
description: تحكم عن بعد (JOSM أو Merkaartor)
|
||||
name: تحكم عن بعد
|
||||
|
@ -430,16 +470,27 @@ ar:
|
|||
suffix_place: ، %{distance} %{direction} من %{placename}
|
||||
search_osm_nominatim:
|
||||
prefix:
|
||||
aeroway:
|
||||
aerodrome: المطار
|
||||
gate: البوابة
|
||||
helipad: منصة مروحية
|
||||
runway: مدرج إقلاع
|
||||
taxiway: مدرج المناورات
|
||||
terminal: صالة مطار
|
||||
amenity:
|
||||
WLAN: نقطة إتصال لاسلكية
|
||||
airport: مطار
|
||||
arts_centre: مركز فني/ثقافي
|
||||
artwork: عمل فني
|
||||
atm: صراف آلي
|
||||
auditorium: قاعة محاضرات
|
||||
bank: مصرف
|
||||
bar: حانة
|
||||
bbq: مشوى
|
||||
bench: مقعد
|
||||
bicycle_parking: موقف دراجات
|
||||
bicycle_rental: تأجير دراجة
|
||||
biergarten: حديقة البيرة
|
||||
brothel: بيت دعارة
|
||||
bureau_de_change: مكتب صرافة
|
||||
bus_station: محطة حافلات
|
||||
|
@ -448,6 +499,7 @@ ar:
|
|||
car_sharing: مشاركة سيارات
|
||||
car_wash: غسيل سيارات
|
||||
casino: نادي قمار
|
||||
charging_station: محطة تعبئة
|
||||
cinema: سينما
|
||||
clinic: عيادة
|
||||
club: نادي
|
||||
|
@ -506,9 +558,12 @@ ar:
|
|||
shelter: ملجأ
|
||||
shop: متجر/دكان/حانوت
|
||||
shopping: التسوق
|
||||
shower: غسيل بالدش
|
||||
social_centre: مركز إجتماعي
|
||||
social_club: نادي اجتماعي
|
||||
studio: ستوديو
|
||||
supermarket: سوبرماركت
|
||||
swimming_pool: مسبح
|
||||
taxi: سيارة أجرة
|
||||
telephone: هاتف عمومي
|
||||
theatre: مسرح
|
||||
|
@ -519,10 +574,15 @@ ar:
|
|||
veterinary: جراحة بيطرية
|
||||
village_hall: مبنى/دار القرية
|
||||
waste_basket: سلة نفايات
|
||||
wifi: نقطة اتصال لاسلكية واي فاي
|
||||
wifi: نقطة إتصال لاسلكية
|
||||
youth_centre: مركز نشاطات للشباب
|
||||
boundary:
|
||||
administrative: حدود إدارية
|
||||
national_park: محمية وطنية
|
||||
protected_area: منطقة محمية
|
||||
bridge:
|
||||
suspension: جسر معلق
|
||||
"yes": جسر
|
||||
building:
|
||||
"yes": مبنى
|
||||
highway:
|
||||
|
@ -547,11 +607,13 @@ ar:
|
|||
primary_link: طريق أولي
|
||||
raceway: حلبة سباق
|
||||
residential: طريق سكني
|
||||
rest_area: منطقة إستراحة
|
||||
road: طريق
|
||||
secondary: طريق ثانوي
|
||||
secondary_link: طريق ثانوي
|
||||
service: طريق خدمة
|
||||
services: خدمات الطرق السريعة
|
||||
speed_camera: كاميرا كشف السرعة
|
||||
steps: درج
|
||||
stile: مرقى لعبور جدار
|
||||
tertiary: طريق فرعي
|
||||
|
@ -568,6 +630,7 @@ ar:
|
|||
building: مبنى
|
||||
castle: قلعة
|
||||
church: كنيسة
|
||||
fort: حصن
|
||||
house: منزل
|
||||
icon: أيقونة
|
||||
manor: عزبة
|
||||
|
@ -592,6 +655,7 @@ ar:
|
|||
farmland: أرض زراعية
|
||||
farmyard: فناء مزرعة
|
||||
forest: غابة
|
||||
garages: مرائب
|
||||
grass: عشب
|
||||
greenfield: حقول خضراء
|
||||
industrial: منطقة صناعية
|
||||
|
@ -600,6 +664,7 @@ ar:
|
|||
military: منطقة عسكرية
|
||||
mine: منجم
|
||||
nature_reserve: محمية طبيعية
|
||||
orchard: بستان
|
||||
park: منتزه
|
||||
piste: منطقة تزحلق
|
||||
quarry: كسّارة
|
||||
|
@ -614,8 +679,10 @@ ar:
|
|||
wood: حرج
|
||||
leisure:
|
||||
beach_resort: شاطئ منتجع
|
||||
bird_hide: مخبئ طيور
|
||||
common: أرض مشاع
|
||||
fishing: منطقة صيد سمك
|
||||
fitness_station: مركز اللياقة البدنية
|
||||
garden: حديقة
|
||||
golf_course: ملعب غولف
|
||||
ice_rink: حلبة تزلج على الجليد
|
||||
|
@ -626,12 +693,17 @@ ar:
|
|||
pitch: ملعب رياضي
|
||||
playground: ملعب
|
||||
recreation_ground: ميدان ألعاب
|
||||
sauna: حمّام بخاري حار
|
||||
slipway: مزلقة
|
||||
sports_centre: مركز رياضي
|
||||
stadium: مدرج ألعاب رياضية
|
||||
swimming_pool: بركة سباحة
|
||||
track: مضمار سباق
|
||||
water_park: منتزه ألعاب مائية
|
||||
military:
|
||||
airfield: منطقة عسكرية
|
||||
barracks: ثكنات
|
||||
bunker: دشمة
|
||||
natural:
|
||||
bay: خليج
|
||||
beach: شاطئ
|
||||
|
@ -640,9 +712,11 @@ ar:
|
|||
channel: قناة
|
||||
cliff: جرف
|
||||
crater: فوهة بركان
|
||||
dune: كثيب
|
||||
feature: ميزة
|
||||
fell: منحدر
|
||||
fjord: مضيق بحري
|
||||
forest: غابة
|
||||
geyser: نافورة ماء حار
|
||||
glacier: نهر/بحر جليدي
|
||||
heath: أرض بور
|
||||
|
@ -662,6 +736,7 @@ ar:
|
|||
scrub: أشجار منخفضة
|
||||
shoal: مياه ضحلة
|
||||
spring: نبع
|
||||
stone: حجر
|
||||
strait: مضيق جبلي
|
||||
tree: شجرة
|
||||
valley: وادي
|
||||
|
@ -670,6 +745,19 @@ ar:
|
|||
wetland: أرض رطبة
|
||||
wetlands: أراضي رطبة
|
||||
wood: حرج
|
||||
office:
|
||||
accountant: محاسب
|
||||
architect: مهندس معماري
|
||||
company: شركة
|
||||
employment_agency: وكالة توظيف
|
||||
estate_agent: سمسار مباني
|
||||
government: دائرة حكومية
|
||||
insurance: مكتب شركة تأمين
|
||||
lawyer: محامي
|
||||
ngo: مكتب منظمة غير حكومية
|
||||
telecommunication: مكتب شركة إتصالات
|
||||
travel_agent: وكيل سفريات
|
||||
"yes": مكتب
|
||||
place:
|
||||
airport: مطار
|
||||
city: مدينة
|
||||
|
@ -681,6 +769,7 @@ ar:
|
|||
houses: منازل
|
||||
island: جزيرة
|
||||
islet: جزيرة صغيرة
|
||||
isolated_dwelling: سكن منعزل
|
||||
locality: محلة
|
||||
moor: أرض جرداء
|
||||
municipality: البلدية
|
||||
|
@ -697,7 +786,7 @@ ar:
|
|||
abandoned: سكة حديد مهجورة
|
||||
construction: سكة حديدية تحت الإنشاء
|
||||
disused: سكة حديد مهجورة
|
||||
disused_station: محطة سكة حديد مهجورة
|
||||
disused_station: محطة سكة حديدية مهجورة
|
||||
funicular: سكة حديدية معلقة
|
||||
halt: موقف قطار
|
||||
historic_station: محطة سكة حديد تاريخية
|
||||
|
@ -805,7 +894,10 @@ ar:
|
|||
valley: وادي
|
||||
viewpoint: موقع كاشف
|
||||
zoo: حديقة حيوانات
|
||||
tunnel:
|
||||
"yes": نفق
|
||||
waterway:
|
||||
artificial: مجرى ماء إصطناعي
|
||||
boatyard: حوض سفن
|
||||
canal: قناة
|
||||
connector: قناة مائية
|
||||
|
@ -832,11 +924,12 @@ ar:
|
|||
map:
|
||||
base:
|
||||
cycle_map: خريطة للدراجات
|
||||
transport_map: خريطة تنقلات
|
||||
site:
|
||||
edit_disabled_tooltip: قم بالتكبير لتحرير الخريطة
|
||||
edit_tooltip: عدّل الخريطة
|
||||
edit_zoom_alert: يجب عليك التكبير لتعديل الخريطة
|
||||
history_disabled_tooltip: قم بالتكبير لعرض التعديلات في هذه المنطقة
|
||||
history_disabled_tooltip: إستعمل المقربة لعرض التغييرات في هذه المساحة
|
||||
history_tooltip: اعرض التعديلات في هذه المنطقة
|
||||
history_zoom_alert: يجب التكبير لرؤية تاريخ التعديل
|
||||
layouts:
|
||||
|
@ -861,6 +954,7 @@ ar:
|
|||
history: تاريخ
|
||||
home: الصفحة الرئيسية
|
||||
home_tooltip: اذهب إلى الصفحة الرئيسية
|
||||
inbox_html: البريد الوارد
|
||||
inbox_tooltip:
|
||||
few: صندوق بريدك يحوي %{count} رسائل غير مقروءة
|
||||
one: صندوق بريدك يحوي رسالة واحدة غير مقروءة
|
||||
|
@ -868,8 +962,9 @@ ar:
|
|||
two: صندوق بريدك يحوي رسالتين غير مقروءتين
|
||||
zero: صندوق بريدك لا يحوي رسائل غير مقروءة
|
||||
intro_1: خريطة الشارع المفتوحة هي خريطة للعالم كله قابلة للتحرير حرة ومجانية. قام بإنشائها أشخاص مثلك.
|
||||
license:
|
||||
title: بيانات خريطة الشارع المفتوحة مرخصة تحت رخصة المشاع الإبداعي، النسبة، نسخة 2.0
|
||||
intro_2_create_account: أنشئ حساب مستخدم
|
||||
intro_2_download: نزّل
|
||||
intro_2_use: إستعمل
|
||||
log_in: تسجيل الدخول
|
||||
log_in_tooltip: سجّل الدخول مع حساب موجود
|
||||
logo:
|
||||
|
@ -881,6 +976,8 @@ ar:
|
|||
title: ادعم خريطة الشارع المفتوحة بهبة نقدية
|
||||
osm_offline: حاليًا قاعدة بيانات خريطة الشارع المفتوحة مغلقة بينما يتم الانتهاء من أعمال الصيانة الأساسية لقاعدة البيانات.
|
||||
osm_read_only: حاليًا قاعدة بيانات خريطة الشارع المفتوحة في وضع القراءة بينما يتم الانتهاء من أعمال الصيانة الأساسية لقاعدة البيانات.
|
||||
partners_html: الضيافة مدعومة من %{ucl}, %{ic} و %{bytemark}, و %{partners} آخرون.
|
||||
partners_partners: الشركاء
|
||||
sign_up: أنشئ حسابًا
|
||||
sign_up_tooltip: أنشئ حسابًا كي تستطيع المساهمة
|
||||
tag_line: ويكي خريطة العالم الحرة
|
||||
|
@ -896,6 +993,8 @@ ar:
|
|||
foreign:
|
||||
english_link: النص الإنجليزي الأصلي
|
||||
title: حول هذه الترجمة
|
||||
legal_babble:
|
||||
title_html: حقوق النشر والترخيص
|
||||
native:
|
||||
mapping_link: إبدأ التخطيط
|
||||
native_link: النسخة العربية
|
||||
|
@ -906,6 +1005,7 @@ ar:
|
|||
inbox:
|
||||
date: التاريخ
|
||||
from: من
|
||||
messages: لديك %{new_messages} و %{old_messages}
|
||||
my_inbox: الوارد
|
||||
no_messages_yet: لا يوجد لديك رسائل بعد. لماذا لا تقوم بالاتصال مع بعض %{people_mapping_nearby_link}؟
|
||||
outbox: الصادر
|
||||
|
@ -1099,6 +1199,8 @@ ar:
|
|||
allow_write_gpx: ارفع آثار جي بي إس.
|
||||
allow_write_prefs: تعديل تفضيلاته.
|
||||
authorize_url: "رابط التصريح:"
|
||||
confirm: هل أنت متأكد؟
|
||||
delete: أمحي الزبون
|
||||
edit: عدّل التفاصيل
|
||||
key: "مفتاح المستهلك:"
|
||||
requests: "طلب الصلاحيات التالية من المستخدم:"
|
||||
|
@ -1108,6 +1210,17 @@ ar:
|
|||
url: "رابط طلب النموذج:"
|
||||
update:
|
||||
flash: تم تحديث معلومات العميل بنجاح
|
||||
redaction:
|
||||
edit:
|
||||
description: الوصف
|
||||
new:
|
||||
description: الوصف
|
||||
show:
|
||||
confirm: هل أنت متأكد؟
|
||||
description: "الوصف:"
|
||||
user: "المنشئ:"
|
||||
update:
|
||||
flash: تمّ حفظ التغييرات.
|
||||
site:
|
||||
edit:
|
||||
anon_edits_link_text: ابحث عن السبب لماذا هو هذا الحال.
|
||||
|
@ -1119,10 +1232,6 @@ ar:
|
|||
index:
|
||||
js_1: أنت إما تستخدم متصفح لا يدعم جافا سكريبت، أو أنك عطلت استعمال جافا سكريبت.
|
||||
js_2: خريطة الشارع المفتوحة تستخدم جافا سكريبت لخريطتها المنزلقة.
|
||||
license:
|
||||
license_name: المشاع الإبداعي، النسبة، نسخة 2.0
|
||||
notice: مرخص بموجب رخصة %{license_name} بواسطة %{project_name} ومساهميه.
|
||||
project_name: مشروع خريطة الشارع المفتوحة
|
||||
permalink: وصلة دائمة
|
||||
shortlink: وصلة قصيرة
|
||||
key:
|
||||
|
@ -1194,6 +1303,18 @@ ar:
|
|||
unclassified: طريق غير مصنّف
|
||||
unsurfaced: طريق غير معبد
|
||||
wood: غابة
|
||||
markdown_help:
|
||||
alt: النص البديل
|
||||
first: البند الأول
|
||||
image: الصورة
|
||||
link: الوصلة
|
||||
ordered: لائحة مرتبة
|
||||
second: البند الثاني
|
||||
text: النص
|
||||
unordered: لائحة غير مرتبة
|
||||
richtext_area:
|
||||
edit: حرّر
|
||||
preview: شاهد
|
||||
search:
|
||||
search: بحث
|
||||
search_help: "أمثلة: 'الحرية'، 'شارع الحمراء, بيروت'، 'مدرسة, القاهرة' <a href='http://http://wiki.openstreetmap.org/wiki/Ar:Search?uselang=ar'>المزيد من الأمثلة...</a>"
|
||||
|
@ -1274,6 +1395,8 @@ ar:
|
|||
trace_optionals:
|
||||
tags: الوسوم
|
||||
trace_paging_nav:
|
||||
newer: الآثار الحديثة
|
||||
older: الآثار القديمة
|
||||
showing_page: إظهار الصفحة %{page}
|
||||
view:
|
||||
delete_track: احذف هذا الأثر
|
||||
|
@ -1323,6 +1446,10 @@ ar:
|
|||
new email address: "عنوان البريد الإلكتروني الجديد:"
|
||||
new image: أضف صورة
|
||||
no home location: لم تدخل موقع منزلك.
|
||||
openid:
|
||||
link: http://wiki.openstreetmap.org/wiki/OpenID
|
||||
link text: ما هذا ؟
|
||||
openid: "OpenID:"
|
||||
preferred editor: "المحرر المفضل:"
|
||||
preferred languages: "اللغات المفضّلة:"
|
||||
profile description: "وصف الملف الشخصي:"
|
||||
|
@ -1359,6 +1486,7 @@ ar:
|
|||
list:
|
||||
empty: لا سجلات مطابقة تم العثور عليها!
|
||||
heading: المستخدمون
|
||||
hide: إخفاء المستخدمين المحددين
|
||||
title: المستخدمون
|
||||
login:
|
||||
auth failure: آسف، لا يمكن الدخول بتلك التفاصيل.
|
||||
|
@ -1368,6 +1496,7 @@ ar:
|
|||
login_button: تسجيل الدخول
|
||||
lost password link: أنسيت كلمة المرور؟
|
||||
new to osm: جديد لخريطة الشارع المفتوحة ؟
|
||||
no account: ليس لديك حسابا ؟
|
||||
password: "كلمة السر:"
|
||||
register now: تسجل الآن
|
||||
remember: "تذكرني:"
|
||||
|
@ -1386,6 +1515,7 @@ ar:
|
|||
title: نسيان كلمة المرور
|
||||
make_friend:
|
||||
already_a_friend: حاليًا أنت و %{name} أصدقاء.
|
||||
button: أضف كصديق
|
||||
failed: عفوًا، تعذر إضافة %{name} كصديق.
|
||||
success: "%{name} الآن صديقك."
|
||||
new:
|
||||
|
@ -1443,6 +1573,7 @@ ar:
|
|||
rest_of_world: بقية العالم
|
||||
legale_select: "الرجاء اختيار بلد الإقامة:"
|
||||
read and accept: يرجى قراءة الاتفاقية أدناه والضغط على زر الموافقة لتأكيد قبول شروط هذا الاتفاق على مشاركاتك الموجودة حاليًا والمستقبلية.
|
||||
title: "شروط المساهم:"
|
||||
view:
|
||||
activate_user: نشّط هذا المستخدم
|
||||
add as friend: أضف كصديق
|
||||
|
@ -1450,27 +1581,38 @@ ar:
|
|||
block_history: اعرض العرقلات الواصلة
|
||||
blocks by me: العرقلات بواسطتي
|
||||
blocks on me: العرقلات علي
|
||||
comments: التعليقات
|
||||
confirm: أكّد
|
||||
confirm_user: تأكيد هذا المستخدم
|
||||
create_block: امنع هذا المستخدم
|
||||
created from: "أُنشىء من:"
|
||||
ct accepted: مقبول %{ago} سابقاً
|
||||
ct declined: مرفوض
|
||||
ct status: "شروط المساهم:"
|
||||
ct undecided: متردد
|
||||
deactivate_user: احذف هذا المستخدم
|
||||
delete_user: احذف هذا المستخدم
|
||||
description: الوصف
|
||||
diary: يومية
|
||||
edits: مساهمات
|
||||
email address: "عنوان البريد الإلكتروني:"
|
||||
friends_changesets: تصفح كل حزم التغييرات من قبل الأصدقاء
|
||||
friends_diaries: تصفح جميع مدخلات مدونات الأصدقاء
|
||||
hide_user: اخفِ هذا المستخدم
|
||||
if set location: إن قمت بتعيين موقعك، خريطة وأشياء جميلة سوف تظهر أدناه. يمكنك تحديد موقع منزلك من صفحة %{settings_link}.
|
||||
km away: على بعد %{count}كم
|
||||
latest edit: "آخر تغيير %{ago}:"
|
||||
m away: على بعد %{count}متر
|
||||
mapper since: "مُخطط منذ:"
|
||||
moderator_history: اعرض العرقلات المعطاة
|
||||
my comments: تعليقاتي
|
||||
my diary: يوميتي
|
||||
my edits: مساهماتي
|
||||
my settings: إعداداتي
|
||||
my traces: آثاري
|
||||
nearby users: "مستخدمين أيضًا بالجوار:"
|
||||
nearby_changesets: تصفح كل حزم التغييرات من قبل المستخدمين في المقربة
|
||||
nearby_diaries: تصفح جميع مدخلات مدونات المستخدمين في المقربة
|
||||
new diary entry: مدخلة يومية جديدة
|
||||
no friends: لم تقم بإضافة أي أصدقاء بعد.
|
||||
no nearby users: لا يوجد بعد المزيد من المستخدمين أفصحوا عن تخطيطهم بالجوار.
|
||||
|
@ -1546,11 +1688,14 @@ ar:
|
|||
creator_name: المنشئ
|
||||
display_name: مستخدم مُعرقل
|
||||
edit: تعديل
|
||||
next: التالي »
|
||||
not_revoked: (لم تلغ)
|
||||
previous: « السابق
|
||||
reason: السبب العرقلة
|
||||
revoke: ابطل!
|
||||
revoker_name: مُبطل بواسطة
|
||||
show: اعرض
|
||||
showing_page: جاري عرض الصفحة %{page}
|
||||
status: الحالة
|
||||
period:
|
||||
few: "%{count} ساعات"
|
||||
|
|
|
@ -183,10 +183,10 @@ arz:
|
|||
data_layer_name: البيانات
|
||||
details: التفاصيل
|
||||
drag_a_box: اسحب مربع على الخريطه لاختيار منطقة
|
||||
edited_by_user_at_timestamp: عُدّل بواسطه [[user]] فى [[timestamp]]
|
||||
history_for_feature: تاريخ الــ[[feature]]
|
||||
edited_by_user_at_timestamp: عُدّل بواسطه %{user} فى %{timestamp}
|
||||
history_for_feature: تاريخ الــ%{feature}
|
||||
load_data: تحميل البيانات
|
||||
loaded_an_area_with_num_features: "لقد قمت بتحميل منطقه تحتوى على [[num_features]] ميّزه. بصفه عامّه، بعض المتصفحات قد لا تتوافق بشكل جيد مع عرض هذه الكميه من البيانات. عمومًا، تعمل المتصفحات بشكل أفضل فى عرض أقل من 100 ميّزه فى وقت واحد: القيام بأى شيء آخر قد يجعل المتصفح بطيء أو لن يستجيب. إن كنت متأكدًا من أنك ترغب فى عرض هذه البيانات، يمكنك القيام بذلك عن طريق النقر على الزر أدناه."
|
||||
loaded_an_area_with_num_features: "لقد قمت بتحميل منطقه تحتوى على %{num_features} ميّزه. بصفه عامّه، بعض المتصفحات قد لا تتوافق بشكل جيد مع عرض هذه الكميه من البيانات. عمومًا، تعمل المتصفحات بشكل أفضل فى عرض أقل من 100 ميّزه فى وقت واحد: القيام بأى شيء آخر قد يجعل المتصفح بطيء أو لن يستجيب. إن كنت متأكدًا من أنك ترغب فى عرض هذه البيانات، يمكنك القيام بذلك عن طريق النقر على الزر أدناه."
|
||||
loading: تحميل...
|
||||
manually_select: اختر يدويًا منطقه أخرى
|
||||
object_list:
|
||||
|
@ -196,18 +196,18 @@ arz:
|
|||
heading: قائمه الكائنات
|
||||
history:
|
||||
type:
|
||||
node: عقده [[id]]
|
||||
way: طريق [[id]]
|
||||
node: عقده %{id}
|
||||
way: طريق %{id}
|
||||
selected:
|
||||
type:
|
||||
node: عقده [[id]]
|
||||
way: طريق [[id]]
|
||||
node: عقده %{id}
|
||||
way: طريق %{id}
|
||||
type:
|
||||
node: عقدة
|
||||
way: طريق
|
||||
private_user: مستخدم الخاص
|
||||
show_history: أظهر التاريخ
|
||||
unable_to_load_size: "غير قادر على التحميل: حجم مربع الإحاطه [[bbox_size]] كبير جدًا (يجب أن يكون أصغر من %{max_bbox_size})"
|
||||
unable_to_load_size: "غير قادر على التحميل: حجم مربع الإحاطه %{bbox_size} كبير جدًا (يجب أن يكون أصغر من %{max_bbox_size})"
|
||||
wait: انتظر...
|
||||
zoom_or_select: قم بالتكبير أو اختر منطقه من الخريطه لعرضها
|
||||
tag_details:
|
||||
|
@ -781,8 +781,6 @@ arz:
|
|||
two: صندوق بريدك يحوى رسالتين غير مقروءتين
|
||||
zero: صندوق بريدك لا يحوى رسائل غير مقروءة
|
||||
intro_1: خريطه الشارع المفتوحه هى خريطه للعالم كله قابله للتحرير حره ومجانيه. قام بإنشائها أشخاص مثلك.
|
||||
license:
|
||||
title: بيانات خريطه الشارع المفتوحه مرخصه تحت رخصه المشاع الإبداعى، النسبه، نسخه 2.0
|
||||
log_in: دخول
|
||||
log_in_tooltip: سجّل الدخول مع حساب موجود
|
||||
logo:
|
||||
|
@ -1004,10 +1002,6 @@ arz:
|
|||
index:
|
||||
js_1: أنت إما تستخدم متصفح لا يدعم جافا سكريبت، أو أنك عطلت استعمال جافا سكريبت.
|
||||
js_2: خريطه الشارع المفتوحه تستخدم جافا سكريبت لخريطتها المنزلقه.
|
||||
license:
|
||||
license_name: المشاع الإبداعى، النسبه، نسخه 2.0
|
||||
notice: مرخص بموجب رخصه %{license_name} بواسطه %{project_name} ومساهميه.
|
||||
project_name: مشروع خريطه الشارع المفتوحة
|
||||
permalink: وصله دائمة
|
||||
shortlink: وصله قصيرة
|
||||
key:
|
||||
|
|
|
@ -201,11 +201,11 @@ ast:
|
|||
data_layer_name: Ver datos del mapa
|
||||
details: Detalles
|
||||
drag_a_box: Arrastra un cuadru nel mapa pa seleicionar un área
|
||||
edited_by_user_at_timestamp: Editao por [[user]] el [[timestamp]]
|
||||
edited_by_user_at_timestamp: Editao por %{user} el %{timestamp}
|
||||
hide_areas: Anubrir árees
|
||||
history_for_feature: Historial de [[feature]]
|
||||
history_for_feature: Historial de %{feature}
|
||||
load_data: Cargar datos
|
||||
loaded_an_area_with_num_features: "Cargasti un área que contién [[num_features]] carauterístiques. Polo xeneral, dellos restoladores nun pueden amosar bien esta cantidá de datos. Normalmente los restoladores funcionen meyor amosando menos de [[max_features]] carauterístiques al tiempu: d'otra miente se tornen lentos/dexen de responder. Si tas seguru d'amosar los datos, pues facelo calcando nel botón d'abaxo."
|
||||
loaded_an_area_with_num_features: "Cargasti un área que contién %{num_features} carauterístiques. Polo xeneral, dellos restoladores nun pueden amosar bien esta cantidá de datos. Normalmente los restoladores funcionen meyor amosando menos de %{max_features} carauterístiques al tiempu: d'otra miente se tornen lentos/dexen de responder. Si tas seguru d'amosar los datos, pues facelo calcando nel botón d'abaxo."
|
||||
loading: Cargando...
|
||||
manually_select: Seleiciona manualmente un área distinta
|
||||
object_list:
|
||||
|
@ -215,19 +215,19 @@ ast:
|
|||
heading: Llista d'oxetos
|
||||
history:
|
||||
type:
|
||||
node: Nodiu [[id]]
|
||||
way: Vía [[id]]
|
||||
node: Nodiu %{id}
|
||||
way: Vía %{id}
|
||||
selected:
|
||||
type:
|
||||
node: Nodiu [[id]]
|
||||
way: Vía [[id]]
|
||||
node: Nodiu %{id}
|
||||
way: Vía %{id}
|
||||
type:
|
||||
node: Nodiu
|
||||
way: Vía
|
||||
private_user: usuariu priváu
|
||||
show_areas: Amosar árees
|
||||
show_history: Ver historial
|
||||
unable_to_load_size: "Nun se pue cargar: El tamañu del cuadru de llende [[bbox_size]] ye demasiao grande (tien de ser menor de %{max_bbox_size})"
|
||||
unable_to_load_size: "Nun se pue cargar: El tamañu del cuadru de llende %{bbox_size} ye demasiao grande (tien de ser menor de %{max_bbox_size})"
|
||||
wait: Espera...
|
||||
zoom_or_select: Amplía o seleiciona un área del mapa pa velu
|
||||
tag_details:
|
||||
|
@ -969,8 +969,6 @@ ast:
|
|||
intro_2_html: Los datos son llibres pa %{download} y %{use} baxo la so %{license}. %{create_account} p'ameyorar el mapa.
|
||||
intro_2_license: llicencia abierta
|
||||
intro_2_use: usar
|
||||
license:
|
||||
title: Los datos d'OpenStreetMap tan llicenciaos baxo la Llicencia Xenérica Creative Commons Attribution-Share Alike 2.0
|
||||
log_in: identificase
|
||||
log_in_tooltip: Entrar nuna cuenta esistente
|
||||
logo:
|
||||
|
@ -989,7 +987,6 @@ ast:
|
|||
partners_ucl: el Centru de RV de la UCL
|
||||
sign_up: dase d'alta
|
||||
sign_up_tooltip: Crear una cuenta pa editar
|
||||
sotm2012: ¡Ven a la Conferencia OpenStreetMap 2012, L'Estáu del Mapa, del 6 al 8 de setiembre en Tokio!
|
||||
tag_line: El wikimapamundi llibre
|
||||
user_diaries: Diarios d'usuariu
|
||||
user_diaries_tooltip: Ver los diarios d'usuariu
|
||||
|
@ -1006,7 +1003,6 @@ ast:
|
|||
title: Tocante a esta traducción
|
||||
legal_babble:
|
||||
contributors_at_html: "<strong>Austria</strong>: Contien datos de\n<a href=\"http://data.wien.gv.at/\">Stadt Wien</a> (baxo\n<a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY</a>),\n<a href=\"http://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm\">Land Vorarlberg</a> y\nLand Tirol (baxo <a href=\"http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/\">CC-BY AT con enmiendes</a>)."
|
||||
contributors_au_html: "<strong>Australia</strong>: Contien datos de barrios basaos en datos de Australian Bureau of\nStatistics."
|
||||
contributors_ca_html: "<strong>Canadá</strong>: Contien datos de GeoBase®, GeoGratis (© Department of Natural\nResources Canada), CanVec (© Department of Natural\nResources Canada), y StatCan (Geography Division,\nStatistics Canada)."
|
||||
contributors_footer_1_html: "Pa más detalles d'estes, y otres fontes que s'usaron p'ayudar a\nameyorar OpenStreetMap, por favor, llei la <a\nhref=\"http://wiki.openstreetmap.org/wiki/Contributors\">Páxina\nde los collaboradores</a> na Wiki d'OpenStreetMap."
|
||||
contributors_footer_2_html: La inclusión de datos n'OpenStreetMap nun significa que'l fornidor de los datos orixinales sofite OpenStreetMap, ufra garantía dala o aceute dalguna responsabilidá.
|
||||
|
@ -1015,7 +1011,6 @@ ast:
|
|||
contributors_intro_html: La nuesa llicencia CC BY-SA requier “reconocer al autor orixinal, de manera razonable pal mediu o los medios que teas utilizando”. Los mapeadores individuales d'OSM nun piden más créditu que “Collaboradores d'OpenStreetMap”, pero cuando s'incluye n'OpenStreetMap información d'un organismu nacional de cartografía o d'otra fuente importante, ye razonable reproducir el so créditu direutamente o enllazar al mesmu nesta páxina.
|
||||
contributors_nl_html: "<strong>Holanda</strong>: Contien datos © AND, 2007\n(<a href=\"http://www.and.com\">www.and.com</a>)"
|
||||
contributors_nz_html: "<strong>Nueva Zelanda</strong>: Contien datos sacaos de Land Information New Zealand. Crown Copyright reserved."
|
||||
contributors_pl_html: "<strong>Polonia</strong>: Contien datos de <a\nhref=\"http://ump.waw.pl/\">mapes UMP-pcPL</a>. Copyright collaboradores de\nUMP-pcPL.\n<a href=\"http://wiki.openstreetmap.org/wiki/UMP2OSM_Importing\">\nMás tocante al usu n'OSM de datos UMP</a>"
|
||||
contributors_title_html: Los nuesos collaboradores
|
||||
contributors_za_html: "<strong>Sudáfrica</strong>: Contién datos sacaos de\n<a href=\"http://www.ngi.gov.za/\">Chief Directorate:\nNational Geo-Spatial Information</a>, State copyright reserved."
|
||||
credit_1_html: Si uses les imaxes de mapes d'OpenStreetMap, te pidimos que'l testu de reconocimientu ponga polo menos “© Collaboradores d'OpenStreetMap, CC BY-SA”. Si sólo vas usar datos del mapa, lo que pidimos ye “Datos del mapa © Collaboradores d'OpenstreetMap, CC BY-SA”.
|
||||
|
@ -1025,7 +1020,6 @@ ast:
|
|||
intro_2_html: Pues copiar, distribuir, tresmitir y adautar los nuesos mapes y datos de mou llibre, mentanto des reconocimientu a OpenStreetMap y a los sos collaboradores. Si camudes o creas conteníu sobre los nuesos mapes o datos, podrás distribuir el resultáu baxo la mesma llicencia. El <a href="http://creativecommons.org/licenses/by-sa/2.0/legalcode">códigu llegal completu</a> t'esplica los tos drechos y obligaciones.
|
||||
more_1_html: "Llei más tocante a cómo utilizar los nuesos datos en <a\nhref=\"http://wiki.openstreetmap.org/wiki/Legal_FAQ\">Entrugues y rempuestes llegales</a> (n'inglés)."
|
||||
more_2_html: Recordamos a los collaboradores d'OSM qu'enxamás amiesten datos que vengan d'una fonte con drechos d'autor acutaos (p. ex. de Google Maps o mapes impresos) ensin el permisu esplícitu de los dueños de los drechos d'autor.
|
||||
more_3_html: "Anque OpenStreetMap son datos abiertos, nun podemos ufrir una API de mapes de baldre pa desendolcadores d'aplicaciones pa terceros.\nLlee la nuesa <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\">Política d'usu de la API</a> (n'inglés),\n<a href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\">Política d'usu d'imaxes</a> (n'inglés)\ny <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\">Política d'usu de Nominatim</a> (n'inglés tamién)."
|
||||
more_title_html: Pa saber más
|
||||
title_html: Drechos d'autor y llicencia
|
||||
native:
|
||||
|
@ -1300,10 +1294,6 @@ ast:
|
|||
index:
|
||||
js_1: O tas usando un restolador ensin sofitu pa JavaScript, o tienes JavaScript desactiváu.
|
||||
js_2: OpenStreetMap usa JavaScript pal so mapa eslizante.
|
||||
license:
|
||||
license_name: Creative Commons Attribution-Share Alike 2.0
|
||||
notice: Llicenciao baxo llicencia %{license_name} pol %{project_name} y los sos collaboradores.
|
||||
project_name: Proyeutu OpenStreetMap
|
||||
permalink: Enllaz permanente
|
||||
remote_failed: Falló la edición - asegúrate de tener cargáu JOSM o Merkaartor y de que tea activada la opción de control remotu
|
||||
shortlink: Enllaz curtiu
|
||||
|
@ -1592,8 +1582,6 @@ ast:
|
|||
lost password link: ¿Perdisti la conseña?
|
||||
new to osm: ¿Yes nuevu con OpenStreetMap?
|
||||
no account: ¿Nun tienes una cuenta?
|
||||
notice: <a href="http://www.osmfoundation.org/wiki/License/We_Are_Changing_The_License">Saber más tocante al próximu cambiu de llicencia d'OpenStreetMap</a> (<a href="http://wiki.openstreetmap.org/wiki/ODbL/We_Are_Changing_The_License">traducciones</a>) (<a href="http://wiki.openstreetmap.org/wiki/Talk:ODbL/Upcoming">alderique</a>)
|
||||
notice_terms: OpenStreetMap va movese a una llicencia nueva dende'l 1 d'abril de 2012. Ye igual d'abierta que l'actual, pero les partes llegales s'acomoden meyor a la nuesa base de datos del mapa. Gustaría-nos caltener les tos collaboraciones n'OpenStreetMap, pero namái podemos facelo si aceutes que les distribuyamos baxo la nueva llicencia. D'otra miente, tendremos que desaniciales de la base de datos.<br /><br />Por favor, entra na to cuenta y toma dellos segundos pa revisar y aceutar los nuevos términos. ¡Gracies!
|
||||
openid: "%{logo} OpenID:"
|
||||
openid invalid: Sentímoslo, la to OpenID paez que ta mal formada
|
||||
openid missing provider: Sentímoslo, nun pudimos ponenos en contautu col to sirvidor d'OpenID
|
||||
|
@ -1638,7 +1626,9 @@ ast:
|
|||
title: Conseña perdida
|
||||
make_friend:
|
||||
already_a_friend: Yá yes collaciu de %{name}.
|
||||
button: Amestar como amigu
|
||||
failed: Lo sentimos, hebo un fallu al amestar a %{name} como collaciu.
|
||||
heading: ¿Amestar a %{user} a los amigos?
|
||||
success: "%{name} agora ye amigu tuyu."
|
||||
new:
|
||||
confirm email address: "Confirmar direición de corréu:"
|
||||
|
@ -1671,6 +1661,8 @@ ast:
|
|||
nearby mapper: Mapeador próximu
|
||||
your location: El to allugamientu
|
||||
remove_friend:
|
||||
button: Desaniciar como amigu
|
||||
heading: ¿Desaniciar a %{user} de los amigos?
|
||||
not_a_friend: "%{name} nun ye un de los tos amigos."
|
||||
success: "%{name} se desanició de los tos amigos."
|
||||
reset_password:
|
||||
|
|
|
@ -168,6 +168,11 @@ be-Tarask:
|
|||
paging_nav:
|
||||
of: з
|
||||
showing_page: Паказ старонкі
|
||||
redacted:
|
||||
type:
|
||||
node: вузел
|
||||
relation: адносіны
|
||||
way: дарога
|
||||
relation:
|
||||
download_xml: Загрузіць XML
|
||||
relation: Адносіны
|
||||
|
@ -195,11 +200,11 @@ be-Tarask:
|
|||
data_layer_name: Праглядзець зьвесткі мапы
|
||||
details: Падрабязнасьці
|
||||
drag_a_box: Расьцягніце рамку для выбару абшару
|
||||
edited_by_user_at_timestamp: Рэдагаваны [[user]] у [[timestamp]]
|
||||
edited_by_user_at_timestamp: Рэдагаваны %{user} у %{timestamp}
|
||||
hide_areas: Схаваць вобласьці
|
||||
history_for_feature: Гісторыя [[feature]]
|
||||
history_for_feature: Гісторыя %{feature}
|
||||
load_data: Загрузіць зьвесткі
|
||||
loaded_an_area_with_num_features: Вы загрузілі мясцовасьць, якая ўтрымлівае [[num_features]] аб'ектаў. Увогуле, некаторыя браўзэры ня змогуць апрацаваць такую колькасьць зьвестак. Звычайна, найлепшы вынік назіраецца, калі аб'ектаў менш за 100, пры большай колькасьці браўзэр можа страціць хуткасьць. Калі Вы ўпэўненыя, што жадаеце паказаць гэтыя зьвесткі, націсьніце кнопку ніжэй.
|
||||
loaded_an_area_with_num_features: Вы загрузілі мясцовасьць, якая ўтрымлівае %{num_features} аб'ектаў. Увогуле, некаторыя браўзэры ня змогуць апрацаваць такую колькасьць зьвестак. Звычайна, найлепшы вынік назіраецца, калі аб'ектаў менш за 100, пры большай колькасьці браўзэр можа страціць хуткасьць. Калі Вы ўпэўненыя, што жадаеце паказаць гэтыя зьвесткі, націсьніце кнопку ніжэй.
|
||||
loading: Загрузка…
|
||||
manually_select: Выбраць іншы абшар
|
||||
object_list:
|
||||
|
@ -209,19 +214,19 @@ be-Tarask:
|
|||
heading: Сьпіс аб'ектаў
|
||||
history:
|
||||
type:
|
||||
node: Вузел [[id]]
|
||||
way: Шлях [[id]]
|
||||
node: Вузел %{id}
|
||||
way: Шлях %{id}
|
||||
selected:
|
||||
type:
|
||||
node: Вузел [[id]]
|
||||
way: Шлях [[id]]
|
||||
node: Вузел %{id}
|
||||
way: Шлях %{id}
|
||||
type:
|
||||
node: Вузел
|
||||
way: Шлях
|
||||
private_user: прыватны карыстальнік
|
||||
show_areas: Паказаць вобласьці
|
||||
show_history: Паказаць гісторыю
|
||||
unable_to_load_size: "Немагчыма загрузіць: памер абшару [[bbox_size]] занадта вялікі (павінен быць меней чым %{max_bbox_size})"
|
||||
unable_to_load_size: "Немагчыма загрузіць: памер абшару %{bbox_size} занадта вялікі (павінен быць меней чым %{max_bbox_size})"
|
||||
wait: Пачакайце…
|
||||
zoom_or_select: Павялічце маштаб ці выберыце абшар на мапе для прагляду
|
||||
tag_details:
|
||||
|
@ -239,8 +244,8 @@ be-Tarask:
|
|||
way: дарога
|
||||
way:
|
||||
download_xml: Загрузіць XML
|
||||
edit: рэдагаваць
|
||||
view_history: паказаць гісторыю
|
||||
edit: Рэдагаваць дарогу
|
||||
view_history: Праглядзець гісторыю
|
||||
way: Шлях
|
||||
way_title: "Шлях: %{way_name}"
|
||||
way_details:
|
||||
|
@ -251,7 +256,7 @@ be-Tarask:
|
|||
part_of: "Частка:"
|
||||
way_history:
|
||||
download_xml: Загрузіць XML
|
||||
view_details: паказаць падрабязнасьці
|
||||
view_details: Праглядзець падрабязнасьці
|
||||
way_history: Гісторыя зьменаў дарогі
|
||||
way_history_title: "Гісторыя зьменаў шляху: %{way_name}"
|
||||
changeset:
|
||||
|
@ -295,6 +300,8 @@ be-Tarask:
|
|||
timeout:
|
||||
sorry: Прабачце, сьпіс набораў зьменаў, які Вы запыталі, занадта вялікі для атрыманьня.
|
||||
diary_entry:
|
||||
comments:
|
||||
post: Запіс
|
||||
diary_comment:
|
||||
comment_from: Камэнтар %{link_user} ад %{comment_created_at}
|
||||
confirm: Пацьвердзіць
|
||||
|
@ -385,6 +392,7 @@ be-Tarask:
|
|||
licence: Ліцэнзія
|
||||
longitude: "Даўгата:"
|
||||
manually_select: Выбраць іншы абшар
|
||||
map_image: Выява мапы (паказвае стандартны слой)
|
||||
max: максымум
|
||||
options: Устаноўкі
|
||||
osm_xml_data: Зьвесткі OpenStreetMap у фармаце XML
|
||||
|
@ -424,6 +432,12 @@ be-Tarask:
|
|||
south_east: паўднёвы ўсход
|
||||
south_west: паўднёвы захад
|
||||
west: захад
|
||||
distance:
|
||||
few: каля %{count} км
|
||||
many: каля %{count} км
|
||||
one: каля %{count} км
|
||||
other: каля %{count} км
|
||||
zero: меней 1 км
|
||||
results:
|
||||
more_results: Больш вынікаў
|
||||
no_results: Нічога ня знойдзена
|
||||
|
@ -441,6 +455,11 @@ be-Tarask:
|
|||
suffix_place: ", %{distance} %{direction} %{placename}"
|
||||
search_osm_nominatim:
|
||||
prefix:
|
||||
aeroway:
|
||||
gate: Выхад на пасадку
|
||||
helipad: Верталётная пляцоўка
|
||||
runway: Узлётна-пасадачная паласа
|
||||
taxiway: Рулёжная дарога
|
||||
amenity:
|
||||
WLAN: Доступ да WiFi
|
||||
airport: Аэрапорт
|
||||
|
@ -892,14 +911,18 @@ be-Tarask:
|
|||
history: Гісторыя
|
||||
home: дамоў
|
||||
home_tooltip: Паказаць маё месцазнаходжаньне
|
||||
inbox_tooltip:
|
||||
few: Вы маеце %{count} непрачытаныя паведамленьні
|
||||
many: Вы маеце %{count} непрачытаных паведамленьняў
|
||||
one: Вы маеце адно непрачытанае паведамленьне
|
||||
other: Вы маеце %{count} непрачытаных паведамленьняў
|
||||
zero: У Вас няма непрачытаных паведамленьняў
|
||||
intro_1: OpenStreetMap — вольная мапа ўсяго сьвету, якую магчыма рэдагаваць. Яе ствараюць такія ж людзі, як Вы.
|
||||
intro_2_create_account: Стварыце рахунак
|
||||
intro_2_download: загрузіць
|
||||
intro_2_html: Зьвесткі зьяўляюцца вольнымі для %{download} і %{use} на ўмовах %{license}. %{create_account} каб зьмяняць мапу.
|
||||
intro_2_license: вольнай ліцэнзіі
|
||||
intro_2_use: выкарыстаньні
|
||||
license:
|
||||
title: Зьвесткі OpenStreetMap даступныя на ўмовах ліцэнзіі Creative Commons Attribution-Share Alike 2.0 Generic
|
||||
log_in: увайсьці
|
||||
log_in_tooltip: Увайсьці з існуючым рахункам
|
||||
logo:
|
||||
|
@ -932,14 +955,12 @@ be-Tarask:
|
|||
title: Пра гэты пераклад
|
||||
legal_babble:
|
||||
contributors_at_html: "<strong>Аўстрыя</strong>: Утрымлівае зьвесткі\n<a href=\"http://data.wien.gv.at/\">горада Вены</a> на ўмовах\n<a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY</a>."
|
||||
contributors_au_html: "<strong>Аўстралія</strong>: Утрымлівае зьвесткі пра прыгарады ад\nАўстралійскага бюро статыстыкі."
|
||||
contributors_ca_html: "<strong>Канада</strong>: Утрымлівае зьвесткі\nGeoBase®, GeoGratis (© Дэпартамэнта прыродных рэсурсаў\nКанады), CanVec (© Дэпартамэнта прыродных рэсурсаў\nКанады), і StatCan (Статыстычнага падразьдзяленьня Канады)."
|
||||
contributors_footer_2_html: "Уключэньне зьвестак у OpenStreetMap не азначае, што пастаўшчыкі пачатковых зьвестак\nякім-небудзь чынам падтрымліваюць OpenStreetMap, прадстаўляюць гарантыі, ці\nпрымаюць на сябе якую-небудзь адказнасьць."
|
||||
contributors_fr_html: "<strong>Францыя</strong>: Утрымлівае зьвесткі\nГалоўнага падатковага ўпраўленьня."
|
||||
contributors_gb_html: "<strong>Вялікабрытанія</strong>: Утрымлівае зьвесткі Ordnance\nSurvey © Crown copyright and database right\n2010."
|
||||
contributors_intro_html: "Нашая ліцэнзія CC BY-SA патрабуе ад Вас “падаць арыгінальнага аўтара\nу адпаведнасьці з асаблівасьцямі носьбітаў інфармацыі ці іншых выкарыстоўваемых сродкаў\n”. Звычайныя ўдзельнікі OSM не патрабуюць пазначэньня аўтарства\nболей чым “удзельнікі OpenStreetMap\n”, але ў OpenStreetMap ёсьць зьвесткі з нацыянальных\nкартаграфічных агенцтваў ці іншых падобных крыніцаў,\nтаму, магчыма, мае сэнс спасылацца непасрэдна на іх\nяк на крыніцу, ці дадаць спасылку на гэтую старонку."
|
||||
contributors_nz_html: "<strong>Новая Зэляндыя</strong>: Утрымлівае зьвесткі пра\nзямельныя рэсурсы Новай Зэляндыі. Crown Copyright reserved."
|
||||
contributors_pl_html: "<strong>Польшча</strong>: Утрымлівае зьвесткі з <a\nhref=\"http://ump.waw.pl/\">мапы UMP-pcPL</a>. Copyright\nудзельнікі UMP-pcPL."
|
||||
contributors_title_html: Нашыя ўдзельнікі
|
||||
credit_1_html: "Калі Вы выкарыстоўваеце выявы мапаў OpenStreetMap, мы патрабуем, каб\nВы рабілі спасылку хаця б “© удзельнікі OpenStreetMap\n, CC BY-SA”. Калі Вы выкарыстоўваеце толькі картаграфічныя зьвесткі,\nмы патрабуем наяўнасьць “Картаграфічныя зьвесткі © Удзельнікі OpenStreetMap,\nCC BY-SA”."
|
||||
credit_2_html: "Дзе магчыма, павінна быць гіпэр-спасылка на OpenStreetMap <a\nhref=\"http://www.openstreetmap.org/\">http://www.openstreetmap.org/</a>\nі на CC BY-SA <a\nhref=\"http://creativecommons.org/licenses/by-sa/2.0/\">http://creativecommons.org/licenses/by-sa/2.0/</a>. Калі\nВы выкарыстоўваеце носьбіты, дзе выкарыстаньне спасылак немагчымае (напр.\nдрукаваныя працы), мы прапануем накіроўваць Вашым чытачоў на\nwww.openstreetmap.org (магчымае выкарыстаньне поўнага адрасу\n‘OpenStreetMap’) і на\nwww.creativecommons.org."
|
||||
|
@ -948,7 +969,6 @@ be-Tarask:
|
|||
intro_2_html: "Вы можаце капіяваць, распаўсюджваць, перадаваць і зьмяняць нашыя мапы\nі зьвесткі, да той пары, пакуль Вы спасылаецеся на OpenStreetMap і яе\nўдзельнікаў. Калі Вы зьмяняеце ці выкарыстоўваеце нашыя мапы і зьвесткі, Вы можаце\nраспаўсюджваць вынікі толькі на ўмовах такой жа ліцэнзіі. Поўны тэкст ліцэнзіі\n<a\nhref=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">legal\ncode</a> растлумачыць Вам правы і адказнасьці."
|
||||
more_1_html: "Даведайцеся болей пра выкарыстаньне нашых зьвестак на <a\nhref=\"http://wiki.openstreetmap.org/wiki/Legal_FAQ\">старонцы адказаў\nі пытаньняў</a>."
|
||||
more_2_html: "Удзельнікі OSM павінны памятаць пра тое, што забаронена дадаваць зьвесткі\nз любых крыніцаў абароненых аўтарскім правам (напрыклад, Google Maps ці друкаваных мапаў)\nбез папярэдняга дазволу ўладальнікаў аўтарскіх правоў."
|
||||
more_3_html: "Ня гледзячы на тое, што OpenStreetMap утрымлівае вольныя зьвесткі, мы ня можам\nдазволіць бясплатны API да нашых мапаў для староньніх распрацоўшчыкаў.\nГлядзіце нашыя <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\">Умовы выкарыстаньня</a>,\n<a href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\">Умовы выкарыстаньня частак мапаў</a>\nі <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\">Умовы выкарыстаньня Nominatim</a>."
|
||||
more_title_html: Даведацца болей
|
||||
title_html: Аўтарскія правы і ліцэнзія
|
||||
native:
|
||||
|
@ -964,7 +984,17 @@ be-Tarask:
|
|||
from: Ад
|
||||
messages: Вы маеце %{new_messages} і %{old_messages}
|
||||
my_inbox: Мае ўваходзячыя
|
||||
new_messages:
|
||||
few: "%{count} новыя паведамленьні"
|
||||
many: "%{count} новых паведамленьняў"
|
||||
one: "%{count} новае паведамленьне"
|
||||
other: "%{count} новых паведамленьняў"
|
||||
no_messages_yet: Вы яшчэ ня маеце паведамленьняў. Чаму б не зьвязацца з %{people_mapping_nearby_link}?
|
||||
old_messages:
|
||||
few: "%{count} старыя паведамленьня"
|
||||
many: "%{count} старых паведамленьняў"
|
||||
one: "%{count} старое паведамленьне"
|
||||
other: "%{count} старых паведамленьняў"
|
||||
outbox: зыходзячыя
|
||||
people_mapping_nearby: людзьмі, якія жывуць каля Вас
|
||||
subject: Тэма
|
||||
|
@ -993,6 +1023,11 @@ be-Tarask:
|
|||
outbox:
|
||||
date: Дата
|
||||
inbox: уваходзячыя
|
||||
messages:
|
||||
few: Вы маеце %{count} дасланыя паведамленьня
|
||||
many: Вы маеце %{count} дасланых паведамленьняў
|
||||
one: Вы маеце %{count} дасланае паведамленьне
|
||||
other: Вы маеце %{count} дасланых паведамленьняў
|
||||
my_inbox: Мае %{inbox_link}
|
||||
no_sent_messages: Вы яшчэ не даслалі паведамленьне. Чаму б не зьвязацца з %{people_mapping_nearby_link}?
|
||||
outbox: зыходзячыя
|
||||
|
@ -1181,10 +1216,6 @@ be-Tarask:
|
|||
index:
|
||||
js_1: Вы карыстаецеся браўзэрам, які не падтрымлівае ці мае забаронены JavaScript.
|
||||
js_2: OpenStreetMap выкарыстоўвае JavaScript для паказу мапы.
|
||||
license:
|
||||
license_name: Creative Commons Attribution-Share Alike 2.0
|
||||
notice: Даступна на ўмовах ліцэнзіі %{license_name}, аўтарскія правы належаць %{project_name} і яго ўдзельнікам.
|
||||
project_name: OpenStreetMap
|
||||
permalink: Сталая спасылка
|
||||
remote_failed: Памылка рэдагаваньня. Упэўніцеся, што JOSM ці Merkaartor загружаныя і дазволеная магчымасьць аддаленага кіраваньня
|
||||
shortlink: Кароткая спасылка
|
||||
|
@ -1257,6 +1288,17 @@ be-Tarask:
|
|||
unclassified: Дарога раённага значэньня
|
||||
unsurfaced: Дарога без пакрыцьця
|
||||
wood: Пушча
|
||||
markdown_help:
|
||||
first: Першы элемэнт
|
||||
heading: Загаловак
|
||||
headings: Загалоўкі
|
||||
ordered: Упарадкаваны сьпіс
|
||||
subheading: Падзагаловак
|
||||
title_html: Апрацавана з дапамогай <a href="http://daringfireball.net/projects/markdown/">Markdown</a>
|
||||
unordered: Неўпарадкаваны сьпіс
|
||||
richtext_area:
|
||||
edit: Рэдагаваць
|
||||
preview: Папярэдні прагляд
|
||||
search:
|
||||
search: Пошук
|
||||
search_help: "прыклады: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ', ці 'post offices near Lünen' <a href='http://wiki.openstreetmap.org/wiki/Search'>больш прыкладаў…</a>"
|
||||
|
@ -1452,8 +1494,6 @@ be-Tarask:
|
|||
login_button: Увайсьці
|
||||
lost password link: Забылі пароль?
|
||||
new to osm: Упершыню на OpenStreetMap?
|
||||
notice: <a href="http://www.osmfoundation.org/wiki/License/We_Are_Changing_The_License">Даведайцеся болей пра плянуемыя зьмены ліцэнзіі OpenStreetMap</a> (<a href="http://wiki.openstreetmap.org/wiki/ODbL/We_Are_Changing_The_License">пераклады</a>) (<a href="http://wiki.openstreetmap.org/wiki/Talk:ODbL/Upcoming">абмеркаваньні</a>)
|
||||
notice_terms: OpenStreetMap перайшоў на новую ліцэнзію з 1 красавіка 2012 году. Яна такая ж адкрытая як папярэдняя, але больш пасуе для нашай базы зьвестак мапы. Мы жадаем, каб Вы засталіся працаваць з OpenStreetMap, але гэта можа адбыцца толькі пасьля таго, калі Вы пагадзіцеся працаваць на ўмовах новай ліцэнзіі. У адваротным выпадку мы выдалім Ваш унёсак з базы зьвестак.<br /><br />Калі ласка, увайдзіце ў сыстэму, потым прачытайце і прыміце новыя ўмовы. Дзякуй!
|
||||
openid: "%{logo} OpenID:"
|
||||
openid invalid: Прабачце, здаецца Ваш OpenID уведзены няслушна
|
||||
openid missing provider: Прабачце, немагчыма зьвязацца з Вашым правайдэрам OpenID
|
||||
|
@ -1682,6 +1722,11 @@ be-Tarask:
|
|||
revoker_name: Адкліканае
|
||||
show: Паказаць
|
||||
status: Статус
|
||||
period:
|
||||
few: "%{count} гадзіны"
|
||||
many: "%{count} гадзінаў"
|
||||
one: "%{count} гадзіна"
|
||||
other: "%{count} гадзінаў"
|
||||
revoke:
|
||||
confirm: Вы ўпэўнены, што жадаеце адклікаць гэтае блякаваньне?
|
||||
flash: Гэтае блякаваньне было адкліканае.
|
||||
|
|
|
@ -138,10 +138,10 @@ be:
|
|||
data_layer_name: Дадзеныя
|
||||
details: Падрабязней
|
||||
drag_a_box: Расцягніце рамку на карце для выбара іншай мясцовасці
|
||||
edited_by_user_at_timestamp: Зменена [[user]] у [[timestamp]]
|
||||
history_for_feature: Гісторыя [[feature]]
|
||||
edited_by_user_at_timestamp: Зменена %{user} у %{timestamp}
|
||||
history_for_feature: Гісторыя %{feature}
|
||||
load_data: Загрузіць дадзеныя
|
||||
loaded_an_area_with_num_features: Вы загрузілі мясцовасць, што змяшчае [[num_features]] элементаў. Увогуле, некаторыя вандроўнікі могуць не здолець апрацаваць гэтакую колькасць дадзеных. Звычайна, найлепшы рэзультат назіраецца, калі элементаў менш за 100, пры большай колькасці вандроўнік можа згубіць хуткасць. Калі вы ўпэўненыя, што хочаце паглядзець на гэтыя дадзеныя, націсніце кнопку ніжэй.
|
||||
loaded_an_area_with_num_features: Вы загрузілі мясцовасць, што змяшчае %{num_features} элементаў. Увогуле, некаторыя вандроўнікі могуць не здолець апрацаваць гэтакую колькасць дадзеных. Звычайна, найлепшы рэзультат назіраецца, калі элементаў менш за 100, пры большай колькасці вандроўнік можа згубіць хуткасць. Калі вы ўпэўненыя, што хочаце паглядзець на гэтыя дадзеныя, націсніце кнопку ніжэй.
|
||||
loading: Загрузка...
|
||||
manually_select: Выбраць іншую мясцовасць
|
||||
object_list:
|
||||
|
@ -151,14 +151,14 @@ be:
|
|||
heading: Спіс аб'ектаў
|
||||
selected:
|
||||
type:
|
||||
node: Вузел [[id]]
|
||||
way: Лінія [[id]]
|
||||
node: Вузел %{id}
|
||||
way: Лінія %{id}
|
||||
type:
|
||||
node: Вузел
|
||||
way: Лінія
|
||||
private_user: таемны карыстальнік
|
||||
show_history: Паказаць гісторыю
|
||||
unable_to_load_size: "Нельга загрузіць: парем мяжы [[bbox_size]] занадта вялікі (павінен быць не больш як %{max_bbox_size})"
|
||||
unable_to_load_size: "Нельга загрузіць: парем мяжы %{bbox_size} занадта вялікі (павінен быць не больш як %{max_bbox_size})"
|
||||
wait: Пачакайце...
|
||||
zoom_or_select: Наблізьцеся ці выберыце іншую мясцовасць для агляду
|
||||
tag_details:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# Export driver: syck-pecl
|
||||
# Author: Fohanno
|
||||
# Author: Fulup
|
||||
# Author: Gwenn-Ael
|
||||
# Author: Nemo bis
|
||||
# Author: Y-M D
|
||||
br:
|
||||
|
@ -148,10 +149,10 @@ br:
|
|||
prev_changeset_tooltip: Aozadenn gent gant %{user}
|
||||
node:
|
||||
download_xml: Pellgargañ XML
|
||||
edit: aozañ
|
||||
edit: ↓Aozañ ar skoulm
|
||||
node: Skoulm
|
||||
node_title: "Skoulm : %{node_name}"
|
||||
view_history: gwelet an istor
|
||||
view_history: ↓Gwelet an istor
|
||||
node_details:
|
||||
coordinates: "Daveennoù :"
|
||||
part_of: "Lodenn eus :"
|
||||
|
@ -159,7 +160,7 @@ br:
|
|||
download_xml: Pellgargañ XML
|
||||
node_history: Istor ar skoulmoù
|
||||
node_history_title: "Istor ar skoulm : %{node_name}"
|
||||
view_details: gwelet ar munudoù
|
||||
view_details: ↓Gwelet ar munudoù
|
||||
not_found:
|
||||
sorry: Ho tigarez, an %{type} gant an id %{id} n'eo ket bet kavet.
|
||||
type:
|
||||
|
@ -171,6 +172,8 @@ br:
|
|||
of: eus
|
||||
showing_page: O tiskouez ar bajenn
|
||||
redacted:
|
||||
message_html: ↓Stumm %{version} eus an %{type}-mañ na c'hall ket bezañ diskouezet evel m"eo bet aozet. Sellit ouzh %{redaction_link} evit gouzout hiroc'h, mar plij.
|
||||
redaction: ↓Aozañ %{id}
|
||||
type:
|
||||
node: skoulm
|
||||
relation: darempred
|
||||
|
@ -179,7 +182,7 @@ br:
|
|||
download_xml: Pellgargañ XML
|
||||
relation: Darempred
|
||||
relation_title: "Darempred : %{relation_name}"
|
||||
view_history: gwelet an istor
|
||||
view_history: ↓Gwelet an istor
|
||||
relation_details:
|
||||
members: "Izili :"
|
||||
part_of: "Lodenn eus :"
|
||||
|
@ -187,7 +190,7 @@ br:
|
|||
download_xml: Pellgargañ XML
|
||||
relation_history: Istor an darempred
|
||||
relation_history_title: "Istor an darempred : %{relation_name}"
|
||||
view_details: gwelet ar munudoù
|
||||
view_details: ↓Gwelet ar munudoù
|
||||
relation_member:
|
||||
entry_role: "%{type} %{name} evel %{role}"
|
||||
type:
|
||||
|
@ -202,11 +205,11 @@ br:
|
|||
data_layer_name: Furchal e roadennoù ar gartenn
|
||||
details: Munudoù
|
||||
drag_a_box: Tresit ur voest war ar gartenn evit diuzañ un takad
|
||||
edited_by_user_at_timestamp: Aozet gant [[user]] da [[timestamp]]
|
||||
edited_by_user_at_timestamp: Aozet gant %{user} da %{timestamp}
|
||||
hide_areas: Kuzhat an takadoù
|
||||
history_for_feature: Istor evit [[feature]]
|
||||
history_for_feature: Istor evit %{feature}
|
||||
load_data: Kargañ ar roadennoù
|
||||
loaded_an_area_with_num_features: Karget hoc'h eus un takad zo ennañ [[num_features]] elfenn. Peurliesañ o devez poan ar merdeerioù o tiskwel kemend-all a roadennoù, ha labourat a reont gwelloc'h pa vez nebeutoc'h a 100 elfenn da ziskwel, a-hend-all e c'hall ho merdeer bezañ gorrek pe chom hep respont. Ma'z oc'h sur hoc'h eus c'hoant da ziskwel ar roadennoù-mañ, e c'hallit ober dre glikañ war ar bouton amañ dindan.
|
||||
loaded_an_area_with_num_features: ↓Karget hoc'h eus un takad zo ennañ %{num_features} elfenn. Peurliesañ o devez poan ar merdeerioù o tiskwel kemend-all a roadennoù, ha labourat a reont gwelloc'h pa vez nebeutoc'h a 100 elfenn da ziskwel, a-hend-all e c'hall ho merdeer bezañ gorrek pe chom hep respont. Ma'z oc'h sur hoc'h eus c'hoant da ziskwel ar roadennoù-mañ, e c'hallit ober dre glikañ war ar bouton amañ dindan.
|
||||
loading: O kargañ...
|
||||
manually_select: Diuzañ un takad disheñvel gant an dorn
|
||||
object_list:
|
||||
|
@ -216,19 +219,19 @@ br:
|
|||
heading: Roll traezoù
|
||||
history:
|
||||
type:
|
||||
node: Skoulm [[id]]
|
||||
way: Hent [[id]]
|
||||
node: Skoulm %{id}
|
||||
way: Hent %{id}
|
||||
selected:
|
||||
type:
|
||||
node: Skoulm [[id]]
|
||||
way: hent [[id]]
|
||||
node: Skoulm %{id}
|
||||
way: hent %{id}
|
||||
type:
|
||||
node: Skoulm
|
||||
way: Hent
|
||||
private_user: implijer prevez
|
||||
show_areas: Diskouez an takadoù
|
||||
show_history: Diskouez an istor
|
||||
unable_to_load_size: "Ne c'haller ket kargañ : re vras eo ment ar voest bevenniñ ([[bbox_size]]). Ret eo dezhi bezañ bihanoc'h eget %{max_bbox_size})"
|
||||
unable_to_load_size: "Ne c'haller ket kargañ : re vras eo ment ar voest bevenniñ (%{bbox_size}). Ret eo dezhi bezañ bihanoc'h eget %{max_bbox_size})"
|
||||
wait: Gortozit...
|
||||
zoom_or_select: Zoumañ pe diuzañ un takad eus ar gartenn da welet
|
||||
tag_details:
|
||||
|
@ -246,8 +249,8 @@ br:
|
|||
way: hent
|
||||
way:
|
||||
download_xml: Pellgargañ XML
|
||||
edit: aozañ
|
||||
view_history: gwelet an istor
|
||||
edit: ↓Aozañ an hent
|
||||
view_history: ↓Gwelet an istor
|
||||
way: Hent
|
||||
way_title: "Hent : %{way_name}"
|
||||
way_details:
|
||||
|
@ -258,7 +261,7 @@ br:
|
|||
part_of: "Lodenn eus :"
|
||||
way_history:
|
||||
download_xml: Pellgargañ XML
|
||||
view_details: gwelet ar munudoù
|
||||
view_details: ↓Gwelet ar munudoù
|
||||
way_history: Istor an hent
|
||||
way_history_title: "Istor an hent : %{way_name}"
|
||||
changeset:
|
||||
|
@ -287,6 +290,8 @@ br:
|
|||
description_nearby: Hollad kemmoù deuet gant an implijerien a-dost
|
||||
description_user: Strolladoù kemmoù gant %{user}
|
||||
description_user_bbox: Strolladoù kemmoù gant %{user} e-barzh %{bbox}
|
||||
empty_anon_html: ↓N'eo ket bet aozet c'hoazh
|
||||
empty_user_html: Hañvalout a ra n'ho peus graet kemm ebet. Evit kregiñ ganti, sellit ouzh <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.3'>Sturlevr an deraouidi</a>.
|
||||
heading: Hollad kemmoù
|
||||
heading_bbox: Hollad kemmoù
|
||||
heading_friend: Hollad ar c'hemmoù
|
||||
|
@ -305,6 +310,7 @@ br:
|
|||
comments:
|
||||
ago: "%{ago} zo"
|
||||
comment: Evezhiadenn
|
||||
has_commented_on: ↓%{display_name} en deus graet evezhiadennoù diwar-benn ar pennadoù deizlevr-mañ
|
||||
newer_comments: Evezhiadennoù nevesañ
|
||||
older_comments: Evezhiadennoù koshañ
|
||||
post: Postañ
|
||||
|
@ -461,6 +467,7 @@ br:
|
|||
prefix:
|
||||
aeroway:
|
||||
aerodrome: Nijva
|
||||
apron: ↓Parklec'h nijerezioù
|
||||
gate: Dor
|
||||
helipad: biñsporzh
|
||||
runway: Pistenn
|
||||
|
@ -507,6 +514,7 @@ br:
|
|||
ferry_terminal: Porzh karrlistri
|
||||
fire_hydrant: Dour evit an tan
|
||||
fire_station: Kazarn pomperien
|
||||
food_court: ↓Predva
|
||||
fountain: Feunteun
|
||||
fuel: Trelosk
|
||||
grave_yard: Bered
|
||||
|
@ -567,6 +575,7 @@ br:
|
|||
youth_centre: Kreizenn evit ar re yaouank
|
||||
boundary:
|
||||
administrative: Bevennoù melestradurel
|
||||
census: ↓Bevenn stadeg
|
||||
national_park: Park broadel
|
||||
protected_area: Takad gwarezet
|
||||
bridge:
|
||||
|
@ -588,6 +597,7 @@ br:
|
|||
footway: Gwenodenn evit an droadeien
|
||||
ford: Roudour
|
||||
living_street: Straed annez
|
||||
milestone: ↓Maen-bonn
|
||||
minor: Hent dister
|
||||
motorway: Gourhent
|
||||
motorway_junction: Kengej gourhent
|
||||
|
@ -664,6 +674,7 @@ br:
|
|||
railway: Hent-houarn
|
||||
recreation_ground: Leur c'hoari
|
||||
reservoir: Mirlenn
|
||||
reservoir_watershed: ↓Mirlec'h dour
|
||||
residential: Takad annez
|
||||
retail: Kenwerzhioù
|
||||
road: Takad hent
|
||||
|
@ -676,6 +687,7 @@ br:
|
|||
bird_hide: Bod evned
|
||||
common: Tachennoù foran
|
||||
fishing: Takad pesketa
|
||||
fitness_station: ↓Atalier da embreger ar c'horf
|
||||
garden: Liorzh
|
||||
golf_course: Tachenn golf
|
||||
ice_rink: Poull-ruzikat
|
||||
|
@ -950,6 +962,7 @@ br:
|
|||
history: Istor
|
||||
home: degemer
|
||||
home_tooltip: Mont da lec'h ar gêr
|
||||
inbox_html: ↓boest resev %{count}
|
||||
inbox_tooltip:
|
||||
one: 1 gemennadenn anlennet zo en ho poest resev
|
||||
other: E-barzh ho poest resev ez eus %{count} kemennadenn anlennet
|
||||
|
@ -957,11 +970,10 @@ br:
|
|||
intro_1: OpenStreetMap zo ur gartenn digoust eus ar bed a-bezh, a c'haller kemmañ. Graet eo gant tud eveldoc'h.
|
||||
intro_2_create_account: Krouiñ ur gont implijer
|
||||
intro_2_download: pellgargañ
|
||||
intro_2_html: Frank eo ar roadennoù evit bezañ %{download} ha %{use} dindan e %{license}. %{create_account} evit gwellaat ar gartenn.
|
||||
intro_2_license: Aotre digor
|
||||
intro_2_use: implijout
|
||||
intro_2_use_url: http://wiki.openstreetmap.org/wiki/Using_OpenStreetMap
|
||||
license:
|
||||
title: OpenStreetMap data zo dindan an aotre-implijout Creative Commons Attribution-Share Alike 2.0
|
||||
log_in: kevreañ
|
||||
log_in_tooltip: Kevreañ gant ur gont zo anezhi dija
|
||||
logo:
|
||||
|
@ -973,9 +985,11 @@ br:
|
|||
title: Skoazellañ OpenStreetMap gant ur road arc'hant
|
||||
osm_offline: Ezlinenn eo diaz roadennoù OpenStreetMap evit bremañ e-pad ma pleder gant ul labour kempenn bras.
|
||||
osm_read_only: Diaz roadennoù OpenStreetMap zo da lenn hepken evit bremañ evit bremañ abalamour da labourioù kempenn bras.
|
||||
partners_bytemark: ↓Herberc'hiañ Bytemark
|
||||
partners_html: "%{ucl}, %{ic}, %{bytemark}, ha %{partners} all a ra war-dro an herberc'hiañ."
|
||||
partners_ic: Skolaj impalaerel Londrez
|
||||
partners_partners: Kevelourien
|
||||
partners_ucl: ↓Kreizenn VR an UCL
|
||||
sign_up: En em enskrivañ
|
||||
sign_up_tooltip: Krouiñ ur gont evit aozañ
|
||||
tag_line: Kartenn digoust eus ar bed Wiki
|
||||
|
@ -994,15 +1008,14 @@ br:
|
|||
title: Diwar-benn an droidigezh-mañ
|
||||
legal_babble:
|
||||
contributors_at_html: "<strong>Aostria</strong> : Ennañ roadennoù eus\n<a href=\"http://data.wien.gv.at/\">Stadt Wien</a> (dindan\n<a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY</a>.</li> \t\n<a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY</a>), \n<a href=\"http://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm\">Land Vorarlberg</a> ha\nLand Tirol (dindan <a href=\"http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/\">CC-BY AT gant enkemmadoù</a>)."
|
||||
contributors_au_html: "<strong>Australia</strong>: Ennañ ar roadennoù diwar-benn an bannlevioù\n diazezet war roadennoù Australian Bureau of Statistics."
|
||||
contributors_ca_html: "<strong>Kanada</strong> : Ennañ roadennoù eus\n GeoBase®, GeoGratis (© Department of Natural\n Resources Canada), CanVec (© Department of Natural\n Resources Canada), ha StatCan (Geography Division,\n Statistics Canada)."
|
||||
contributors_footer_1_html: Ebarzhiñ roadennoù en OpenStreetMap ne dalvez ket eo aprouet OpenStreetMap gant ar bourchaserien orin na zegasont tamm gwarant, atebegezh pe asant ebet.
|
||||
contributors_footer_1_html: "↓Evit muioc'h a vunudoù diwar-benn ar re-se, hag ar mammennoù all a zo bet implijet da sikour da wellaat OpenStreetMap, sellit ouzh ar <a\nhref=\"http://wiki.openstreetmap.org/wiki/Contributors\">Bajenn Skoazellerien</a> e Wiki OpenStreetMap."
|
||||
contributors_footer_2_html: Enlakaat roadennoù e OpenStreetMap ne empleg ket ez aprou ar bourchaserien orin a endalc'had OpenStreetMap, na ne bourchasont, na ne waratomp pe na ne zegemeront ne vern pe atebegezh e vefe.
|
||||
contributors_fr_html: "<strong>Frañs</strong> : Ennañ roadennoù eus Renerezh Hollek an Tailhoù."
|
||||
contributors_gb_html: "<strong>Rouantelezh-Unanet</strong> : Ennañ roadennoù eus Ordnance\n Survey data © Crown copyright and database right 2010."
|
||||
contributors_intro_html: "Hervez hon aotre-implijout CC BY-SA e tleit “reiñ kred a-walc'h \n d'an aozer orin diouzh ar media a implijit”.\n Kartennourien hiniennel OSM ne c'houlennont ket\n kred panevet “kenlabourerien OpenStreetMap”,\n met pa vez ebarzhet roadennoù eus un ajañs kartennañ broadel\n pe ur vammenn veur all en OpenStreetMap,\n e c'hall bezañ fur reiñ kred dezho war-eeun\n en doare a c'houlennont pe dre ul liamm war-du ar bajenn-mañ."
|
||||
contributors_nl_html: "<strong>Netherlands</strong> : Contains © AND data, 2007\n (<a href=\"http://www.and.com\">www.and.com</a>)"
|
||||
contributors_nz_html: "<strong>Zeland-Nevez</strong> : Ennañ roadennoù eus\n Land Information New Zealand. Crown Copyright reserved."
|
||||
contributors_pl_html: "<strong>Polonia</strong> : Ennañ roadennoù eus <a\n href=\"http://ump.waw.pl/\">kartennoù UMP-pcPL</a>. Copyright\nUMP-pcPL kenlabourerien.\n<a href=\"http://wiki.openstreetmap.org/wiki/UMP2OSM_Importing\">\nMuioc'h diwar-benn OSM's use of UMP data</a>"
|
||||
contributors_title_html: Hor c'henlabourerien
|
||||
contributors_za_html: "<strong>Afrika ar Su</strong> : Ennañ roadennoù eus\n<a href=\"http://www.ngi.gov.za/\">Chief Directorate:\nNational Geo-Spatial Information</a>, State copyright reserved."
|
||||
credit_1_html: "Ma'z implijit skeudennoù OpenStreetMap, e c'houlennomp diganeoc'h\n lakaat en ho kred ar meneg “© kenlabourerien OpenStreetMap\n CC BY-SA”. Ma ne implijit nemet roadennoù ar c'hartennoù,\n e c'houlennomp diganeoc'h lakaat “Roadennoù ar gartenn © kenlabourerien OpenStreetMap,\n CC BY-SA”."
|
||||
|
@ -1012,7 +1025,6 @@ br:
|
|||
intro_2_html: " Dieub oc'h da eilañ, da skignañ, da gas ha da azasaat hor c'hartennoù\n hag hor roadennoù, gant ma root kred da OpenStreetMap ha d'e\n genlabourerien. Ma kemmit pe ma implijit hor c'hartennoù pe hor roadennoù e labourioù all,\n ne c'hallit ket skignañ ar re-se dindan un aotre-implijout all. En \n <a href=\"http://creativecommons.org/licenses/by-sa/2.0/legalcode\">destenn reolennoù\n klok</a> e kavot munudoù ho kwirioù hag ho teverioù."
|
||||
more_1_html: "Ma fell deoc'h kaout muioc'h a ditouroù diwar-benn adimplij hor roadennoù, lennit <a\n href=\"http://wiki.openstreetmap.org/wiki/Legal_FAQ\">FAG ar reolennoù</a>."
|
||||
more_2_html: " Degas a reomp da soñj da genlabourerien OSM ne zleont morse lakaat roadennoù a zeu\n eus mammennoù dindan wirioù (da sk. : Google Maps pe kartennoù moullet) hep aotre\n ezpleg ar re zo ar gwirioù-azer ganto."
|
||||
more_3_html: " Daoust da OpenStreetMap bezañ un hollad roadennoù digor, n'omp ket evit pourchas\n un API digoust evit an diorroerien diavaez.\n\n Sellit ouzh hor <a href=\"http://wiki.openstreetmap.org/wiki/API_usage_policy\">reolennoù evit implijout an API</a>,\n <a href=\"http://wiki.openstreetmap.org/wiki/Tile_usage_policy\">reolennoù evit implijout ar gartenn</a>\n ha <a href=\"http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy\">reolennoù evit implijout Nominatim</a>."
|
||||
more_title_html: Titouroù ouzhpenn
|
||||
title_html: Copyright hag aotre-implijout
|
||||
native:
|
||||
|
@ -1287,10 +1299,6 @@ br:
|
|||
index:
|
||||
js_1: Pe emaoc'h oc'h implijout ur merdeer ha ne skor ket JavaScript, pe hoc'h eus diweredekaet JavaScript.
|
||||
js_2: OpenStreetMap a implij JavaScript evit e gartenn risklus.
|
||||
license:
|
||||
license_name: Creative Commons Deroadenn Kenrannañ heñvel 2.0
|
||||
notice: Dindan aotre-implijout %{license_name} gant an %{project_name} hag e genobererien.
|
||||
project_name: raktres OpenStreetMap
|
||||
permalink: Peurliamm
|
||||
remote_failed: C'hwitet eo ar c'hemm - gwiriit hag-eñ eo karget JOSM or Merkaartor ha gweredekaet an dibarzh kontroll a-bell
|
||||
shortlink: Liamm berr
|
||||
|
@ -1416,6 +1424,7 @@ br:
|
|||
visibility: "Gwelusted :"
|
||||
visibility_help: Petra a dalvez an dra-mañ ?
|
||||
list:
|
||||
empty_html: N'eus netra da welet amañ. <a href='%{upload_link}'>Pellgargit ur roudenn nevez</a> evit gouzout hiroc'h diwar-benn an tresañ GPS, sellit ouzh ar <abajenn wiki>href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.2i</a>.
|
||||
public_traces: Roudoù GPS foran
|
||||
public_traces_from: Roudoù GPS foran gant %{user}
|
||||
tagged_with: " balizennet gant %{tags}"
|
||||
|
@ -1460,6 +1469,8 @@ br:
|
|||
trace_optionals:
|
||||
tags: Balizennoù
|
||||
trace_paging_nav:
|
||||
newer: ↓Roudoù nevez
|
||||
older: ↓Roudoù kozh
|
||||
showing_page: O tiskouez ar bajenn %{page}
|
||||
view:
|
||||
delete_track: Dilemel ar roudenn-mañ
|
||||
|
@ -1576,8 +1587,6 @@ br:
|
|||
lost password link: Ankouaet ho ker-tremen ganeoc'h ?
|
||||
new to osm: Nevez war OpenStreetMap ?
|
||||
no account: N'hoc'h eus kont ebet ?
|
||||
notice: <a href="http://www.osmfoundation.org/wiki/License/We_Are_Changing_The_License">Gouzout hiroc'h diwar-benn ar cheñchamant aotre-implijout da zont gant OpenStreetMap</a> (<a href="http://wiki.openstreetmap.org/wiki/ODbL/We_Are_Changing_The_License">troidigezhioù</a>) (<a href="http://wiki.openstreetmap.org/wiki/Talk:ODbL/Upcoming">kendiviz</a>)
|
||||
notice_terms: Embannet e vo OpenStreetMap dindan un aotre-implijout nevez adalek ar 1añ a viz Ebrel 2012. Ken frank a wirioù e vo hag an hini zo bremañ nemet e tegouezho gwelloc'h an termenoù gwir ouzh hon diaz roadennoù kartennaouel. Plijet e vefemp o virout ho tegasadennoù da OpenStreetMap, met n'hallimp en ober nemet mard embannit bezañ a-du d'hor lezel o skignañ diouzh termenoù an aotre nevez. A-hend-all e rankimp lemel anezho kuit eus an diaz.<br /><br />Kevreit evit gwelet an termenoù nevez hag asantiñ dezho. Ne dap nemet un un nebeud eilennoù. Ho trugarekaat !
|
||||
openid: "%{logo} OpenID :"
|
||||
openid invalid: Ho tigarez, Evit doare eo stummet fall hoc'h OpenID
|
||||
openid missing provider: Ho tigarez, n'eus ket bet gallet mont e darempred gant ho pourvezer OpenID
|
||||
|
@ -1622,7 +1631,9 @@ br:
|
|||
title: Ger-tremen kollet
|
||||
make_friend:
|
||||
already_a_friend: Mignon oc'h gant %{name} dija.
|
||||
button: Ozhpennañ evel mignon
|
||||
failed: Ho tigarez, n'eus ket bet gallet ouzhpennañ %{name} evel mignon.
|
||||
heading: ↓Ouzhpennañ %{user} evel mignon ?
|
||||
success: "%{name} zo ho mignon bremañ."
|
||||
new:
|
||||
confirm email address: "Kadarnaat ar chomlec'h postel :"
|
||||
|
@ -1655,6 +1666,8 @@ br:
|
|||
nearby mapper: Kartennour en ardremez
|
||||
your location: Ho lec'hiadur
|
||||
remove_friend:
|
||||
button: ↓Lemel eus ar vignoned
|
||||
heading: ↓Lemel %{user} eus ar vignoned ?
|
||||
not_a_friend: "%{name} n'eo ket unan eus ho mignoned."
|
||||
success: "%{name} zo bet lamet eus ho mignoned."
|
||||
reset_password:
|
||||
|
@ -1691,7 +1704,7 @@ br:
|
|||
activate_user: gweredekaat an implijer-mañ
|
||||
add as friend: Ouzhpennañ evel mignon
|
||||
ago: (%{time_in_words_ago} zo)
|
||||
block_history: gwelet ar stankadurioù resevet
|
||||
block_history: stankadurioù resevet
|
||||
blocks by me: stankadurioù graet ganin
|
||||
blocks on me: Stankadurioù evidon
|
||||
comments: evezhiadennoù
|
||||
|
@ -1717,7 +1730,7 @@ br:
|
|||
latest edit: "Kemm ziwezhañ %{ago} :"
|
||||
m away: war-hed %{count} m
|
||||
mapper since: "Kartennour abaoe :"
|
||||
moderator_history: gwelet ar stankadurioù roet
|
||||
moderator_history: stankadurioù roet
|
||||
my comments: ma evezhiadennoù
|
||||
my diary: ma deizlevr
|
||||
my edits: ma aozadennoù
|
||||
|
@ -1802,11 +1815,14 @@ br:
|
|||
creator_name: Krouer
|
||||
display_name: Implijer stanket
|
||||
edit: Aozañ
|
||||
next: ↓War-lerc'h »
|
||||
not_revoked: (n'eo ket torret)
|
||||
previous: ↓« Previous
|
||||
reason: Abeg evit stankañ
|
||||
revoke: Terriñ !
|
||||
revoker_name: Torret gant
|
||||
show: Diskouez
|
||||
showing_page: ↓O tiskouez ar bajenn %{page}
|
||||
status: Statud
|
||||
period:
|
||||
one: 1 eurvezh
|
||||
|
|