Merge 17944:17988 from trunk.
This commit is contained in:
commit
7de5220090
74 changed files with 2476 additions and 286 deletions
|
@ -36,26 +36,26 @@ function createMap(divName, options) {
|
|||
displayProjection: new OpenLayers.Projection("EPSG:4326")
|
||||
});
|
||||
|
||||
var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
|
||||
var mapnik = new OpenLayers.Layer.OSM.Mapnik(i18n("javascripts.map.base.mapnik"), {
|
||||
displayOutsideMaxExtent: true,
|
||||
wrapDateLine: true
|
||||
});
|
||||
map.addLayer(mapnik);
|
||||
|
||||
var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", {
|
||||
var osmarender = new OpenLayers.Layer.OSM.Osmarender(i18n("javascripts.map.base.osmarender"), {
|
||||
displayOutsideMaxExtent: true,
|
||||
wrapDateLine: true
|
||||
});
|
||||
map.addLayer(osmarender);
|
||||
|
||||
var cyclemap = new OpenLayers.Layer.OSM.CycleMap("Cycle Map", {
|
||||
var cyclemap = new OpenLayers.Layer.OSM.CycleMap(i18n("javascripts.map.base.cycle_map"), {
|
||||
displayOutsideMaxExtent: true,
|
||||
wrapDateLine: true
|
||||
});
|
||||
map.addLayer(cyclemap);
|
||||
|
||||
var nonamekey = nonamekeys[document.domain];
|
||||
var noname = new OpenLayers.Layer.OSM("NoName", [
|
||||
var noname = new OpenLayers.Layer.OSM(i18n("javascripts.map.base.noname"), [
|
||||
"http://a.tile.cloudmade.com/" + nonamekey + "/3/256/${z}/${x}/${y}.png",
|
||||
"http://b.tile.cloudmade.com/" + nonamekey + "/3/256/${z}/${x}/${y}.png",
|
||||
"http://c.tile.cloudmade.com/" + nonamekey + "/3/256/${z}/${x}/${y}.png"
|
||||
|
@ -66,7 +66,7 @@ function createMap(divName, options) {
|
|||
});
|
||||
map.addLayer(noname);
|
||||
|
||||
var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", {
|
||||
var maplint = new OpenLayers.Layer.OSM.Maplint(i18n("javascripts.map.overlays.maplint"), {
|
||||
displayOutsideMaxExtent: true,
|
||||
wrapDateLine: true
|
||||
});
|
||||
|
@ -152,9 +152,9 @@ function addObjectToMap(url, zoom, callback) {
|
|||
}
|
||||
|
||||
function addBoxToMap(boxbounds) {
|
||||
if(!vectors) {
|
||||
if (!vectors) {
|
||||
// Be aware that IE requires Vector layers be initialised on page load, and not under deferred script conditions
|
||||
vectors = new OpenLayers.Layer.Vector("Box Layer", {
|
||||
vectors = new OpenLayers.Layer.Vector("Boxes", {
|
||||
displayInLayerSwitcher: false
|
||||
});
|
||||
map.addLayer(vectors);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Called as the user scrolls/zooms around to aniplate hrefs of the
|
||||
* view tab and various other links
|
||||
|
@ -61,7 +62,7 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
|
|||
node.href = setArgs("/edit", args);
|
||||
node.style.fontStyle = 'normal';
|
||||
} else {
|
||||
node.href = 'javascript:alert("zoom in to edit map");';
|
||||
node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));';
|
||||
node.style.fontStyle = 'italic';
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +87,7 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
|
|||
node.href = setArgs("/history", args);
|
||||
node.style.fontStyle = 'normal';
|
||||
} else {
|
||||
node.href = 'javascript:alert("zoom in to see editing history");';
|
||||
node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));';
|
||||
node.style.fontStyle = 'italic';
|
||||
}
|
||||
}
|
||||
|
@ -201,6 +202,8 @@ function getStyle(el, property) {
|
|||
* 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");
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue