From ee8e892bb418a42afba898e96457bec92498ccc2 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Wed, 15 Feb 2012 17:55:37 +0100 Subject: [PATCH 001/148] Move some touch logic to the `handler` base class. --- lib/OpenLayers/Handler.js | 36 +++++++++++++++++++ lib/OpenLayers/Handler/Click.js | 27 +------------- lib/OpenLayers/Handler/Drag.js | 20 +---------- lib/OpenLayers/Handler/Feature.js | 20 +---------- lib/OpenLayers/Handler/Point.js | 20 +---------- tests/Handler/Click.html | 58 +++++++++++++++++++++++++++++++ tests/Handler/Drag.html | 7 +++- tests/Handler/Feature.html | 24 ++++++------- tests/Handler/Point.html | 29 ++++++++-------- 9 files changed, 130 insertions(+), 111 deletions(-) diff --git a/lib/OpenLayers/Handler.js b/lib/OpenLayers/Handler.js index 58c71b45a4..4a7aa20d36 100644 --- a/lib/OpenLayers/Handler.js +++ b/lib/OpenLayers/Handler.js @@ -85,6 +85,14 @@ OpenLayers.Handler = OpenLayers.Class({ * the OpenLayers code. */ evt: null, + + /** + * Property: touch + * {Boolean} Indcates the support of touch events. When touch events are + * starded touch will be true and all mouse related listeners will do + * nothing. + */ + touch: false, /** * Constructor: OpenLayers.Handler @@ -186,10 +194,38 @@ OpenLayers.Handler = OpenLayers.Class({ this.unregister(events[i], this[events[i]]); } } + this.touch = false; this.active = false; return true; }, + /** + * Method: startTouch + * Start touch events, this method must be called by subclasses in + * "touchstart" method. When touch events are starded will be + * true and all mouse related listeners will do nothing. + * + * Returns: + * {Boolean} The touch events are started. + */ + startTouch: function() { + if (this.touch) { + return false; + } else { + this.touch = true; + var events = [ + "mousedown", "mouseup", "mousemove", "click", "dblclick", + "mouseout" + ]; + for (var i=0, len=events.length; i. */ timerId: null, - - /** - * Property: touch - * {Boolean} When a touchstart event is fired, touch will be true and all - * mouse related listeners will do nothing. - */ - touch: false, /** * Property: down @@ -155,10 +148,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Continue propagating this event. */ touchstart: function(evt) { - if (!this.touch) { - this.unregisterMouseListeners(); - this.touch = true; - } + this.startTouch(); this.down = this.getEventInfo(evt); this.last = this.getEventInfo(evt); return true; @@ -195,20 +185,6 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, { } return true; }, - - /** - * Method: unregisterMouseListeners - * In a touch environment, we don't want to handle mouse events. - */ - unregisterMouseListeners: function() { - this.map.events.un({ - mousedown: this.mousedown, - mouseup: this.mouseup, - click: this.click, - dblclick: this.dblclick, - scope: this - }); - }, /** * Method: mousedown @@ -516,7 +492,6 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, { this.down = null; this.first = null; this.last = null; - this.touch = false; deactivated = true; } return deactivated; diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index a2adf66ed0..573cb12cfb 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -50,13 +50,6 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { */ dragging: false, - /** - * Property: touch - * {Boolean} When a touchstart event is fired, touch will be true and all - * mouse related listeners will do nothing. - */ - touch: false, - /** * Property: last * {} The last pixel location of the drag. @@ -344,17 +337,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Let the event propagate. */ touchstart: function(evt) { - if (!this.touch) { - this.touch = true; - // unregister mouse listeners - this.map.events.un({ - mousedown: this.mousedown, - mouseup: this.mouseup, - mousemove: this.mousemove, - click: this.click, - scope: this - }); - } + this.startTouch(); return this.dragstart(evt); }, @@ -508,7 +491,6 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { deactivate: function() { var deactivated = false; if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - this.touch = false; this.started = false; this.dragging = false; this.start = null; diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 402b8d66a8..411a7c246e 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -59,13 +59,6 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { * {} The location of the last mouseup. */ up: null, - - /** - * Property: touch - * {Boolean} When a touchstart event is fired, touch will be true and all - * mouse related listeners will do nothing. - */ - touch: false, /** * Property: clickTolerance @@ -139,17 +132,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Let the event propagate. */ touchstart: function(evt) { - if(!this.touch) { - this.touch = true; - this.map.events.un({ - mousedown: this.mousedown, - mouseup: this.mouseup, - mousemove: this.mousemove, - click: this.click, - dblclick: this.dblclick, - scope: this - }); - } + this.startTouch(); return OpenLayers.Event.isMultiTouch(evt) ? true : this.mousedown(evt); }, @@ -395,7 +378,6 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { this.lastFeature = null; this.down = null; this.up = null; - this.touch = false; this.map.events.un({ "removelayer": this.handleMapEvents, "changelayer": this.handleMapEvents, diff --git a/lib/OpenLayers/Handler/Point.js b/lib/OpenLayers/Handler/Point.js index 0b9ddb9dd4..70e36e6d6e 100644 --- a/lib/OpenLayers/Handler/Point.js +++ b/lib/OpenLayers/Handler/Point.js @@ -113,12 +113,6 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, { */ pixelTolerance: 5, - /** - * Property: touch - * {Boolean} Indcates the support of touch events. - */ - touch: false, - /** * Property: lastTouchPx * {} The last pixel used to know the distance between @@ -216,7 +210,6 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, { this.layer.destroy(false); } this.layer = null; - this.touch = false; return true; }, @@ -383,18 +376,7 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Allow event propagation */ touchstart: function(evt) { - if (!this.touch) { - this.touch = true; - // unregister mouse listeners - this.map.events.un({ - mousedown: this.mousedown, - mouseup: this.mouseup, - mousemove: this.mousemove, - click: this.click, - dblclick: this.dblclick, - scope: this - }); - } + this.startTouch(); this.lastTouchPx = evt.xy; return this.down(evt); }, diff --git a/tests/Handler/Click.html b/tests/Handler/Click.html index 41172cd896..be508cac75 100644 --- a/tests/Handler/Click.html +++ b/tests/Handler/Click.html @@ -669,6 +669,64 @@ map.destroy(); } + function test_touchstart(t) { + // a test to verify that the touchstart function does + // unregister the mouse listeners when it's called the + // first time + + t.plan(7); + + // set up + + var map = new OpenLayers.Map("map", { + controls: [] + }); + var control = new OpenLayers.Control({}); + var handler = new OpenLayers.Handler.Click(control, {}); + control.handler = handler; + map.addControl(control); + handler.activate(); + + function allRegistered() { + var eventTypes = ['mousedown', 'mouseup', 'click', 'dblclick'], + eventType, + listeners, + listener, + flag; + for(var i=0, ilen=eventTypes.length; i diff --git a/tests/Handler/Drag.html b/tests/Handler/Drag.html index 4be1df9e6d..4122493b3e 100644 --- a/tests/Handler/Drag.html +++ b/tests/Handler/Drag.html @@ -294,7 +294,7 @@ // "touchend" events set expected states in the drag handler. // We also verify that we stop event bubbling as appropriate. - t.plan(14); + t.plan(19); // set up @@ -324,6 +324,11 @@ t.eq(h.start.y, 0, '[touchstart] start.y is correct'); t.eq(log.length, 1, '[touchstart] one item in log'); t.ok(log[0] === e, "touchstart", '[touchstart] event is stopped'); + t.eq(m.events.listeners.mousedown.length, 0,"mousedown is not registered"); + t.eq(m.events.listeners.mouseup.length, 0,"mouseup is not registered"); + t.eq(m.events.listeners.mousemove.length, 0,"mousemove is not registered"); + t.eq(m.events.listeners.click.length, 0,"click is not registered"); + t.eq(m.events.listeners.mouseout.length, 0,"mouseout is not registered"); e = {xy: new Px(1, 1)}; m.events.triggerEvent('touchmove', e); diff --git a/tests/Handler/Feature.html b/tests/Handler/Feature.html index 7c768e1a69..21cbf7ad4f 100644 --- a/tests/Handler/Feature.html +++ b/tests/Handler/Feature.html @@ -280,9 +280,10 @@ handler.mousedown = function() {}; // mock mousedown handler.activate(); + var eventTypes = ['mousedown', 'mouseup', 'mousemove', 'click', 'dblclick']; + function allRegistered() { - var eventTypes = ['mousedown', 'mouseup', 'mousemove', 'click', 'dblclick'], - eventType, + var eventType, listeners, listener, flag; @@ -305,21 +306,18 @@ } function noneRegistered() { - var eventTypes = ['mousedown', 'mouseup', 'mousemove', 'click', 'dblclick'], - eventType, - listeners, - listener; + var eventType, + times, + flag = false; for(var i=0, ilen=eventTypes.length; i Date: Wed, 8 Aug 2012 22:34:26 -0500 Subject: [PATCH 002/148] Move zeroPad function to BaseTypes and add tests for it --- lib/OpenLayers/BaseTypes.js | 20 +++++++++++++++++++- tests/BaseTypes.html | 11 +++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index b0c96956a7..87617da3c5 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -295,7 +295,25 @@ OpenLayers.Number = { str = integer + dsep + rem; } return str; - } + }, + + /** + * Method: zeroPad + * Create a zero padded string optionally with a radix for casting numbers. + * + * Parameters: + * num - {Number} The number to be zero padded. + * len - {Number} The length of the string to be returned. + * radix - {Number} An integer between 2 and 36 specifying the base to use + * for representing numeric values. + */ + zeroPad: function(num, len, radix) { + var str = num.toString(radix || 10); + while (str.length < len) { + str = "0" + str; + } + return str; + } }; /** diff --git a/tests/BaseTypes.html b/tests/BaseTypes.html index cc391003da..045ac65491 100644 --- a/tests/BaseTypes.html +++ b/tests/BaseTypes.html @@ -278,6 +278,17 @@ OpenLayers.Number.decimalSeparator = ","; t.eq(format(num, 3), "12.345,679", "changing thousands/decimal separator globally works"); } + + function test_Number_zeroPad(t) { + t.plan(6); + var pad = OpenLayers.Number.zeroPad; + t.eq(pad(15, 4), "0015", "left padding works"); + t.eq(pad(15, 2), "15", "no left padding when equal to number of digits"); + t.eq(pad(15, 1), "15", "no left padding when less than number of digits"); + t.eq(pad(10, 5, 2), "01010", "radix modified and padding works"); + t.eq(pad(10, 5, 8), "00012", "radix modified and padding works"); + t.eq(pad(10, 5, 36), "0000a", "radix modified and padding works"); + } function test_Function_bind(t) { t.plan(12); From a83ab56f97f0e73fbea7b4cf08937b90f6443af8 Mon Sep 17 00:00:00 2001 From: Matt Priour Date: Wed, 8 Aug 2012 22:36:39 -0500 Subject: [PATCH 003/148] Modify classes which contained an internal numeric zero padding function to use the one in BaseTypes instead --- lib/OpenLayers/BaseTypes/Date.js | 19 ++++++------------ lib/OpenLayers/Layer/ArcGISCache.js | 24 +++------------------- lib/OpenLayers/Layer/TileCache.js | 31 ++++++++--------------------- 3 files changed, 17 insertions(+), 57 deletions(-) diff --git a/lib/OpenLayers/BaseTypes/Date.js b/lib/OpenLayers/BaseTypes/Date.js index 937b12d108..e7da56eb6f 100644 --- a/lib/OpenLayers/BaseTypes/Date.js +++ b/lib/OpenLayers/BaseTypes/Date.js @@ -49,13 +49,6 @@ OpenLayers.Date = { return date.toISOString(); }; } else { - function pad(num, len) { - var str = num + ""; - while (str.length < len) { - str = "0" + str; - } - return str; - } return function(date) { var str; if (isNaN(date.getTime())) { @@ -65,12 +58,12 @@ OpenLayers.Date = { } else { str = date.getUTCFullYear() + "-" + - pad(date.getUTCMonth() + 1, 2) + "-" + - pad(date.getUTCDate(), 2) + "T" + - pad(date.getUTCHours(), 2) + ":" + - pad(date.getUTCMinutes(), 2) + ":" + - pad(date.getUTCSeconds(), 2) + "." + - pad(date.getUTCMilliseconds(), 3) + "Z"; + OpenLayers.Number.zeroPad(date.getUTCMonth() + 1, 2) + "-" + + OpenLayers.Number.zeroPad(date.getUTCDate(), 2) + "T" + + OpenLayers.Number.zeroPad(date.getUTCHours(), 2) + ":" + + OpenLayers.Number.zeroPad(date.getUTCMinutes(), 2) + ":" + + OpenLayers.Number.zeroPad(date.getUTCSeconds(), 2) + "." + + OpenLayers.Number.zeroPad(date.getUTCMilliseconds(), 3) + "Z"; } return str; }; diff --git a/lib/OpenLayers/Layer/ArcGISCache.js b/lib/OpenLayers/Layer/ArcGISCache.js index 27173392c4..8c27c41431 100644 --- a/lib/OpenLayers/Layer/ArcGISCache.js +++ b/lib/OpenLayers/Layer/ArcGISCache.js @@ -443,9 +443,9 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, { url = url + '/tile/${z}/${y}/${x}'; } else { // The tile images are stored using hex values on disk. - x = 'C' + this.zeroPad(x, 8, 16); - y = 'R' + this.zeroPad(y, 8, 16); - z = 'L' + this.zeroPad(z, 2, 16); + x = 'C' + OpenLayers.Number.zeroPad(x, 8, 16); + y = 'R' + OpenLayers.Number.zeroPad(y, 8, 16); + z = 'L' + OpenLayers.Number.zeroPad(z, 2, 16); url = url + '/${z}/${y}/${x}.' + this.type; } @@ -457,23 +457,5 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, { ); }, - /** - * Method: zeroPad - * Create a zero padded string optionally with a radix for casting numbers. - * - * Parameters: - * num - {Number} The number to be zero padded. - * len - {Number} The length of the string to be returned. - * radix - {Number} An integer between 2 and 36 specifying the base to use - * for representing numeric values. - */ - zeroPad: function(num, len, radix) { - var str = num.toString(radix || 10); - while (str.length < len) { - str = "0" + str; - } - return str; - }, - CLASS_NAME: 'OpenLayers.Layer.ArcGISCache' }); diff --git a/lib/OpenLayers/Layer/TileCache.js b/lib/OpenLayers/Layer/TileCache.js index e4e92e9766..3008979c1f 100644 --- a/lib/OpenLayers/Layer/TileCache.js +++ b/lib/OpenLayers/Layer/TileCache.js @@ -116,31 +116,16 @@ OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, { var tileZ = this.serverResolutions != null ? OpenLayers.Util.indexOf(this.serverResolutions, res) : this.map.getZoom(); - /** - * Zero-pad a positive integer. - * number - {Int} - * length - {Int} - * - * Returns: - * {String} A zero-padded string - */ - function zeroPad(number, length) { - number = String(number); - var zeros = []; - for(var i=0; i Date: Sat, 11 Aug 2012 17:28:59 +0200 Subject: [PATCH 004/148] Avoid breaking the "OpenLayers.String.format" execution when searching for an attribute in an undefined object. --- lib/OpenLayers/BaseTypes.js | 4 +++- tests/BaseTypes.html | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index b0c96956a7..a4b4f3f3fe 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -127,7 +127,9 @@ OpenLayers.String = { if (i == 0) { replacement = context; } - + if (replacement === undefined) { + break; + } replacement = replacement[subs[i]]; } diff --git a/tests/BaseTypes.html b/tests/BaseTypes.html index cc391003da..340b0bbaa5 100644 --- a/tests/BaseTypes.html +++ b/tests/BaseTypes.html @@ -155,8 +155,8 @@ } }; t.eq( - format("${a.b.c} ${a.b.e} ${a.b.q} ${a} ${a...b...c}", context), - "d f undefined [object Object] d", + format("${a.b.c} ${a.b.e} ${a.b.q} ${a} ${a...b...c} ${aa.b} ${a.bb.c}", context), + "d f undefined [object Object] d undefined undefined", "attribute values that are objects are supported" ); From 6efcab3d2d4da91f7e9f95974f62cdf521a07a0d Mon Sep 17 00:00:00 2001 From: Pierre GIRAUD Date: Wed, 24 Oct 2012 13:31:06 +0200 Subject: [PATCH 005/148] don't try to update the matrix in setMap since it's too early and done later in moveTo --- lib/OpenLayers/Layer/WMTS.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/OpenLayers/Layer/WMTS.js b/lib/OpenLayers/Layer/WMTS.js index cfe128e4d9..959dfccded 100644 --- a/lib/OpenLayers/Layer/WMTS.js +++ b/lib/OpenLayers/Layer/WMTS.js @@ -264,7 +264,6 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { */ setMap: function() { OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments); - this.updateMatrixProperties(); }, /** From 1081fc4b54cbd9a34f060e2dfe3a3fdb51862c57 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 23 Dec 2012 18:01:17 +0100 Subject: [PATCH 006/148] Better mousewheel/touchpad behavior for zooming The navigation control gets better defaults, and the MouseWheel handler gets a new maxDelta option, which can be used to avoid huge zoom level jumps on heavy wheel/pad movements. --- lib/OpenLayers/Control/Navigation.js | 15 +++++++++++---- lib/OpenLayers/Handler/MouseWheel.js | 20 +++++++++++++++----- tests/Handler/MouseWheel.html | 13 ++++++++----- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index 17d2bf0aaa..11c6d2f99b 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -77,7 +77,9 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { /** * Property: mouseWheelOptions * {Object} Options passed to the MouseWheel control (only useful if - * is set to true) + * is set to true). Default is no options for maps + * with fractionalZoom set to true, otherwise + * {cumulative: false, interval: 50, maxDelta: 6} */ mouseWheelOptions: null, @@ -208,10 +210,15 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { {map: this.map, keyMask: this.zoomBoxKeyMask}); this.dragPan.draw(); this.zoomBox.draw(); + var wheelOptions = this.map.fractionalZoom ? {} : { + cumulative: false, + interval: 50, + maxDelta: 6 + }; this.handlers.wheel = new OpenLayers.Handler.MouseWheel( - this, {"up" : this.wheelUp, - "down": this.wheelDown}, - this.mouseWheelOptions ); + this, {up : this.wheelUp, down: this.wheelDown}, + OpenLayers.Util.extend(wheelOptions, this.mouseWheelOptions) + ); if (OpenLayers.Control.PinchZoom) { this.pinchZoom = new OpenLayers.Control.PinchZoom( OpenLayers.Util.extend( diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index 135edb39a5..fa8c08d27b 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -31,6 +31,14 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { */ interval: 0, + /** + * Property: maxDelta + * {Integer} Maximum delta to collect before breaking from the current + * interval. In cumulative mode, this also limits the maximum delta + * returned from the handler. Default is Number.POSITIVE_INFINITY. + */ + maxDelta: Number.POSITIVE_INFINITY, + /** * Property: delta * {Integer} When interval is set, delta collects the mousewheel z-deltas @@ -176,10 +184,10 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { // so force delta 1 / -1 delta = - (e.detail / Math.abs(e.detail)); } - this.delta = this.delta + delta; + this.delta += delta; - if(this.interval) { - window.clearTimeout(this._timeoutId); + window.clearTimeout(this._timeoutId); + if(this.interval && Math.abs(this.delta) < this.maxDelta) { // store e because window.event might change during delay var evt = OpenLayers.Util.extend({}, e); this._timeoutId = window.setTimeout( @@ -211,9 +219,11 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { if (delta) { e.xy = this.map.events.getMousePosition(e); if (delta < 0) { - this.callback("down", [e, this.cumulative ? delta : -1]); + this.callback("down", + [e, this.cumulative ? Math.max(-this.maxDelta, delta) : -1]); } else { - this.callback("up", [e, this.cumulative ? delta : 1]); + this.callback("up", + [e, this.cumulative ? Math.min(this.maxDelta, delta) : 1]); } } }, diff --git a/tests/Handler/MouseWheel.html b/tests/Handler/MouseWheel.html index 208b4fce3d..687a31d275 100644 --- a/tests/Handler/MouseWheel.html +++ b/tests/Handler/MouseWheel.html @@ -115,12 +115,13 @@ } function test_Handler_MouseWheel_cumulative(t) { - t.plan(1); + t.plan(2); - var deltaUp = 0; + var deltaUp = 0, ticks = 0; var callbacks = { up: function(evt, delta) { deltaUp += delta; + ticks++; } }; @@ -131,7 +132,8 @@ map.addControl(control); var handler = new OpenLayers.Handler.MouseWheel(control, callbacks, { interval: 150, - cumulative: false + cumulative: false, + maxDelta: 6 }); var delta = 120; @@ -140,8 +142,9 @@ handler.onWheelEvent({'target':map.layers[0].div, wheelDelta: delta}); } - t.delay_call(1, function() { - t.eq(deltaUp, 1, "Non cumulative mode works"); + t.delay_call(2, function() { + t.eq(deltaUp / ticks, 1, "Cumulative mode works"); + t.eq(ticks, 4, "up called 4x with maxDelta of 6"); }); } From 44f28f8791d05ec719a3c8cfc45a4d4b7c403fe6 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 11 Dec 2012 20:04:17 +0100 Subject: [PATCH 007/148] Use translate3d and translate where available. --- lib/OpenLayers/Control/PinchZoom.js | 8 ++--- lib/OpenLayers/Map.js | 54 +++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/lib/OpenLayers/Control/PinchZoom.js b/lib/OpenLayers/Control/PinchZoom.js index f55d08e9fc..009d870ff9 100644 --- a/lib/OpenLayers/Control/PinchZoom.js +++ b/lib/OpenLayers/Control/PinchZoom.js @@ -105,12 +105,10 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, { var current = (this.preserveCenter) ? this.map.getPixelFromLonLat(this.map.getCenter()) : evt.xy; - var dx = Math.round((current.x - pinchOrigin.x) + (scale - 1) * (containerOrigin.x - pinchOrigin.x)); - var dy = Math.round((current.y - pinchOrigin.y) + (scale - 1) * (containerOrigin.y - pinchOrigin.y)); + var dx = Math.round((containerOrigin.x + current.x - pinchOrigin.x) + (scale - 1) * (containerOrigin.x - pinchOrigin.x)); + var dy = Math.round((containerOrigin.y + current.y - pinchOrigin.y) + (scale - 1) * (containerOrigin.y - pinchOrigin.y)); - this.applyTransform( - "translate(" + dx + "px, " + dy + "px) scale(" + scale + ")" - ); + this.map.applyTransform(dx, dy, scale); this.currentCenter = current; }, diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index ba7e7006fe..2a6b958a7a 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -1758,17 +1758,16 @@ OpenLayers.Map = OpenLayers.Class({ } this.center = null; if (dx) { - this.layerContainerDiv.style.left = - (this.layerContainerOriginPx.x -= dx) + "px"; + this.layerContainerOriginPx.x -= dx; this.minPx.x -= dx; this.maxPx.x -= dx; } if (dy) { - this.layerContainerDiv.style.top = - (this.layerContainerOriginPx.y -= dy) + "px"; + this.layerContainerOriginPx.y -= dy; this.minPx.y -= dy; this.maxPx.y -= dy; } + this.applyTransform(); var layer, i, len; for (i=0, len=this.layers.length; i Date: Tue, 11 Dec 2012 23:23:08 +0100 Subject: [PATCH 008/148] Turn on GPU support for all children of the layerContainerDiv This seems to remove all kinds of flicker and jumpiness, and to me it feels also like it makes panning on slow mobile devices smoother. --- examples/mobile-wmts-vienna.css | 2 -- theme/default/style.css | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index a8ccc14a97..ac3d1cb5e6 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -17,8 +17,6 @@ html, body, #map { -moz-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear; transition: opacity 0.2s linear; - /* workaround for strange border tile squeezing on Android 4.x */ - -webkit-transform: scale(1.001); } div.olControlAttribution { position: absolute; diff --git a/theme/default/style.css b/theme/default/style.css index ed8cef75ce..dddea0e163 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -487,6 +487,13 @@ a.olControlZoomOut { transition: opacity 0.2s linear; } +.olTileImage, .olLayerDiv { + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + /* override any max-width image settings (e.g. bootstrap.css) */ img.olTileImage { max-width: none; From eb65336fa94602221b47995aa6c229227c990a28 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 11 Dec 2012 23:39:54 +0100 Subject: [PATCH 009/148] Adding docs, removing console.log --- lib/OpenLayers/Map.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 2a6b958a7a..7b449376c9 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -2648,7 +2648,16 @@ OpenLayers.Map = OpenLayers.Class({ /** * Method: applyTransform - * Applies the given transform to layers. + * Applies the given transform to the . This method has + * a 2-stage fallback from translate3d/scale3d via translate/scale to plain + * style.left/style.top, in which case no scaling is supported. + * + * Parameters: + * x - {Number} x parameter for the translation. Defaults to the x value of + * the map's + * y - {Number} y parameter for the translation. Defaults to the y value of + * the map's + * scale - {Number} scale. Defaults to 1 if not provided. */ applyTransform: (function() { var transformProperty, @@ -2678,7 +2687,6 @@ OpenLayers.Map = OpenLayers.Class({ style.left = dx + 'px'; style.top = dy + 'px'; } - console.log(style[transformProperty]); }; }()), From a02163f01db20d44cfb886c442e8d4f42f4e415f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 12 Dec 2012 16:48:23 +0100 Subject: [PATCH 010/148] No backbuffer removal delay needed with 3d enabled --- lib/OpenLayers/Layer/Grid.js | 48 +----------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 8791236cb6..3c77ac1b6d 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -189,24 +189,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { */ backBufferLonLat: null, - /** - * Property: backBufferTimerId - * {Number} The id of the back buffer timer. This timer is used to - * delay the removal of the back buffer, thereby preventing - * flash effects caused by tile animation. - */ - backBufferTimerId: null, - - /** - * APIProperty: removeBackBufferDelay - * {Number} Delay for removing the backbuffer when all tiles have finished - * loading. Can be set to 0 when no css opacity transitions for the - * olTileImage class are used. Default is 0 for layers, - * 2500 for tiled layers. See for more information on - * tile animation. - */ - removeBackBufferDelay: null, - /** * APIProperty: className * {String} Name of the class added to the layer div. If not set in the @@ -236,8 +218,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * transition: opacity 0.2s linear; * } * (end) - * In that case, to avoid flash effects, - * should not be zero. */ className: null, @@ -311,10 +291,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.tileQueue = []; this._removeBackBuffer = OpenLayers.Function.bind(this.removeBackBuffer, this); - if (this.removeBackBufferDelay === null) { - this.removeBackBufferDelay = this.singleTile ? 0 : 2500; - } - if (this.className === null) { this.className = this.singleTile ? 'olLayerGridSingleTile' : 'olLayerGrid'; @@ -354,10 +330,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.moveTimerId = null; } this.clearTileQueue(); - if(this.backBufferTimerId !== null) { - window.clearTimeout(this.backBufferTimerId); - this.backBufferTimerId = null; - } }, /** @@ -426,7 +398,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { obj.gridResolution = null; // same for backbuffer and tile queue obj.backBuffer = null; - obj.backBufferTimerId = null; obj.tileQueue = []; obj.tileQueueId = null; obj.loading = false; @@ -686,9 +657,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * resolution - {Number} The resolution to transition to. */ applyBackBuffer: function(resolution) { - if(this.backBufferTimerId !== null) { - this.removeBackBuffer(); - } var backBuffer = this.backBuffer; if(!backBuffer) { backBuffer = this.createBackBuffer(); @@ -778,10 +746,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.div.removeChild(this.backBuffer); this.backBuffer = null; this.backBufferResolution = null; - if(this.backBufferTimerId !== null) { - window.clearTimeout(this.backBufferTimerId); - this.backBufferTimerId = null; - } } }, @@ -1137,17 +1101,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.loading = false; this.events.triggerEvent("loadend"); if(this.backBuffer) { - this._transitionElement = tile.imgDiv; - for (var i=this.transitionendEvents.length-1; i>=0; --i) { - OpenLayers.Event.observe(this._transitionElement, - this.transitionendEvents[i], - this._removeBackBuffer); - } - // the removal of the back buffer is delayed to prevent - // flash effects due to the animation of tile displaying - this.backBufferTimerId = window.setTimeout( - this._removeBackBuffer, this.removeBackBufferDelay - ); + this.removeBackBuffer(); } } }; From 1764bbdd18e551402b5e9c493a7e7058fc4b75c5 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 13 Dec 2012 10:05:38 +0100 Subject: [PATCH 011/148] Giving the last tile time to render The loadend event of an image is fired before the image is rendered. For standard 256x256 tiles, this does not matter. But for singleTile layers on large screens, rendering time needs to be considered. So we add a delay that depends on the tile size. TODO: make the denominator configurable. --- lib/OpenLayers/Layer/Grid.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 3c77ac1b6d..ba2057bdf5 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1098,11 +1098,17 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); //if that was the last tile, then trigger a 'loadend' on the layer if (this.tileQueue.length === 0 && this.numLoadingTiles === 0) { - this.loading = false; - this.events.triggerEvent("loadend"); - if(this.backBuffer) { - this.removeBackBuffer(); - } + // give the last tile time to render before firing loadend and + // removing the backbuffer. + var delay = this.tileSize.w * this.tileSize.h / 32768; + var that = this; + window.setTimeout(function() { + that.loading = false; + that.events.triggerEvent("loadend"); + if(that.backBuffer) { + that.removeBackBuffer(); + } + }, delay); } }; From f51211e93f7b35c8197a19e8c721683fa4736908 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 14 Dec 2012 17:27:08 +0100 Subject: [PATCH 012/148] No magic for loadend delay This change reintroduces the removeBackBufferDelay, and documents exactly what it does and when it may be useful. --- lib/OpenLayers/Layer/Grid.js | 38 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index ba2057bdf5..62bcd5c25e 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -189,6 +189,17 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { */ backBufferLonLat: null, + /** + * APIProperty: removeBackBufferDelay + * {Number} Delay in ms for removing the backbuffer when all tiles have + * finished loading. Usually a value of 0 works fine. For slow mobile + * devices, when using layers with big image sizes, a delay + * of 40-50ms may help to avoid flickers after panning. Default is 0. + * If set, the layer's loadend event will also be delayed when a + * backbuffer needs to be removed. + */ + removeBackBufferDelay: 0, + /** * APIProperty: className * {String} Name of the class added to the layer div. If not set in the @@ -1098,17 +1109,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); //if that was the last tile, then trigger a 'loadend' on the layer if (this.tileQueue.length === 0 && this.numLoadingTiles === 0) { - // give the last tile time to render before firing loadend and - // removing the backbuffer. - var delay = this.tileSize.w * this.tileSize.h / 32768; - var that = this; - window.setTimeout(function() { - that.loading = false; - that.events.triggerEvent("loadend"); - if(that.backBuffer) { + if (this.backBuffer) { + var that = this; + window.setTimeout(function() { + that.onLoadEnd(); that.removeBackBuffer(); - } - }, delay); + }, this.removeBackBufferDelay); + } else { + this.onLoadEnd(); + } } }; @@ -1125,6 +1134,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); }, + /** + * Method: onLoadEnd + * Sets the loading flag to false and triggers the loadend event. + */ + onLoadEnd: function() { + this.loading = false; + this.events.triggerEvent("loadend"); + }, + /** * Method: removeTileMonitoringHooks * This function takes a tile as input and removes the tile hooks From 3ab9a1f63bb2d70e3a55a9a1f3f359624aeaffc6 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 14 Dec 2012 17:27:44 +0100 Subject: [PATCH 013/148] No closure, to make testing easier --- lib/OpenLayers/Map.js | 62 ++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 7b449376c9..c8963747ef 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -6,6 +6,7 @@ /** * @requires OpenLayers/BaseTypes/Class.js * @requires OpenLayers/Util.js + * @requires OpenLayers/Util/vendorPrefix.js * @requires OpenLayers/Events.js * @requires OpenLayers/Tween.js * @requires OpenLayers/Projection.js @@ -2659,36 +2660,41 @@ OpenLayers.Map = OpenLayers.Class({ * the map's * scale - {Number} scale. Defaults to 1 if not provided. */ - applyTransform: (function() { - var transformProperty, - translatePrefix = 'translate3d(', - translatePostfix = ',0)', - scalePrefix = 'scale3d(', - scalePostfix = ',1)'; - return function(dx, dy, scale) { - var origin = this.layerContainerOriginPx; - dx = dx || origin.x; - dy = dy || origin.y; - scale = scale || 1; - var style = this.layerContainerDiv.style; - if (transformProperty === undefined) { - transformProperty = OpenLayers.Util.vendorPrefix.style("transform"); - style[transformProperty] = translatePrefix + '0,0' + translatePostfix; - if (!~style[transformProperty].indexOf(translatePrefix)) { - translatePrefix = 'translate('; - translatePostfix = ')'; - scalePrefix = 'scale('; - scalePostfix = ')'; + applyTransform: function(dx, dy, scale) { + var origin = this.layerContainerOriginPx; + dx = dx || origin.x; + dy = dy || origin.y; + scale = scale || 1; + + var style = this.layerContainerDiv.style, + transform = this.applyTransform.transform, + template = this.applyTransform.template; + + if (transform === undefined) { + transform = OpenLayers.Util.vendorPrefix.style('transform'); + this.applyTransform.transform = transform; + } + + if (transform) { + if (!template) { + // try translate3d + template = ['translate3d(', ',0) ', 'scale3d(', ',1)']; + style[transform] = [template[0], '0,0', template[1]].join(''); + // if translate3d does not stick, use translate and scale + if (!~style[transform].indexOf(template[0])) { + template = ['translate(', ') ', 'scale(', ')']; } + this.applyTransform.template = template; } - if (transformProperty) { - style[transformProperty] = translatePrefix + dx + 'px,' + dy + 'px' + translatePostfix + scalePrefix + scale + ',' + scale + scalePostfix; - } else { - style.left = dx + 'px'; - style.top = dy + 'px'; - } - }; - }()), + style[transform] = [ + template[0], dx, 'px,', dy, 'px', template[1], + template[2], scale, ',', scale, template[3] + ].join(''); + } else { + style.left = dx + 'px'; + style.top = dy + 'px'; + } + }, CLASS_NAME: "OpenLayers.Map" }); From 3d79001a92c19021ff766dd24bf83f33ed19e34d Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 14 Dec 2012 17:28:05 +0100 Subject: [PATCH 014/148] Updating and adding tests --- tests/Control/PinchZoom.html | 16 ++++---- tests/Layer/Grid.html | 76 ++---------------------------------- tests/Map.html | 74 +++++++++++++++++++++++++++-------- 3 files changed, 69 insertions(+), 97 deletions(-) diff --git a/tests/Control/PinchZoom.html b/tests/Control/PinchZoom.html index 1aa68f9c04..3fc5ba6851 100644 --- a/tests/Control/PinchZoom.html +++ b/tests/Control/PinchZoom.html @@ -45,8 +45,8 @@ }); var log = []; - control.applyTransform = function(transform) { - log.push(transform); + map.applyTransform = function(x, y, scale) { + log.push([x, y, scale]); } map.layerContainerOriginPx = { @@ -58,12 +58,12 @@ }; var cases = [ - {x: 100, y: 60, scale: 1, transform: "translate(0px, 10px) scale(1)"}, - {x: 150, y: 60, scale: 1, transform: "translate(50px, 10px) scale(1)"}, - {x: 150, y: 60, scale: 2, transform: "translate(-100px, -90px) scale(2)"}, - {x: 50, y: 20, scale: 2.5, transform: "translate(-275px, -180px) scale(2.5)"}, - {x: 150, y: 60, scale: 2, transform: "translate(-100px, -90px) scale(2)"}, - {x: 50, y: 20, scale: 0.25, transform: "translate(63px, 45px) scale(0.25)"} + {x: 100, y: 60, scale: 1, transform: [-50, -40, 1]}, + {x: 150, y: 60, scale: 1, transform: [0, -40, 1]}, + {x: 150, y: 60, scale: 2, transform: [-150, -140, 2]}, + {x: 50, y: 20, scale: 2.5, transform: [-325, -230, 2.5]}, + {x: 150, y: 60, scale: 2, transform: [-150, -140, 2]}, + {x: 50, y: 20, scale: 0.25, transform: [13, -5, 0.25]} ]; var len = cases.length; diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 6e7d4181bf..c9cff3e57d 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -25,7 +25,7 @@ function test_constructor (t) { - t.plan( 8 ); + t.plan( 7 ); layer = new OpenLayers.Layer.Grid(name, url, params, null); t.ok( layer instanceof OpenLayers.Layer.Grid, "returns OpenLayers.Layer.Grid object" ); @@ -34,7 +34,6 @@ t.eq( layer.numLoadingTiles, 0, "numLoadingTiles starts at 0"); t.ok( layer.tileClass === OpenLayers.Tile.Image, "tileClass default is OpenLayers.Tile.Image"); t.eq( layer.className, 'olLayerGrid', "className default is olLayerGrid"); - t.eq( layer.removeBackBufferDelay, 2500, "removeBackBufferDelay default is 2500"); var obj = {}; var func = function() {}; @@ -1014,7 +1013,7 @@ } function test_applyBackBuffer(t) { - t.plan(12); + t.plan(9); var map = new OpenLayers.Map('map2'); var layer = new OpenLayers.Layer.WMS('', '', {}, { @@ -1071,24 +1070,6 @@ t.eq(layer.backBuffer.style.top, '295px', 'back buffer has correct top'); - // test #4 - // and a back buffer in the layer and do as if back buffer removal - // has been scheduled, and test that applyBackBuffer removes the - // back buffer and clears the timer - layer.createBackBuffer = function() { - return; - }; - backBuffer = document.createElement('div'); - layer.div.insertBefore(backBuffer, layer.div.firstChild); - layer.backBuffer = backBuffer; - layer.backBufferTimerId = 'fake'; - layer.applyBackBuffer(2); - t.ok(backBuffer.parentNode !== layer.div, - 'back buffer is not child node of layer div'); - t.eq(layer.backBuffer, null, - 'back buffer not set in layer'); - t.eq(layer.backBufferTimerId, null, - 'back buffer timer cleared'); map.destroy(); } @@ -1141,7 +1122,7 @@ } function test_removeBackBuffer(t) { - t.plan(4); + t.plan(3); var map = new OpenLayers.Map('map'); var layer = new OpenLayers.Layer.WMS('', '', {}, {isBaseLayer: true}); @@ -1153,17 +1134,12 @@ layer.div.appendChild(backBuffer); layer.backBufferResolution = 32; - // add a fake back buffer removal timer - layer.backBufferTimerId = 'fake'; - layer.removeBackBuffer(); t.eq(layer.backBuffer, null, 'backBuffer set to null in layer'); t.eq(layer.backBufferResolution, null, 'backBufferResolution set to null in layer'); t.ok(backBuffer.parentNode !== layer.div, 'back buffer removed from layer'); - t.eq(layer.backBufferTimerId, null, - 'backBufferTimerId set to null in layer'); map.destroy(); } @@ -1307,52 +1283,6 @@ OpenLayers.Tile.Image.prototype.createBackBuffer = origCreateBackBuffer } - function test_delayed_back_buffer_removal(t) { - // - // Test that the delaying of the back buffer removal behaves - // as expected. - // - - t.plan(5); - - // set up - - var map = new OpenLayers.Map('map', { - resolutions: [32, 16, 8, 4, 2, 1] - }); - var layer = new OpenLayers.Layer.WMS('', '', {}, { - isBaseLayer: true, - transitionEffect: 'resize' - }); - map.addLayer(layer); - map.setCenter(new OpenLayers.LonLat(0, 0), 0); - - map.zoomTo(1); - - // Mark one tile loaded, to see if back buffer removal gets scheduled. - layer.grid[1][1].onImageLoad(); - - t.ok(layer.backBuffer.parentNode === layer.div, - '[a] back buffer is a child of layer div'); - t.ok(layer.backBufferTimerId !== null, - '[a] back buffer scheduled for removal'); - - var backBuffer = layer.backBuffer; - - map.zoomTo(2); - - t.ok(layer.backBuffer !== backBuffer, - '[b] a new back buffer was created'); - t.ok(layer.backBuffer.parentNode === layer.div, - '[b] back buffer is a child of layer div'); - t.ok(layer.backBufferTimerId === null, - '[b] back buffer no longer scheduled for removal'); - - // tear down - - map.destroy(); - } - function test_getGridData(t) { t.plan(12); diff --git a/tests/Map.html b/tests/Map.html index b072585a2b..e57020b065 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -928,8 +928,13 @@ map.setBaseLayer(tmsLayer); map.zoomIn(); map.pan(0, -200, {animate:false}); + var log = []; + map.applyTransform = function(x, y, scale) { + log.push([x || map.layerContainerOriginPx.x, y || map.layerContainerOriginPx.y, scale]); + OpenLayers.Map.prototype.applyTransform.apply(this, arguments); + }; map.setBaseLayer(wmsLayer); - t.eq(map.layerContainerDiv.style.top, "0px", "layerContainer is recentered after setBaseLayer"); + t.eq(log[0][0], 0, "layerContainer is recentered after setBaseLayer"); map.destroy(); } @@ -1959,7 +1964,7 @@ } function test_moveByPx(t) { - t.plan(16); + t.plan(14); var moved; var Layer = OpenLayers.Class(OpenLayers.Layer, { @@ -1979,14 +1984,19 @@ {isBaseLayer: false, minResolution:2}) ] }); + var log = []; + map.applyTransform = function(x, y, scale) { + log.push([x || map.layerContainerOriginPx.x, y || map.layerContainerOriginPx.y, scale]); + OpenLayers.Map.prototype.applyTransform.apply(this, arguments); + } moved = {}; map.zoomToExtent(new OpenLayers.Bounds(-1, -1, 1, 1)); // check initial state - t.eq(map.layerContainerDiv.style.left, '0px', + t.eq(log[0][0], 0, '[initial state] layer container left correct'); - t.eq(map.layerContainerDiv.style.top, '0px', + t.eq(log[0][1], 0, '[initial state] layer container top correct'); t.eq(moved['base'], undefined, '[initial state] base layer not moved'); @@ -1996,9 +2006,9 @@ // move to a valid position moved = {}; map.moveByPx(-455, 455); - t.eq(map.layerContainerDiv.style.left, '455px', + t.eq(log[1][0], 455, '[valid position] layer container left correct'); - t.eq(map.layerContainerDiv.style.top, '-455px', + t.eq(log[1][1], -455, '[valid position] layer container top correct'); t.eq(moved['base'], true, '[valid position] base layer moved'); @@ -2008,10 +2018,8 @@ // move outside the max extent moved = {}; map.moveByPx(-4500, 4500); - t.eq(map.layerContainerDiv.style.left, '455px', - '[outside max extent] layer container left correct'); - t.eq(map.layerContainerDiv.style.top, '-455px', - '[outside max extent] layer container top correct'); + t.eq(log.length, 2, + '[outside max extent] layer container offset unchanged'); t.eq(moved['base'], undefined, '[outside max extent] base layer not moved'); t.eq(moved['outofrange'], undefined, @@ -2020,10 +2028,8 @@ // move outside the restricted extent moved = {}; map.moveByPx(-500, 500); - t.eq(map.layerContainerDiv.style.left, '455px', - '[outside restricted extent] layer container left correct'); - t.eq(map.layerContainerDiv.style.top, '-455px', - '[outside restricted extent] layer container top correct'); + t.eq(log.length, 2, + '[outside restricted extent] layer container offset unchanged'); t.eq(moved['base'], undefined, '[outside restricted extent] base layer not moved'); t.eq(moved['outofrange'], undefined, @@ -2047,9 +2053,45 @@ map.zoomToExtent(new OpenLayers.Bounds(-11.25, 0, 11.25, 11.25)); + var log = []; + map.applyTransform = function(x, y, scale) { + log.push([x || map.layerContainerOriginPx.x, y || map.layerContainerOriginPx.y, scale]); + OpenLayers.Map.prototype.applyTransform.apply(this, arguments); + } + map.moveByPx(-10, -10); - t.eq(map.layerContainerDiv.style.left, '10px', 'layer container left correct'); - t.eq(map.layerContainerDiv.style.top, '0px', 'layer container top correct'); + t.eq(log[0][0], 10, 'layer container left correct'); + t.eq(log[0][1], 0, 'layer container top correct'); + } + + function test_applyTransform(t) { + t.plan(4); + + var map = new OpenLayers.Map('map'); + map.layerContainerDiv = {style: {}}; + delete map.applyTransform.transform; + delete map.applyTransform.template; + var origStylePrefix = OpenLayers.Util.vendorPrefix.style; + OpenLayers.Util.vendorPrefix.style = function(key) { return 'transform'; }; + map.applyTransform(1, 2, 3); + OpenLayers.Util.vendorPrefix.style = origStylePrefix; + t.eq(map.layerContainerDiv.style.transform, 'translate3d(1px,2px,0) scale3d(3,3,1)', '3d transform and scale used when available'); + + delete map.applyTransform.template; + var origIndexOf = String.prototype.indexOf; + String.prototype.indexOf = function() { return -1; }; + map.applyTransform(1, 2, 3); + String.prototype.indexOf = origIndexOf; + t.eq(map.layerContainerDiv.style.transform, 'translate(1px,2px) scale(3,3)', '2d translate and scale correct'); + + map.applyTransform.transform = null; + map.applyTransform(4, 5, 6); + t.eq(map.layerContainerDiv.style.left, '4px', 'style.left set when transform not available') + t.eq(map.layerContainerDiv.style.top, '5px', 'style.top set when transform not available') + + map.destroy(); + delete map.applyTransform.transform; + delete map.applyTransform.template; } function test_options(t) { From 980792e1905cd897078264848b56f15425fb03e0 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 14 Dec 2012 17:28:48 +0100 Subject: [PATCH 015/148] GPU needs to be turned on for all elements we move --- theme/default/style.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/theme/default/style.css b/theme/default/style.css index dddea0e163..9cca7a100f 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -487,10 +487,12 @@ a.olControlZoomOut { transition: opacity 0.2s linear; } -.olTileImage, .olLayerDiv { +/* Turn on GPU support where available */ +.olMapViewport * { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } From 25c8b0ceaf3322bb3ae86758b6a85244d101690f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 15 Dec 2012 10:24:22 +0100 Subject: [PATCH 016/148] Adding transforms to turn on GPU --- examples/mobile-wmts-vienna.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index ac3d1cb5e6..ff8f3f3981 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -12,6 +12,16 @@ html, body, #map { #title, #tags, #shortdesc { display: none; } + +/* Turn on GPU support on devices that support it */ +.olMapViewport * { + -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); +} + .olLayerGrid .olTileImage { -webkit-transition: opacity 0.2s linear; -moz-transition: opacity 0.2s linear; @@ -166,4 +176,4 @@ div.layerPanel div.mapButtonItemActive:after { div.layerPanel div.mapButtonItemInactive, div.layerPanel div.mapButtonItemActive { margin-left: 1px; -} \ No newline at end of file +} From c03f1dc9bf6536596725fb82b1f3e98f0caff6ed Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 15 Dec 2012 10:55:23 +0100 Subject: [PATCH 017/148] Own applyTransform method is no longer needed --- lib/OpenLayers/Control/PinchZoom.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/OpenLayers/Control/PinchZoom.js b/lib/OpenLayers/Control/PinchZoom.js index 009d870ff9..4362780164 100644 --- a/lib/OpenLayers/Control/PinchZoom.js +++ b/lib/OpenLayers/Control/PinchZoom.js @@ -4,7 +4,6 @@ * full text of the license. */ /** - * @requires OpenLayers/Util/vendorPrefix.js * @requires OpenLayers/Handler/Pinch.js */ @@ -111,19 +110,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, { this.map.applyTransform(dx, dy, scale); this.currentCenter = current; }, - - /** - * Method: applyTransform - * Applies the given transform to layers. - */ - applyTransform: function(transform) { - var style = this.map.layerContainerDiv.style; - var transformProperty = OpenLayers.Util.vendorPrefix.style("transform"); - if (transformProperty) { - style[transformProperty] = transform; - } - }, - + /** * Method: pinchDone * @@ -135,7 +122,7 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, { * of the pinch gesture. This give us the final scale of the pinch. */ pinchDone: function(evt, start, last) { - this.applyTransform(""); + this.map.applyTransform(); var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true); if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) { var resolution = this.map.getResolutionForZoom(zoom); From b89d3f1ee85b11727d6ffefe7feb6cb66deb930f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 15 Dec 2012 15:56:39 +0100 Subject: [PATCH 018/148] Going one element up with GPU support, adding it to mobile css also --- examples/mobile-wmts-vienna.css | 2 +- theme/default/style.css | 2 +- theme/default/style.mobile.css | 20 ++++++++------------ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index ff8f3f3981..df2a861b8b 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -14,7 +14,7 @@ html, body, #map { } /* Turn on GPU support on devices that support it */ -.olMapViewport * { +.olMapViewport, .olMapViewport * { -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); diff --git a/theme/default/style.css b/theme/default/style.css index 9cca7a100f..f4d5ee5a89 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -488,7 +488,7 @@ a.olControlZoomOut { } /* Turn on GPU support where available */ -.olMapViewport * { +.olMapViewport, .olMapViewport * { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index 2d4d39257a..ef8069afd2 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -49,15 +49,11 @@ div.olControlZoom a:hover { -o-transition: opacity 0.2s linear; transition: opacity 0.2s linear; } -/* Enable 3d acceleration when operating on tiles, this is - known to yield better performance on IOS Safari. - http://osgeo-org.1803224.n2.nabble.com/Harware-accelerated-CSS3-animations-for-iOS-td6255560.html - - It also prevents tile blinking effects in iOS 5. - See https://github.com/openlayers/openlayers/issues/511 -*/ -@media (-webkit-transform-3d) { -img.olTileImage { - -webkit-transform: translate3d(0, 0, 0); -} -} +/* Turn on GPU support on devices that support it */ +.olMapViewport, .olMapViewport * { + -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); +} \ No newline at end of file From 13b4ca65607f32bd535955760e668b7faaf97bc0 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 16 Dec 2012 01:00:59 +0100 Subject: [PATCH 019/148] Do not set translate3d on svg children In current Webkit browsers, having translate3d on svg child elements causes the positioning from the layer not to be inherited by the vector layer content. --- examples/mobile-wmts-vienna.css | 5 ++++- theme/default/style.css | 13 ++++++++----- theme/default/style.mobile.css | 7 +++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index df2a861b8b..1a1dd07079 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -13,7 +13,7 @@ html, body, #map { display: none; } -/* Turn on GPU support on devices that support it */ +/* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); @@ -21,6 +21,9 @@ html, body, #map { -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } +.olLayerDiv svg * { + -webkit-transform: none; +} .olLayerGrid .olTileImage { -webkit-transition: opacity 0.2s linear; diff --git a/theme/default/style.css b/theme/default/style.css index f4d5ee5a89..ddef0c7059 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -489,11 +489,14 @@ a.olControlZoomOut { /* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { - -webkit-transform: translate3d(0, 0, 0); - -moz-transform: translate3d(0, 0, 0); - -o-transform: translate3d(0, 0, 0); - -ms-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); + -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); +} +.olLayerDiv svg * { + -webkit-transform: none; } /* override any max-width image settings (e.g. bootstrap.css) */ diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index ef8069afd2..dec122f1b0 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -49,11 +49,14 @@ div.olControlZoom a:hover { -o-transition: opacity 0.2s linear; transition: opacity 0.2s linear; } -/* Turn on GPU support on devices that support it */ +/* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); transform: translate3d(0,0,0); -} \ No newline at end of file +} +.olLayerDiv svg * { + -webkit-transform: none; +} From a309b2405351dc760edcf0acd5218d82faa577fb Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 17 Dec 2012 10:23:02 +0100 Subject: [PATCH 020/148] Only use 3d transforms when stylesheet has transform on layerContainerDiv This allows users to control whether 3d acceleration should be used or not: Just like with plain web pages, having a stylesheet that sets a transform on the map's layerContainerDiv will make OpenLayers use translate3d and scale3d. When no such transform is set in the stylesheet, style.left and style.top will be used, except for e.g. pinch zoom, where scaling is needed. --- lib/OpenLayers/Map.js | 86 ++++++++++++++++++++++++++----------------- tests/Map.html | 22 ++++++++--- 2 files changed, 70 insertions(+), 38 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index c8963747ef..07c15496ed 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -2660,41 +2660,61 @@ OpenLayers.Map = OpenLayers.Class({ * the map's * scale - {Number} scale. Defaults to 1 if not provided. */ - applyTransform: function(dx, dy, scale) { - var origin = this.layerContainerOriginPx; - dx = dx || origin.x; - dy = dy || origin.y; - scale = scale || 1; + applyTransform: function(x, y, scale) { + scale = scale || 1; + var origin = this.layerContainerOriginPx, + needTransform = scale !== 1; + x = x || origin.x; + y = y || origin.y; - var style = this.layerContainerDiv.style, - transform = this.applyTransform.transform, - template = this.applyTransform.template; + var style = this.layerContainerDiv.style, + transform = this.applyTransform.transform, + template = this.applyTransform.template; - if (transform === undefined) { - transform = OpenLayers.Util.vendorPrefix.style('transform'); - this.applyTransform.transform = transform; - } - - if (transform) { - if (!template) { - // try translate3d - template = ['translate3d(', ',0) ', 'scale3d(', ',1)']; - style[transform] = [template[0], '0,0', template[1]].join(''); - // if translate3d does not stick, use translate and scale - if (!~style[transform].indexOf(template[0])) { - template = ['translate(', ') ', 'scale(', ')']; - } - this.applyTransform.template = template; - } - style[transform] = [ - template[0], dx, 'px,', dy, 'px', template[1], - template[2], scale, ',', scale, template[3] - ].join(''); - } else { - style.left = dx + 'px'; - style.top = dy + 'px'; - } - }, + if (transform === undefined) { + transform = OpenLayers.Util.vendorPrefix.style('transform'); + this.applyTransform.transform = transform; + if (transform) { + // Try translate3d, but only if the viewPortDiv has a transform + // defined in a stylesheet + var computedStyle = OpenLayers.Element.getStyle(this.viewPortDiv, OpenLayers.Util.vendorPrefix.css('transform')); + if (!computedStyle || computedStyle !== 'none') { + template = ['translate3d(', ',0) ', 'scale3d(', ',1)']; + style[transform] = [template[0], '0,0', template[1]].join(''); + } + // If no transform is defined in the stylesheet or translate3d + // does not stick, use translate and scale + if (!template || !~style[transform].indexOf(template[0])) { + template = ['translate(', ') ', 'scale(', ')']; + } + this.applyTransform.template = template; + } + } + + // If we do 3d transforms, we always want to use them. If we do 2d + // transforms, we only use them when we need to. + if (transform !== null && (template[0] === 'translate3d(' || needTransform === true)) { + // Our 2d transforms are combined with style.left and style.top, so + // adjust x and y values and set the origin as left and top + if (needTransform === true && template[0] === 'translate(') { + x -= origin.x; + y -= origin.y; + style.left = origin.x + 'px'; + style.top = origin.y + 'px'; + } + style[transform] = [ + template[0], x, 'px,', y, 'px', template[1], + template[2], scale, ',', scale, template[3] + ].join(''); + } else { + style.left = x + 'px'; + style.top = y + 'px'; + // We previously might have had needTransform, so remove transform + if (transform !== null) { + style[transform] = ''; + } + } + }, CLASS_NAME: "OpenLayers.Map" }); diff --git a/tests/Map.html b/tests/Map.html index e57020b065..fb05de0ffd 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -2065,33 +2065,45 @@ } function test_applyTransform(t) { - t.plan(4); + t.plan(10); + var origStylePrefix = OpenLayers.Util.vendorPrefix.style; + OpenLayers.Util.vendorPrefix.style = function(key) { return 'transform'; }; var map = new OpenLayers.Map('map'); map.layerContainerDiv = {style: {}}; delete map.applyTransform.transform; delete map.applyTransform.template; - var origStylePrefix = OpenLayers.Util.vendorPrefix.style; - OpenLayers.Util.vendorPrefix.style = function(key) { return 'transform'; }; + var origGetStyle = OpenLayers.Element.getStyle; + OpenLayers.Element.getStyle = function() { return 'foo'; } map.applyTransform(1, 2, 3); - OpenLayers.Util.vendorPrefix.style = origStylePrefix; + OpenLayers.Element.getStyle = origGetStyle; t.eq(map.layerContainerDiv.style.transform, 'translate3d(1px,2px,0) scale3d(3,3,1)', '3d transform and scale used when available'); + delete map.applyTransform.transform; delete map.applyTransform.template; var origIndexOf = String.prototype.indexOf; String.prototype.indexOf = function() { return -1; }; + map.layerContainerOriginPx = {x: -3, y: 2}; map.applyTransform(1, 2, 3); String.prototype.indexOf = origIndexOf; - t.eq(map.layerContainerDiv.style.transform, 'translate(1px,2px) scale(3,3)', '2d translate and scale correct'); + t.eq(map.layerContainerDiv.style.transform, 'translate(4px,0px) scale(3,3)', '2d translate and scale correct'); + t.eq(map.layerContainerDiv.style.left, '-3px', 'container origin x set as style.left'); + t.eq(map.layerContainerDiv.style.top, '2px', 'container origin y set as style.top'); + map.applyTransform(1, 2); + t.ok(!map.layerContainerDiv.style.transform, 'no transform set when no transform needed'); + t.eq(map.layerContainerDiv.style.left, '1px', 'style.left correct when no transform needed'); + t.eq(map.layerContainerDiv.style.top, '2px', 'style.top correct when no transform needed'); map.applyTransform.transform = null; map.applyTransform(4, 5, 6); t.eq(map.layerContainerDiv.style.left, '4px', 'style.left set when transform not available') t.eq(map.layerContainerDiv.style.top, '5px', 'style.top set when transform not available') + t.ok(!map.layerContainerDiv.style.transform, 'no transform set, because not supported'); map.destroy(); delete map.applyTransform.transform; delete map.applyTransform.template; + OpenLayers.Util.vendorPrefix.style = origStylePrefix; } function test_options(t) { From aa5bab250a43db0895b9e0e72498f13956f9324e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 17 Dec 2012 11:15:55 +0100 Subject: [PATCH 021/148] 3d transforms in svg content are bad in other browsers as well --- examples/mobile-wmts-vienna.css | 4 ++++ theme/default/style.css | 4 ++++ theme/default/style.mobile.css | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index 1a1dd07079..7728df666f 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -23,6 +23,10 @@ html, body, #map { } .olLayerDiv svg * { -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + -ms-transform: none; + transform: none; } .olLayerGrid .olTileImage { diff --git a/theme/default/style.css b/theme/default/style.css index ddef0c7059..85206ce107 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -497,6 +497,10 @@ a.olControlZoomOut { } .olLayerDiv svg * { -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + -ms-transform: none; + transform: none; } /* override any max-width image settings (e.g. bootstrap.css) */ diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index dec122f1b0..6408067bd7 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -59,4 +59,8 @@ div.olControlZoom a:hover { } .olLayerDiv svg * { -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + -ms-transform: none; + transform: none; } From 0b8deb11a25e16bb719b89c2580c44938bfd96ca Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 18 Dec 2012 13:12:00 +0100 Subject: [PATCH 022/148] Revert "No backbuffer removal delay needed with 3d enabled" This reverts commit 7e8271525ed52288092a135b1c65eed4849c8e49. --- lib/OpenLayers/Layer/Grid.js | 58 ++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 62bcd5c25e..b7101cec2c 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -190,15 +190,22 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { backBufferLonLat: null, /** - * APIProperty: removeBackBufferDelay - * {Number} Delay in ms for removing the backbuffer when all tiles have - * finished loading. Usually a value of 0 works fine. For slow mobile - * devices, when using layers with big image sizes, a delay - * of 40-50ms may help to avoid flickers after panning. Default is 0. - * If set, the layer's loadend event will also be delayed when a - * backbuffer needs to be removed. + * Property: backBufferTimerId + * {Number} The id of the back buffer timer. This timer is used to + * delay the removal of the back buffer, thereby preventing + * flash effects caused by tile animation. */ - removeBackBufferDelay: 0, + backBufferTimerId: null, + + /** + * APIProperty: removeBackBufferDelay + * {Number} Delay for removing the backbuffer when all tiles have finished + * loading. Can be set to 0 when no css opacity transitions for the + * olTileImage class are used. Default is 0 for layers, + * 2500 for tiled layers. See for more information on + * tile animation. + */ + removeBackBufferDelay: null, /** * APIProperty: className @@ -229,6 +236,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * transition: opacity 0.2s linear; * } * (end) + * In that case, to avoid flash effects, + * should not be zero. */ className: null, @@ -302,6 +311,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.tileQueue = []; this._removeBackBuffer = OpenLayers.Function.bind(this.removeBackBuffer, this); + if (this.removeBackBufferDelay === null) { + this.removeBackBufferDelay = this.singleTile ? 0 : 2500; + } + if (this.className === null) { this.className = this.singleTile ? 'olLayerGridSingleTile' : 'olLayerGrid'; @@ -341,6 +354,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.moveTimerId = null; } this.clearTileQueue(); + if(this.backBufferTimerId !== null) { + window.clearTimeout(this.backBufferTimerId); + this.backBufferTimerId = null; + } }, /** @@ -409,6 +426,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { obj.gridResolution = null; // same for backbuffer and tile queue obj.backBuffer = null; + obj.backBufferTimerId = null; obj.tileQueue = []; obj.tileQueueId = null; obj.loading = false; @@ -668,6 +686,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * resolution - {Number} The resolution to transition to. */ applyBackBuffer: function(resolution) { + if(this.backBufferTimerId !== null) { + this.removeBackBuffer(); + } var backBuffer = this.backBuffer; if(!backBuffer) { backBuffer = this.createBackBuffer(); @@ -757,6 +778,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.div.removeChild(this.backBuffer); this.backBuffer = null; this.backBufferResolution = null; + if(this.backBufferTimerId !== null) { + window.clearTimeout(this.backBufferTimerId); + this.backBufferTimerId = null; + } } }, @@ -1109,14 +1134,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); //if that was the last tile, then trigger a 'loadend' on the layer if (this.tileQueue.length === 0 && this.numLoadingTiles === 0) { - if (this.backBuffer) { - var that = this; - window.setTimeout(function() { - that.onLoadEnd(); - that.removeBackBuffer(); - }, this.removeBackBufferDelay); - } else { - this.onLoadEnd(); + this.loading = false; + this.events.triggerEvent("loadend"); + if(this.backBuffer) { + // the removal of the back buffer is delayed to prevent flash + // effects due to the animation of tile displaying + this.backBufferTimerId = window.setTimeout( + OpenLayers.Function.bind(this.removeBackBuffer, this), + this.removeBackBufferDelay + ); } } }; From afe53aba7de077f7d521981f78fe9514ee1b4139 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 18 Dec 2012 13:48:16 +0100 Subject: [PATCH 023/148] Put backbuffer below all layers, except when panning --- lib/OpenLayers/Layer/Grid.js | 10 ++++++++-- tests/Layer/Grid.html | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index b7101cec2c..46c640a5b6 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -695,7 +695,11 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { if(!backBuffer) { return; } - this.div.insertBefore(backBuffer, this.div.firstChild); + if (resolution === this.gridResolution) { + this.div.insertBefore(backBuffer, this.div.firstChild); + } else { + this.map.layerContainerDiv.insertBefore(backBuffer, this.map.baseLayer.div); + } this.backBuffer = backBuffer; // set some information in the instance for subsequent @@ -775,7 +779,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { delete this._transitionElement; } if(this.backBuffer) { - this.div.removeChild(this.backBuffer); + if (this.backBuffer.parentNode) { + this.backBuffer.parentNode.removeChild(this.backBuffer); + } this.backBuffer = null; this.backBufferResolution = null; if(this.backBufferTimerId !== null) { diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index c9cff3e57d..dc607d1ead 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1043,7 +1043,7 @@ layer.applyBackBuffer(2); t.ok(layer.backBuffer === backBuffer, 'back buffer set in layer'); - t.ok(layer.div.firstChild === backBuffer, + t.ok(map.layerContainerDiv.firstChild === backBuffer, 'back buffer inserted as first child'); t.eq(layer.backBuffer.style.left, '250px', 'back buffer has correct left'); @@ -1063,7 +1063,7 @@ layer.applyBackBuffer(2); t.ok(layer.backBuffer === backBuffer, 'back buffer set in layer'); - t.ok(layer.div.firstChild === backBuffer, + t.ok(map.layerContainerDiv.firstChild === backBuffer, 'back buffer inserted as first child'); t.eq(layer.backBuffer.style.left, '230px', 'back buffer has correct left'); From d2b3bded72d5357a84a1a184da96e1157191620b Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 21 Dec 2012 08:27:13 +0100 Subject: [PATCH 024/148] Better way to get GPU support, and avoid flicker These declarations were suggested on http://blog.teamtreehouse.com/increase-your-sites-performance-with-hardware-accelerated-css --- examples/mobile-wmts-vienna.css | 18 +++++++++++++----- theme/default/style.css | 18 +++++++++++++----- theme/default/style.mobile.css | 18 +++++++++++++----- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index 7728df666f..e2fbf7a3ee 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -15,11 +15,19 @@ html, body, #map { /* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - -o-transform: translate3d(0,0,0); - -ms-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + -moz-perspective: 1000; + -ms-perspective: 1000; + perspective: 1000; } .olLayerDiv svg * { -webkit-transform: none; diff --git a/theme/default/style.css b/theme/default/style.css index 85206ce107..76d039c09a 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -489,11 +489,19 @@ a.olControlZoomOut { /* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - -o-transform: translate3d(0,0,0); - -ms-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + -moz-perspective: 1000; + -ms-perspective: 1000; + perspective: 1000; } .olLayerDiv svg * { -webkit-transform: none; diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index 6408067bd7..3c0f6eb83d 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -51,11 +51,19 @@ div.olControlZoom a:hover { } /* Turn on GPU support where available */ .olMapViewport, .olMapViewport * { - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - -o-transform: translate3d(0,0,0); - -ms-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -o-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + -moz-perspective: 1000; + -ms-perspective: 1000; + perspective: 1000; } .olLayerDiv svg * { -webkit-transform: none; From 21448d2fd57d3d618a9cff4d1ded6a0e947eec5a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 23 Dec 2012 18:47:03 +0100 Subject: [PATCH 025/148] Adding animated zooming --- lib/OpenLayers/Control/Navigation.js | 20 +-- lib/OpenLayers/Control/TouchNavigation.js | 3 +- lib/OpenLayers/Control/ZoomBox.js | 27 ++-- lib/OpenLayers/Map.js | 144 +++++++++++++++++++--- tests/Control/Navigation.html | 1 + tests/Control/NavigationHistory.html | 2 +- tests/Control/PanZoomBar.html | 8 +- tests/Control/Scale.html | 4 +- tests/Control/Zoom.html | 6 +- tests/Layer/Grid.html | 16 ++- tests/Layer/KaMap.html | 2 +- tests/Layer/Markers.html | 2 +- tests/Layer/PointGrid.html | 3 +- tests/Layer/WMTS.html | 3 +- tests/Map.html | 58 ++++++++- tests/Strategy/BBOX.html | 4 +- tests/Strategy/Cluster.html | 3 +- 17 files changed, 239 insertions(+), 67 deletions(-) diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index 17d2bf0aaa..38bc45c667 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -238,8 +238,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { * evt - {Event} */ defaultDblClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); + this.map.zoomTo(this.map.zoom + 1, evt.xy); }, /** @@ -249,8 +248,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { * evt - {Event} */ defaultDblRightClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom - 1); + this.map.zoomTo(this.map.zoom - 1, evt.xy); }, /** @@ -264,22 +262,14 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { if (!this.map.fractionalZoom) { deltaZ = Math.round(deltaZ); } - var currentZoom = this.map.getZoom(); - var newZoom = this.map.getZoom() + deltaZ; + var currentZoom = this.map.getZoom(), + newZoom = currentZoom + deltaZ; newZoom = Math.max(newZoom, 0); newZoom = Math.min(newZoom, this.map.getNumZoomLevels()); if (newZoom === currentZoom) { return; } - var size = this.map.getSize(); - var deltaX = size.w/2 - evt.xy.x; - var deltaY = evt.xy.y - size.h/2; - var newRes = this.map.baseLayer.getResolutionForZoom(newZoom); - var zoomPoint = this.map.getLonLatFromPixel(evt.xy); - var newCenter = new OpenLayers.LonLat( - zoomPoint.lon + deltaX * newRes, - zoomPoint.lat + deltaY * newRes ); - this.map.setCenter( newCenter, newZoom ); + this.map.zoomTo(newZoom, evt.xy); }, /** diff --git a/lib/OpenLayers/Control/TouchNavigation.js b/lib/OpenLayers/Control/TouchNavigation.js index 7ff476eaf2..2a3b8f57be 100644 --- a/lib/OpenLayers/Control/TouchNavigation.js +++ b/lib/OpenLayers/Control/TouchNavigation.js @@ -175,8 +175,7 @@ OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, { * evt - {Event} */ defaultDblClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx(evt.xy); - this.map.setCenter(newCenter, this.map.zoom + 1); + this.map.zoomTo(this.map.zoom + 1, evt.xy); }, CLASS_NAME: "OpenLayers.Control.TouchNavigation" diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index 58da952c9d..93f14dd736 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -69,7 +69,8 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { */ zoomBox: function (position) { if (position instanceof OpenLayers.Bounds) { - var bounds; + var bounds, + targetCenterPx = position.getCenterPixel(); if (!this.out) { var minXY = this.map.getLonLatFromPixel({ x: position.left, @@ -87,8 +88,7 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { var zoomFactor = Math.min((this.map.size.h / pixHeight), (this.map.size.w / pixWidth)); var extent = this.map.getExtent(); - var center = this.map.getLonLatFromPixel( - position.getCenterPixel()); + var center = this.map.getLonLatFromPixel(targetCenterPx); var xmin = center.lon - (extent.getWidth()/2)*zoomFactor; var xmax = center.lon + (extent.getWidth()/2)*zoomFactor; var ymin = center.lat - (extent.getHeight()/2)*zoomFactor; @@ -96,18 +96,27 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { bounds = new OpenLayers.Bounds(xmin, ymin, xmax, ymax); } // always zoom in/out - var lastZoom = this.map.getZoom(); - this.map.zoomToExtent(bounds); + var lastZoom = this.map.getZoom(), + size = this.map.getSize(), + centerPx = {x: size.w / 2, y: size.h / 2}, + zoom = this.map.getZoomForExtent(bounds), + oldRes = this.map.getResolution(), + newRes = this.map.getResolutionForZoom(zoom), + zoomOriginPx = { + x: targetCenterPx.x + + (targetCenterPx.x - centerPx.x) * newRes / oldRes, + y: targetCenterPx.y + + (targetCenterPx.y - centerPx.y) * newRes / oldRes + }; + this.map.zoomTo(zoom, zoomOriginPx); if (lastZoom == this.map.getZoom() && this.alwaysZoom == true){ this.map.zoomTo(lastZoom + (this.out ? -1 : 1)); } } else if (this.zoomOnClick) { // it's a pixel if (!this.out) { - this.map.setCenter(this.map.getLonLatFromPixel(position), - this.map.getZoom() + 1); + this.map.zoomTo(this.map.getZoom() + 1, position); } else { - this.map.setCenter(this.map.getLonLatFromPixel(position), - this.map.getZoom() - 1); + this.map.zoomTo(this.map.getZoom() - 1, position); } } }, diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 07c15496ed..fa66d8803b 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -387,12 +387,6 @@ OpenLayers.Map = OpenLayers.Class({ */ autoUpdateSize: true, - /** - * Property: panTween - * {} Animated panning tween object, see panTo() - */ - panTween: null, - /** * APIProperty: eventListeners * {Object} If set as an option at construction, the eventListeners @@ -402,6 +396,12 @@ OpenLayers.Map = OpenLayers.Class({ */ eventListeners: null, + /** + * Property: panTween + * {} Animated panning tween object, see panTo() + */ + panTween: null, + /** * APIProperty: panMethod * {Function} The Easing function to be used for tweening. Default is @@ -419,6 +419,28 @@ OpenLayers.Map = OpenLayers.Class({ */ panDuration: 50, + /** + * Property: zoomTween + * {} Animated zooming tween object, see zoomTo() + */ + zoomTween: null, + + /** + * APIProperty: zoomMethod + * {Function} The Easing function to be used for tweening. Default is + * OpenLayers.Easing.Quad.easeOut. Setting this to 'null' turns off + * animated zooming. + */ + zoomMethod: OpenLayers.Easing.Quad.easeOut, + + /** + * Property: zoomDuration + * {Integer} The number of steps to be passed to the + * OpenLayers.Tween.start() method when the map is zoomed. + * Default is 20. + */ + zoomDuration: 20, + /** * Property: paddingForPopups * {} Outside margin of the popup. Used to prevent @@ -586,6 +608,7 @@ OpenLayers.Map = OpenLayers.Class({ this.layerContainerDiv = OpenLayers.Util.createDiv(id); this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1; this.layerContainerOriginPx = {x: 0, y: 0}; + this.applyTransform(); this.viewPortDiv.appendChild(this.layerContainerDiv); @@ -681,6 +704,13 @@ OpenLayers.Map = OpenLayers.Class({ this.setCenter(options.center, options.zoom); } } + + if (this.panMethod) { + this.panTween = new OpenLayers.Tween(this.panMethod); + } + if (this.zoomMethod && this.applyTransform.transform) { + this.zoomTween = new OpenLayers.Tween(this.zoomMethod); + } }, /** @@ -749,6 +779,11 @@ OpenLayers.Map = OpenLayers.Class({ this.panTween.stop(); this.panTween = null; } + // make sure zooming doesn't continue after destruction + if(this.zoomTween) { + this.zoomTween.stop(); + this.zoomTween = null; + } // map has been destroyed. dont do it again! OpenLayers.Event.stopObserving(window, 'unload', this.unloadDestroy); @@ -1664,10 +1699,7 @@ OpenLayers.Map = OpenLayers.Class({ * lonlat - {} */ panTo: function(lonlat) { - if (this.panMethod && this.getExtent().scale(this.panRatio).containsLonLat(lonlat)) { - if (!this.panTween) { - this.panTween = new OpenLayers.Tween(this.panMethod); - } + if (this.panTween && this.getExtent().scale(this.panRatio).containsLonLat(lonlat)) { var center = this.getCachedCenter(); // center will not change, don't do nothing @@ -1718,7 +1750,12 @@ OpenLayers.Map = OpenLayers.Class({ * TBD: reconsider forceZoomChange in 3.0 */ setCenter: function(lonlat, zoom, dragging, forceZoomChange) { - this.panTween && this.panTween.stop(); + if (this.panTween) { + this.panTween.stop(); + } + if (this.zoomTween) { + this.zoomTween.stop(); + } this.moveTo(lonlat, zoom, { 'dragging': dragging, 'forceZoomChange': forceZoomChange @@ -2319,17 +2356,65 @@ OpenLayers.Map = OpenLayers.Class({ /** * APIMethod: zoomTo - * Zoom to a specific zoom level + * Zoom to a specific zoom level. Zooming will be animated unless the map + * is configured with {zoomMethod: null}. To zoom without animation, use + * without a lonlat argument. * * Parameters: * zoom - {Integer} */ - zoomTo: function(zoom) { - if (this.isValidZoomLevel(zoom)) { - this.setCenter(null, zoom); + zoomTo: function(zoom, xy) { + // non-API arguments: + // xy - {} optional zoom origin + + var map = this; + if (map.isValidZoomLevel(zoom)) { + if (map.baseLayer.wrapDateLine) { + zoom = map.adjustZoom(zoom); + } + if (map.zoomTween) { + var currentRes = map.getResolution(), + targetRes = map.getResolutionForZoom(zoom), + start = {scale: 1}, + end = {scale: currentRes / targetRes}; + if (map.zoomTween.playing && map.zoomTween.duration < 3 * map.zoomDuration) { + // update the end scale, and reuse the running zoomTween + map.zoomTween.finish = { + scale: map.zoomTween.finish.scale * end.scale + } + } else { + if (!xy) { + var size = map.getSize(); + xy = {x: size.w / 2, y: size.h / 2}; + } + map.zoomTween.start(start, end, map.zoomDuration, { + minFrameRate: 50, // don't spend much time zooming + callbacks: { + eachStep: function(data) { + var containerOrigin = map.layerContainerOriginPx, + scale = data.scale, + dx = ((scale - 1) * (containerOrigin.x - xy.x)) | 0, + dy = ((scale - 1) * (containerOrigin.y - xy.y)) | 0; + map.applyTransform(containerOrigin.x + dx, containerOrigin.y + dy, scale); + }, + done: function(data) { + map.applyTransform(); + var resolution = map.getResolution() / data.scale, + zoom = map.getZoomForResolution(resolution, true) + map.moveTo(map.getZoomTargetCenter(xy, resolution), zoom, true); + } + } + }); + } + } else { + var center = xy ? + map.getZoomTargetCenter(xy, map.getResolutionForZoom(zoom)) : + null; + map.setCenter(center, zoom); + } } }, - + /** * APIMethod: zoomIn * @@ -2487,7 +2572,32 @@ OpenLayers.Map = OpenLayers.Class({ return px; }, - + /** + * Method: getZoomTargetCenter + * + * Parameters: + * xy - {} The zoom origin pixel location on the screen + * resolution - {Float} The resolution we want to get the center for + * + * Returns: + * {} The location of the map center after the + * transformation described by the origin xy and the target resolution. + */ + getZoomTargetCenter: function (xy, resolution) { + var lonlat = null, + size = this.getSize(), + deltaX = size.w/2 - xy.x, + deltaY = xy.y - size.h/2, + zoomPoint = this.getLonLatFromPixel(xy); + if (zoomPoint) { + lonlat = new OpenLayers.LonLat( + zoomPoint.lon + deltaX * resolution, + zoomPoint.lat + deltaY * resolution + ); + } + return lonlat; + }, + // // CONVENIENCE TRANSLATION FUNCTIONS FOR API // diff --git a/tests/Control/Navigation.html b/tests/Control/Navigation.html index 70428f5a7b..e73ee42d14 100644 --- a/tests/Control/Navigation.html +++ b/tests/Control/Navigation.html @@ -148,6 +148,7 @@ var nav = new OpenLayers.Control.Navigation({zoomWheelEnabled: false}); var map = new OpenLayers.Map({ div: "map", + zoomMethod: null, controls: [nav], layers: [ new OpenLayers.Layer(null, {isBaseLayer: true}) diff --git a/tests/Control/NavigationHistory.html b/tests/Control/NavigationHistory.html index b766b0e5ae..c992ff2b7a 100644 --- a/tests/Control/NavigationHistory.html +++ b/tests/Control/NavigationHistory.html @@ -170,7 +170,7 @@ function test_clear(t) { t.plan(7); - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); var layer = new OpenLayers.Layer( "test", {isBaseLayer: true} ); diff --git a/tests/Control/PanZoomBar.html b/tests/Control/PanZoomBar.html index b14ec2adba..28327768f5 100644 --- a/tests/Control/PanZoomBar.html +++ b/tests/Control/PanZoomBar.html @@ -77,7 +77,7 @@ function test_Control_PanZoomBar_onButtonClick (t) { t.plan(2); - map = new OpenLayers.Map('map', {controls:[]}); + map = new OpenLayers.Map('map', {controls:[], zoomMethod: null}); var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {map: "/mapdata/vmap_wms.map", layers: "basic"}); @@ -97,7 +97,8 @@ t.plan(1); map = new OpenLayers.Map('map', { controls: [], - fractionalZoom: true + fractionalZoom: true, + zoomMethod: null }); var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", { map: "/mapdata/vmap_wms.map", @@ -127,7 +128,8 @@ var map = new OpenLayers.Map('map', { controls: [], - fractionalZoom: true + fractionalZoom: true, + zoomMethod: null, }); var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", { map: "/mapdata/vmap_wms.map", diff --git a/tests/Control/Scale.html b/tests/Control/Scale.html index 804ceb5622..1d43b25e08 100644 --- a/tests/Control/Scale.html +++ b/tests/Control/Scale.html @@ -22,7 +22,7 @@ control = new OpenLayers.Control.Scale('scale'); t.ok( control instanceof OpenLayers.Control.Scale, "new OpenLayers.Control returns object" ); - map = new OpenLayers.Map('map'); + map = new OpenLayers.Map('map', {zoomMethod: null}); layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}); map.addLayer(layer); map.zoomTo(0); @@ -38,7 +38,7 @@ t.plan(2); control = new OpenLayers.Control.Scale(); t.ok( control instanceof OpenLayers.Control.Scale, "new OpenLayers.Control returns object" ); - map = new OpenLayers.Map('map'); + map = new OpenLayers.Map('map', {zoomMethod: null}); layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}); map.addLayer(layer); map.zoomTo(0); diff --git a/tests/Control/Zoom.html b/tests/Control/Zoom.html index c27161dab8..cfeb082cc4 100644 --- a/tests/Control/Zoom.html +++ b/tests/Control/Zoom.html @@ -43,7 +43,8 @@ var map = new OpenLayers.Map({ div: "map", - layers: [new OpenLayers.Layer(null, {isBaseLayer: true})] + layers: [new OpenLayers.Layer(null, {isBaseLayer: true})], + zoomMethod: null }); var control = new OpenLayers.Control.Zoom(); map.addControl(control); @@ -60,7 +61,8 @@ var map = new OpenLayers.Map({ div: "map", - layers: [new OpenLayers.Layer(null, {isBaseLayer: true})] + layers: [new OpenLayers.Layer(null, {isBaseLayer: true})], + zoomMethod: null }); var control = new OpenLayers.Control.Zoom(); map.addControl(control); diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index dc607d1ead..dd8a834b88 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -672,7 +672,7 @@ } function test_Layer_Grid_getTileBounds(t) { t.plan(2); - var map = new OpenLayers.Map("map2"); + var map = new OpenLayers.Map("map2", {zoomMethod: null}); var url = "http://octo.metacarta.com/cgi-bin/mapserv"; layer = new OpenLayers.Layer.WMS(name, url, params); @@ -869,7 +869,8 @@ t.plan(11); var map = new OpenLayers.Map('map', { - resolutions: [32, 16, 8, 4, 2, 1] + resolutions: [32, 16, 8, 4, 2, 1], + zoomMethod: null }); var layer = new OpenLayers.Layer.WMS('', '', {}, { isBaseLayer: true, @@ -930,7 +931,8 @@ t.plan(4); var map = new OpenLayers.Map('map', { - resolutions: [1, 0.5, 0.025] + resolutions: [1, 0.5, 0.025], + zoomMethod: null }); var resolution; var layer = new OpenLayers.Layer.WMS('', '', {}, { @@ -974,7 +976,8 @@ t.plan(4); var map = new OpenLayers.Map('map', { - resolutions: [1, 0.5, 0.025] + resolutions: [1, 0.5, 0.025], + zoomMethod: null }); var resolution; var layer = new OpenLayers.Layer.WMS('', '', {}, { @@ -1156,7 +1159,7 @@ t.plan(4); - var map = new OpenLayers.Map('map'); + var map = new OpenLayers.Map('map', {zoomMethod: null}); var layer = new OpenLayers.Layer.WMS('', '', {}, { isBaseLayer: true, singleTile: true, @@ -1187,7 +1190,8 @@ // var map = new OpenLayers.Map('map', { - resolutions: [32, 16, 8, 4, 2, 1] + resolutions: [32, 16, 8, 4, 2, 1], + zoomMethod: null }); var layer = new OpenLayers.Layer.WMS( "WMS", diff --git a/tests/Layer/KaMap.html b/tests/Layer/KaMap.html index c6b5ba773c..a41e4ebd0b 100644 --- a/tests/Layer/KaMap.html +++ b/tests/Layer/KaMap.html @@ -233,7 +233,7 @@ } function test_Layer_KaMap_getTileBounds(t) { t.plan(2); - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); var url = "http://octo.metacarta.com/cgi-bin/mapserv"; layer = new OpenLayers.Layer.KaMap(name, url, params); diff --git a/tests/Layer/Markers.html b/tests/Layer/Markers.html index 2db3052e60..07f699fedc 100644 --- a/tests/Layer/Markers.html +++ b/tests/Layer/Markers.html @@ -59,7 +59,7 @@ t.plan(6); - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); var layer = new OpenLayers.Layer.Markers("Base", {isBaseLayer: true}); map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(0, 0), 1); diff --git a/tests/Layer/PointGrid.html b/tests/Layer/PointGrid.html index 22d85c7dea..6fb6ae2012 100644 --- a/tests/Layer/PointGrid.html +++ b/tests/Layer/PointGrid.html @@ -211,7 +211,8 @@ div: "map", layers: [layer], center: new OpenLayers.LonLat(0, 0), - zoom: 1 + zoom: 1, + zoomMethod: null }); t.eq(layer.features.length, 50, "50 features at zoom 1"); diff --git a/tests/Layer/WMTS.html b/tests/Layer/WMTS.html index e8d7a235f1..c6dcd4cfc0 100644 --- a/tests/Layer/WMTS.html +++ b/tests/Layer/WMTS.html @@ -245,7 +245,8 @@ layers: [layer], projection: "EPSG:4326", maxResolution: 0.3515625, - maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90) + maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90), + zoomMethod: null }); map.setCenter(new OpenLayers.LonLat(-97.0, 38.0), 1); t.eq(layer.getURL(new OpenLayers.Bounds(-135.0, 0.0, -90.0, 45.0)), diff --git a/tests/Map.html b/tests/Map.html index fb05de0ffd..4b1475a75d 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -216,6 +216,7 @@ t.plan(14); var log = []; map = new OpenLayers.Map('map', { + zoomMethod: null, eventListeners: { "movestart": function() {log.push("movestart");}, "move": function() {log.push("move");}, @@ -268,7 +269,7 @@ function test_Map_zoomend_event (t) { t.plan(2); - map = new OpenLayers.Map('map'); + map = new OpenLayers.Map('map', {zoomMethod: null}); var baseLayer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {map: "/mapdata/vmap_wms.map", layers: "basic"}); @@ -1292,7 +1293,8 @@ extent = new OpenLayers.Bounds(8, 44.5, 19, 50); var options = { - restrictedExtent: extent + restrictedExtent: extent, + zoomMethod: null }; map = new OpenLayers.Map('map', options); @@ -1330,7 +1332,7 @@ function test_zoomTo(t) { t.plan(8); - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); map.addLayer(new OpenLayers.Layer(null, { isBaseLayer: true })); @@ -1367,6 +1369,38 @@ map.destroy(); } + function test_zoomTo_animated(t) { + t.plan(2); + + var map = new OpenLayers.Map("map"); + map.addLayer(new OpenLayers.Layer(null, { + isBaseLayer: true + })); + + map.zoomToMaxExtent(); + + map.zoomTo(2); + map.zoomIn(); + map.zoomOut(); + map.zoomIn(); + t.delay_call(2, function() { + t.eq(map.getZoom(), 3, '[fractionalZoom: false] zoomTo(2) - zoomIn() - zoomOut() - zoomIn()'); + + // now allow fractional zoom + map.fractionalZoom = true; + + map.zoomTo(2.6); + map.zoomIn(); + map.zoomOut(); + map.zoomIn(); + }); + t.delay_call(4, function() { + t.eq(map.getZoom(), 3.6, '[fractionalZoom: true] zoomTo(2) - zoomIn() - zoomOut() - zoomIn()'); + map.destroy(); + }); + + } + function test_Map_getUnits(t) { t.plan(2); var map = new OpenLayers.Map("map"); @@ -2166,6 +2200,24 @@ var center = map.getCenter(); t.ok(center.equals(new OpenLayers.LonLat(-13.25, 56)), "Center is correct and not equal to maxExtent's center"); } + + function test_getZoomTargetCenter(t) { + t.plan(1); + var map = new OpenLayers.Map({ + div: 'map', + layers: [ + new OpenLayers.Layer('', {isBaseLayer: true}) + ], + center: [0, 0], + zoom: 1 + }); + + var ll = map.getZoomTargetCenter({x: 44, y: 22}, map.getMaxResolution()); + + t.eq(ll.toShortString(), "180, -90", "getZoomTargetCenter works."); + + map.destroy(); + } function test_autoUpdateSize(t) { t.plan(1); diff --git a/tests/Strategy/BBOX.html b/tests/Strategy/BBOX.html index d45e8df068..6e409e6daf 100644 --- a/tests/Strategy/BBOX.html +++ b/tests/Strategy/BBOX.html @@ -51,7 +51,7 @@ }); // create a map with the layers and a center - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); map.addLayers([dummy, layer]); map.zoomToMaxExtent(); @@ -206,7 +206,7 @@ function test_resFactor(t) { t.plan(2); - var map = new OpenLayers.Map("map"); + var map = new OpenLayers.Map("map", {zoomMethod: null}); var bbox = new OpenLayers.Strategy.BBOX(); var fakeProtocol = new OpenLayers.Protocol({ 'read': function() { diff --git a/tests/Strategy/Cluster.html b/tests/Strategy/Cluster.html index 05130bbfb7..d5f7a9b285 100644 --- a/tests/Strategy/Cluster.html +++ b/tests/Strategy/Cluster.html @@ -44,7 +44,8 @@ }); var map = new OpenLayers.Map('map', { resolutions: [4, 2, 1], - maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40) + maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40), + zoomMethod: null, }); map.addLayer(layer); From 1b2003a2b45986483236a8b1263d354a52466d9a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 23 Dec 2012 19:18:26 +0100 Subject: [PATCH 026/148] Recovering from merge conflicts --- lib/OpenLayers/Layer/Grid.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 46c640a5b6..f8ac39941f 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1143,11 +1143,16 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.loading = false; this.events.triggerEvent("loadend"); if(this.backBuffer) { - // the removal of the back buffer is delayed to prevent flash - // effects due to the animation of tile displaying + this._transitionElement = tile.imgDiv; + for (var i=this.transitionendEvents.length-1; i>=0; --i) { + OpenLayers.Event.observe(this._transitionElement, + this.transitionendEvents[i], + this._removeBackBuffer); + } + // the removal of the back buffer is delayed to prevent + // flash effects due to the animation of tile displaying this.backBufferTimerId = window.setTimeout( - OpenLayers.Function.bind(this.removeBackBuffer, this), - this.removeBackBufferDelay + this._removeBackBuffer, this.removeBackBufferDelay ); } } From 9788133b03970550dc712233631356a790b2f398 Mon Sep 17 00:00:00 2001 From: eykamp Date: Wed, 2 Jan 2013 15:36:17 +0100 Subject: [PATCH 027/148] Update notes/2.13.md --- notes/2.13.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notes/2.13.md b/notes/2.13.md index 8fdaf0a1d0..9de5f7626e 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -68,3 +68,7 @@ Corresponding issue/pull requests: # Different return type for OpenLayers.Format.WMSDescribeLayer The return type of WMSDescribeLayer format's `read` method was different from the one of the VersionedOGC format superclass. So it was changed from an array to an object with a layerDescriptions property that holds the array. For backwards compatibility, the object still has a length property and 0, ..., n properties with the previous array values. + +# Moved errorProperty from the base class to the parser + +This was necessary for WCS support because there are no properties in common between versions 1.0.0 and 1.1.0 that were appropriate for checking. The only existing code that this affected was WFS parsing. From 6ce72e9185ba7728b475bd3c90e7a66a4f8f27e2 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 8 Jan 2013 14:24:52 +0100 Subject: [PATCH 028/148] Adding TileManager to mobile build profile, and note in Map.js As suggested by @probins; see #702. --- build/mobile.cfg | 1 + lib/OpenLayers/Map.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/mobile.cfg b/build/mobile.cfg index bfe4543412..b41f0bd04c 100644 --- a/build/mobile.cfg +++ b/build/mobile.cfg @@ -29,6 +29,7 @@ OpenLayers/Protocol/HTTP.js OpenLayers/Protocol/WFS.js OpenLayers/Protocol/WFS/v1_0_0.js OpenLayers/Strategy/Fixed.js +OpenLayers/TileManager.js [exclude] diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index b4000c83c9..872e31cce5 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -375,7 +375,8 @@ OpenLayers.Map = OpenLayers.Class({ * APIProperty: tileManager * {} If configured at construction time, the map * will use the TileManager to queue image requests and to cache tile image - * elements. + * elements. Note: make sure that OpenLayers/TileManager.js is included in + * your build profile. */ tileManager: null, From 3b560538493c7f12d0f1d57fccbeba5c8b7eed07 Mon Sep 17 00:00:00 2001 From: Matt Priour Date: Tue, 8 Jan 2013 13:10:15 -0600 Subject: [PATCH 029/148] Use BaseTypes zeropad function in ArcGISCache tests --- tests/Layer/ArcGISCache.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/Layer/ArcGISCache.html b/tests/Layer/ArcGISCache.html index 0b54464493..b5ed5d5aaf 100644 --- a/tests/Layer/ArcGISCache.html +++ b/tests/Layer/ArcGISCache.html @@ -187,7 +187,9 @@ } /** - * Check our utility function for generating tile indexes against a file cache + * Check the utility function for generating tile indexes against a file cache + * This is already tested in BaseTypes test, but these are specific, + * common conversions that this class will rely on, so the tests are retained */ function test_Layer_ARCGISCACHE_zeroPad(t) { t.plan(4); @@ -195,10 +197,10 @@ var layer = new OpenLayers.Layer.ArcGISCache('test', null, { }); //some tile examples - t.ok('00000001' == layer.zeroPad(1, 8, 16), 'zeroPad should generate tile indexes properly '); - t.ok('00000020' == layer.zeroPad(32, 8, 16), 'zeroPad should generate tile indexes properly '); - t.ok('00000100' == layer.zeroPad(256, 8, 16), 'zeroPad should generate tile indexes properly '); - t.ok('00001000' == layer.zeroPad(4096, 8, 16), 'zeroPad should generate tile indexes properly '); + t.ok('00000001' == OpenLayers.Number.zeroPad(1, 8, 16), 'zeroPad should generate tile indexes properly '); + t.ok('00000020' == OpenLayers.Number.zeroPad(32, 8, 16), 'zeroPad should generate tile indexes properly '); + t.ok('00000100' == OpenLayers.Number.zeroPad(256, 8, 16), 'zeroPad should generate tile indexes properly '); + t.ok('00001000' == OpenLayers.Number.zeroPad(4096, 8, 16), 'zeroPad should generate tile indexes properly '); } /** From 774e9836310489b1ef499b9d7731cc5889601c0b Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 9 Jan 2013 14:38:18 +0100 Subject: [PATCH 030/148] Turning on GPU for the tiles only turns out to be faster Especially on iOS 6, this gives way better performance. And it does not seem to cause any additional flicker. --- examples/mobile-wmts-vienna.css | 9 +-------- theme/default/style.css | 9 +-------- theme/default/style.mobile.css | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index e2fbf7a3ee..48e83d8372 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -14,7 +14,7 @@ html, body, #map { } /* Turn on GPU support where available */ -.olMapViewport, .olMapViewport * { +.olTileImage { -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -o-transform: translateZ(0); @@ -29,13 +29,6 @@ html, body, #map { -ms-perspective: 1000; perspective: 1000; } -.olLayerDiv svg * { - -webkit-transform: none; - -moz-transform: none; - -o-transform: none; - -ms-transform: none; - transform: none; -} .olLayerGrid .olTileImage { -webkit-transition: opacity 0.2s linear; diff --git a/theme/default/style.css b/theme/default/style.css index 0b2a3cd566..398df4bff9 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -488,7 +488,7 @@ a.olControlZoomOut { } /* Turn on GPU support where available */ -.olMapViewport, .olMapViewport * { +.olTileImage { -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -o-transform: translateZ(0); @@ -503,13 +503,6 @@ a.olControlZoomOut { -ms-perspective: 1000; perspective: 1000; } -.olLayerDiv svg * { - -webkit-transform: none; - -moz-transform: none; - -o-transform: none; - -ms-transform: none; - transform: none; -} /* when replacing tiles, do not show tile and backbuffer at the same time */ .olTileImage.olTileReplacing { diff --git a/theme/default/style.mobile.css b/theme/default/style.mobile.css index 3c0f6eb83d..fadff9e416 100644 --- a/theme/default/style.mobile.css +++ b/theme/default/style.mobile.css @@ -50,7 +50,7 @@ div.olControlZoom a:hover { transition: opacity 0.2s linear; } /* Turn on GPU support where available */ -.olMapViewport, .olMapViewport * { +.olTileImage { -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -o-transform: translateZ(0); @@ -65,10 +65,3 @@ div.olControlZoom a:hover { -ms-perspective: 1000; perspective: 1000; } -.olLayerDiv svg * { - -webkit-transform: none; - -moz-transform: none; - -o-transform: none; - -ms-transform: none; - transform: none; -} From b54faf222c02537b2bb5bf94da96f29d82cf6525 Mon Sep 17 00:00:00 2001 From: Matthew Perry Date: Thu, 10 Jan 2013 10:45:02 -0800 Subject: [PATCH 031/148] guard against null tileInfo --- lib/OpenLayers/Layer/UTFGrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/UTFGrid.js b/lib/OpenLayers/Layer/UTFGrid.js index 587047b1ba..c4534a06c7 100644 --- a/lib/OpenLayers/Layer/UTFGrid.js +++ b/lib/OpenLayers/Layer/UTFGrid.js @@ -148,7 +148,7 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.XYZ, { getFeatureInfo: function(location) { var info = null; var tileInfo = this.getTileData(location); - if (tileInfo.tile) { + if (tileInfo && tileInfo.tile) { info = tileInfo.tile.getFeatureInfo(tileInfo.i, tileInfo.j); } return info; From aa6c5b8a35269175c2c5093927e604a4b908bc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Thu, 10 Jan 2013 21:30:09 +0100 Subject: [PATCH 032/148] Default fallThrough to false Default behaviour in OpenLayers 2.12 is to swallow events, even though the documentation says otherwise. --- lib/OpenLayers/Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 872e31cce5..fae33ea086 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -384,9 +384,9 @@ OpenLayers.Map = OpenLayers.Class({ * APIProperty: fallThrough * {Boolean} Should OpenLayers allow events on the map to fall through to * other elements on the page, or should it swallow them? (#457) - * Default is to fall through. + * Default is to swallow. */ - fallThrough: true, + fallThrough: false, /** * APIProperty: autoUpdateSize From 58e33601bab85faeb98666990e465fb7401ff3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Thu, 10 Jan 2013 22:00:48 +0100 Subject: [PATCH 033/148] Update notes/2.13.md --- notes/2.13.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/notes/2.13.md b/notes/2.13.md index 18fc3d833a..84eb0a68cc 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -68,6 +68,19 @@ Corresponding issue/pull requests: * https://github.com/openlayers/openlayers/pull/423 +## Map property fallThrough defaults to false + +The behaviour controlled by map property fallThrough wasn't consistent and changes +has been made to fix that. The change means that some events will fall through as +was intended with fallThrough set to true. Defaulting fallThrough to false after +this change is sensible in most situations and will probably be what most +applications expect, but if you previously relied on events beeing passed through +you will probably want to set fallThrough to true. + +Behavioural change was made in this commit: + +* https://github.com/openlayers/openlayers/commit/a6119f6a7528e013b922fd0d997a07df13f6bd6e + # New Options for Build Script * add the contents of a file as a comment at the front of the build, for example, the output of 'git describe --tags' could be saved as a file and then included From 3107751fb79127c2495e0d7f7c097976fa4aad4f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 10 Jan 2013 22:12:35 +0100 Subject: [PATCH 034/148] Clarifications on fallThorugh (see #829) --- notes/2.13.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/notes/2.13.md b/notes/2.13.md index 84eb0a68cc..dd3ca649a1 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -70,12 +70,7 @@ Corresponding issue/pull requests: ## Map property fallThrough defaults to false -The behaviour controlled by map property fallThrough wasn't consistent and changes -has been made to fix that. The change means that some events will fall through as -was intended with fallThrough set to true. Defaulting fallThrough to false after -this change is sensible in most situations and will probably be what most -applications expect, but if you previously relied on events beeing passed through -you will probably want to set fallThrough to true. +The behaviour controlled by map property fallThrough wasn't consistent (some events were swallowed even with fallThrough set to true) and changes have been made to fix that. Defaulting fallThrough to false after this change is sensible in most situations and will probably be what most applications expect, but if you previously relied on pointer or keyboard events being passed through you will probably want to set fallThrough to true. Behavioural change was made in this commit: From 2cd14dfbfd5792ddfc4437edbfed925c73188296 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 15 Jan 2013 13:08:48 +0100 Subject: [PATCH 035/148] No .olTileReplacing class for singleTile layers This fixes a regression for singleTile layers with transitionEffect set to 'resize', where the .olTileReplacing class was not removed from the tile. --- lib/OpenLayers/Layer/Grid.js | 4 ++-- tests/Layer/Grid.html | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index f01d0b1885..b1b96031cd 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1080,7 +1080,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { } this.events.triggerEvent("tileloadstart", {tile: tile}); this.numLoadingTiles++; - if (this.backBuffer && this.gridResolution === this.backBufferResolution) { + if (!this.singleTile && this.backBuffer && this.gridResolution === this.backBufferResolution) { OpenLayers.Element.addClass(tile.imgDiv, replacingCls); } }; @@ -1092,7 +1092,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { tile: tile, aborted: aborted }); - if (!aborted && this.backBuffer && this.gridResolution === this.backBufferResolution) { + if (!this.singleTile && !aborted && this.backBuffer && this.gridResolution === this.backBufferResolution) { if (OpenLayers.Element.getStyle(tile.imgDiv, 'display') === 'none') { var bufferTile = document.getElementById(tile.id + '_bb'); if (bufferTile) { diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 2bdd5d79f6..97a191f96b 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1150,6 +1150,23 @@ }); } + function test_backbuffer_replace_singleTile(t) { + t.plan(1); + var map = new OpenLayers.Map('map'); + var layer = new OpenLayers.Layer.WMS('', '../../img/blank.gif', null, { + singleTile: true, + transitionEffect: 'resize' + }); + map.addLayer(layer); + map.zoomToMaxExtent(); + + t.delay_call(1, function() { + map.zoomIn(); + var tile = layer.grid[0][0]; + t.ok(!OpenLayers.Element.hasClass(tile.imgDiv, 'olTileReplacing'), 'tile is not marked for being replaced for singleTile layers'); + }); + } + function test_singleTile_move_and_zoom(t) { // From fde7c5cc76e64c1418306df7fcb20a2701004a24 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 15 Jan 2013 13:41:26 +0100 Subject: [PATCH 036/148] After #829 fallThrough needs to be true for this test --- tests/Handler/Pinch.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Handler/Pinch.html b/tests/Handler/Pinch.html index 4686447dbf..c4883dfc67 100644 --- a/tests/Handler/Pinch.html +++ b/tests/Handler/Pinch.html @@ -97,7 +97,7 @@ function test_callbacks(t) { t.plan(32); - var map = new OpenLayers.Map('map', {controls: []}); + var map = new OpenLayers.Map('map', {controls: [], fallThrough: true}); var control = new OpenLayers.Control(); map.addControl(control); From e23c18a09c9ccd7a5d7c8947e9adb1a0a679d4aa Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 16 Jan 2013 12:09:37 +0100 Subject: [PATCH 037/148] Process queue immediately when params change This fixes an issue where the queue would never be processed when a layer is updated using mergeNewParams. --- lib/OpenLayers/TileManager.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index a34e9e30ba..1eee6a1e20 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -114,6 +114,7 @@ OpenLayers.TileManager = OpenLayers.Class({ map.events.on({ move: this.move, zoomend: this.zoomEnd, + changelayer: this.changeLayer, addlayer: this.addLayer, preremovelayer: this.removeLayer, scope: this @@ -141,6 +142,7 @@ OpenLayers.TileManager = OpenLayers.Class({ map.events.un({ move: this.move, zoomend: this.zoomEnd, + changelayer: this.changeLayer, addlayer: this.addLayer, preremovelayer: this.removeLayer, scope: this @@ -173,6 +175,19 @@ OpenLayers.TileManager = OpenLayers.Class({ this.updateTimeout(evt.object, this.zoomDelay); }, + /** + * Method: changeLayer + * Handles the map's changeLayer event + * + * Parameters: + * evt - {Object} Listener argument + */ + changeLayer: function(evt) { + if (evt.property === 'params') { + this.updateTimeout(evt.object, 0); + } + }, + /** * Method: addLayer * Handles the map's addlayer event From d7f013ddbd71525e850c81dc17207faf6bd65828 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Wed, 16 Jan 2013 16:26:51 +0100 Subject: [PATCH 038/148] when cloning a layer that is loading, make sure numLoadingTiles is reset to 0 on the clone --- lib/OpenLayers/Layer/Grid.js | 1 + tests/Layer/Grid.html | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index b1b96031cd..96a5f8f394 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -428,6 +428,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { obj.backBuffer = null; obj.backBufferTimerId = null; obj.loading = false; + obj.numLoadingTiles = 0; return obj; }, diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 97a191f96b..4296aba64a 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -390,7 +390,7 @@ */ function test_Layer_Grid_clone(t) { - t.plan(6); + t.plan(7); var options = {tileSize: new OpenLayers.Size(500,50)}; var map = new OpenLayers.Map('map', options); @@ -400,8 +400,10 @@ layer.grid = [ [6, 7], [8, 9]]; + // if we clone when tiles are still loading, this should not influence the clone + layer.numLoadingTiles = 1; var clone = layer.clone(); - + t.eq( clone.numLoadingTiles, 0, "numLoadingTiles should be reset"); t.ok( clone.grid != layer.grid, "clone does not copy grid"); t.ok( clone.grid.length == 0, "clone creates a new array instead"); From c742c14a52ddc30521b1dd77e63564c03ad3b574 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 17 Jan 2013 16:24:15 +0100 Subject: [PATCH 039/148] Safeguard against listeners that recreate the grid We need to handle the backbuffer before we fire the loadend event. Otherwise listeners that call e.g. mergeNewParams() will cause the backbuffer removal code to fail, because tile.imgDiv (and hence this._transitionElement) will be null. --- lib/OpenLayers/Layer/Grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 96a5f8f394..6989594fa3 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1104,8 +1104,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { } //if that was the last tile, then trigger a 'loadend' on the layer if (this.numLoadingTiles === 0) { - this.loading = false; - this.events.triggerEvent("loadend"); if(this.backBuffer) { this._transitionElement = tile.imgDiv; for (var i=this.transitionendEvents.length-1; i>=0; --i) { @@ -1119,6 +1117,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this._removeBackBuffer, this.removeBackBufferDelay ); } + this.loading = false; + this.events.triggerEvent("loadend"); } }; From 459e38c2d69e82f1258bf6b06a3ae7c0182a4dbc Mon Sep 17 00:00:00 2001 From: Christopher Eykamp Date: Fri, 18 Jan 2013 15:54:38 +0100 Subject: [PATCH 040/148] Update tests --- tests/Format/WMSCapabilities/v1_1_1.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Format/WMSCapabilities/v1_1_1.html b/tests/Format/WMSCapabilities/v1_1_1.html index e3b0863624..cf79a3b3f1 100644 --- a/tests/Format/WMSCapabilities/v1_1_1.html +++ b/tests/Format/WMSCapabilities/v1_1_1.html @@ -235,8 +235,6 @@ t.eq(elevation.values, ["0","1000","3000","5000","10000"], "Parsing of comma-separated values done correctly"); - - } function test_contactinfo(t) { From 5bb5530fd719d9e532df1a6f1ac5096042017b72 Mon Sep 17 00:00:00 2001 From: Christopher Eykamp Date: Fri, 18 Jan 2013 15:58:49 +0100 Subject: [PATCH 041/148] Added tests --- tests/Format/WMSCapabilities/v1_1_1.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/Format/WMSCapabilities/v1_1_1.html b/tests/Format/WMSCapabilities/v1_1_1.html index cf79a3b3f1..bd231095db 100644 --- a/tests/Format/WMSCapabilities/v1_1_1.html +++ b/tests/Format/WMSCapabilities/v1_1_1.html @@ -238,7 +238,7 @@ } function test_contactinfo(t) { - t.plan(15); + t.plan(18); var xml = document.getElementById("ogcsample").firstChild.nodeValue; var doc = new OpenLayers.Format.XML().read(xml); @@ -246,6 +246,10 @@ var obj = new OpenLayers.Format.WMSCapabilities().read(doc); var service = obj.service; + t.eq(personPrimary.name, "OGC:WMS", "name parsed correctly"); + t.eq(personPrimary.title, "Acme Corp. Map Server", "title parsed correctly"); + t.eq(personPrimary.abstract, "WMT Map Server maintained by Acme Corporation. Contact: webmaster@wmt.acme.com. High-quality maps showing roadrunner nests and possible ambush locations.", "abstract parsed correctly"); + var contactinfo = service.contactInformation; t.ok(contactinfo, "object contains contactInformation property"); From 549c97063b126ba7c17de43a4c1ef75a04e28390 Mon Sep 17 00:00:00 2001 From: Luiz Fernando Barbosa Vital Date: Tue, 22 Jan 2013 12:22:54 -0200 Subject: [PATCH 042/148] Adjust language code from 'pt-br' to 'pt-BR' Portuguese Brazilian translations were not loaded due to this. --- lib/OpenLayers/Lang/pt-BR.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Lang/pt-BR.js b/lib/OpenLayers/Lang/pt-BR.js index e7e75110eb..60e6779c81 100644 --- a/lib/OpenLayers/Lang/pt-BR.js +++ b/lib/OpenLayers/Lang/pt-BR.js @@ -13,7 +13,7 @@ * . Entry bodies are normal strings or * strings formatted for use with calls. */ -OpenLayers.Lang["pt-br"] = OpenLayers.Util.applyDefaults({ +OpenLayers.Lang["pt-BR"] = OpenLayers.Util.applyDefaults({ 'unhandledRequest': "A requisição retornou um erro não tratado: ${statusText}", From da62be0137bd78606f0cc7951cde16bae15ee514 Mon Sep 17 00:00:00 2001 From: Christopher Eykamp Date: Tue, 22 Jan 2013 15:44:19 +0100 Subject: [PATCH 043/148] Fix irregular character that Ruby/Rails objects to --- lib/OpenLayers/Marker/Box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Marker/Box.js b/lib/OpenLayers/Marker/Box.js index 5b100a8400..c3086bfe78 100644 --- a/lib/OpenLayers/Marker/Box.js +++ b/lib/OpenLayers/Marker/Box.js @@ -81,7 +81,7 @@ OpenLayers.Marker.Box = OpenLayers.Class(OpenLayers.Marker, { * sz - {} * * Returns: - * {DOMElement} A new DOM Image with this marker´s icon set at the + * {DOMElement} A new DOM Image with this marker's icon set at the * location passed-in */ draw: function(px, sz) { From c179c8493b09f0bb9839bb91122dc2581243896e Mon Sep 17 00:00:00 2001 From: Christopher Eykamp Date: Tue, 22 Jan 2013 15:50:19 +0100 Subject: [PATCH 044/148] Simplify pull request --- tests/Format/WMSCapabilities/v1_1_1.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/Format/WMSCapabilities/v1_1_1.html b/tests/Format/WMSCapabilities/v1_1_1.html index bd231095db..e3b0863624 100644 --- a/tests/Format/WMSCapabilities/v1_1_1.html +++ b/tests/Format/WMSCapabilities/v1_1_1.html @@ -235,10 +235,12 @@ t.eq(elevation.values, ["0","1000","3000","5000","10000"], "Parsing of comma-separated values done correctly"); + + } function test_contactinfo(t) { - t.plan(18); + t.plan(15); var xml = document.getElementById("ogcsample").firstChild.nodeValue; var doc = new OpenLayers.Format.XML().read(xml); @@ -246,10 +248,6 @@ var obj = new OpenLayers.Format.WMSCapabilities().read(doc); var service = obj.service; - t.eq(personPrimary.name, "OGC:WMS", "name parsed correctly"); - t.eq(personPrimary.title, "Acme Corp. Map Server", "title parsed correctly"); - t.eq(personPrimary.abstract, "WMT Map Server maintained by Acme Corporation. Contact: webmaster@wmt.acme.com. High-quality maps showing roadrunner nests and possible ambush locations.", "abstract parsed correctly"); - var contactinfo = service.contactInformation; t.ok(contactinfo, "object contains contactInformation property"); From 17930432c754eb04869709ef7f4ffc4640707856 Mon Sep 17 00:00:00 2001 From: Matt Priour Date: Tue, 22 Jan 2013 10:06:28 -0600 Subject: [PATCH 045/148] Don't hex encode zoom level in AGSCache layer --- lib/OpenLayers/Layer/ArcGISCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/ArcGISCache.js b/lib/OpenLayers/Layer/ArcGISCache.js index 228e90dbfb..b9671d35f4 100644 --- a/lib/OpenLayers/Layer/ArcGISCache.js +++ b/lib/OpenLayers/Layer/ArcGISCache.js @@ -459,7 +459,7 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, { // The tile images are stored using hex values on disk. x = 'C' + OpenLayers.Number.zeroPad(x, 8, 16); y = 'R' + OpenLayers.Number.zeroPad(y, 8, 16); - z = 'L' + OpenLayers.Number.zeroPad(z, 2, 16); + z = 'L' + OpenLayers.Number.zeroPad(z, 2, 10); url = url + '/${z}/${y}/${x}.' + this.type; } From dea7438850122b93054d43f03027f325891b2d0d Mon Sep 17 00:00:00 2001 From: ejn Date: Mon, 28 Jan 2013 10:14:51 +0100 Subject: [PATCH 046/148] Clear cached mousedown/up positions used for distinguishing between drag and click in feature handler after a click event. Fixes #856 --- lib/OpenLayers/Handler/Feature.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 63d64b1f63..a3f2d4ae82 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -353,6 +353,11 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { if(dpx <= this.clickTolerance) { this.callback(key, args); } + // we're done with this set of events now: clear the cached + // positions so we can't trip over them later (this can occur + // if one of the up/down events gets eaten before it gets to us + // but we still get the click) + this.up = this.down = null; } else { this.callback(key, args); } From 364d371f10db2931da8336377ad9659b802b49ca Mon Sep 17 00:00:00 2001 From: ejn Date: Mon, 28 Jan 2013 16:16:16 +0100 Subject: [PATCH 047/148] Add unit test for cleared cache, and adjust existing unit test which assumed cached position --- tests/Handler/Feature.html | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/tests/Handler/Feature.html b/tests/Handler/Feature.html index 7c768e1a69..580d419d70 100644 --- a/tests/Handler/Feature.html +++ b/tests/Handler/Feature.html @@ -564,10 +564,10 @@ handler = new OpenLayers.Handler.Feature( control, layer, callbacks, {clickTolerance: 4}); handler.activate(); - handler.down = {x: 0, y: 0}; // distance between down and up is 1, which is // lower than clickTolerance so "click" should trigger + handler.down = {x: 0, y: 0}; handler.up = {x: 1, y: 0}; clicks = 0; map.events.triggerEvent("click", evtPx); @@ -575,6 +575,7 @@ // distance between down and up is 4, which is // equal to clickTolerance so "click" should trigger + handler.down = {x: 0, y: 0}; // cached handler.down cleared (#857) handler.up = {x: 0, y: 4}; clicks = 0; map.events.triggerEvent("click", evtPx); @@ -582,6 +583,7 @@ // distance between down and up is 5, which is // greater than clickTolerance so "click" should not trigger + handler.down = {x: 0, y: 0}; // cached handler.down cleared (#857) handler.up = {x: 5, y: 0}; clicks = 0; map.events.triggerEvent("click", evtPx); @@ -660,6 +662,36 @@ } + function test_clear_event_position_cache(t) { + t.plan(2); + + var map, control, layer, feature, evtPx; + + map = new OpenLayers.Map('map', {controls: []}); + control = new OpenLayers.Control(); + map.addControl(control); + layer = new OpenLayers.Layer(); + layer.getFeatureFromEvent = function(evt) { return feature; }; + map.addLayer(layer); + feature = new OpenLayers.Feature.Vector(); + feature.layer = layer; + + evtPx = { + xy: new OpenLayers.Pixel(Math.random(), Math.random()), + type: "click" + }; + + handler = new OpenLayers.Handler.Feature( + control, layer, {}, {}); + handler.activate(); + + handler.down = {x: 0, y: 0}; + handler.up = {x: 1, y: 0}; + map.events.triggerEvent("click", evtPx); + t.eq(handler.down, null, "cached mousedown position is cleared after handling click"); + t.eq(handler.up, null, "cached mouseup position is cleared after handling click") + } + From c7a4045e8867d5d418a869729c998be77e871ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 30 Jan 2013 15:25:34 +0100 Subject: [PATCH 048/148] Make click handler propagate touchend This commit is a follow-up on issue #294 and commit a6119f6. Our handlers should not prevent the bubbling up of browser events. This, for example, prevents Sencha Touch's longpress events from working properly. --- lib/OpenLayers/Handler/Click.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/Click.js b/lib/OpenLayers/Handler/Click.js index a214373604..a54b1b7694 100644 --- a/lib/OpenLayers/Handler/Click.js +++ b/lib/OpenLayers/Handler/Click.js @@ -352,7 +352,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, { // touch device, no dblclick event - this may be a double if (this["double"]) { // on Android don't let the browser zoom on the page - OpenLayers.Event.stop(evt); + OpenLayers.Event.preventDefault(evt); } this.handleDouble(evt); } From 378a0e97b54001d345dd954b8463a833d85ddb2e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 1 Feb 2013 00:58:40 +0100 Subject: [PATCH 049/148] Uncache images that are no longer valid When a layer sets a cached image's className to something else than .olTileImage (e.g. by setting .olTileReplacing), we should not keep the image in the cache any more, because it may no longer be valid. --- lib/OpenLayers/TileManager.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index 1eee6a1e20..7820e74029 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -315,9 +315,16 @@ OpenLayers.TileManager = OpenLayers.Class({ var tile = evt.object; var queued = false; var layer = tile.layer; + var url = layer.getURL(tile.bounds); + var img = this.tileCache[url]; + if (img && img.className !== 'olTileImage') { + // cached image no longer valid, e.g. because we're olTileReplacing + delete this.tileCache[url]; + OpenLayers.Util.removeItem(this.tileCacheIndex, url); + img = null; + } // queue only if image with same url not cached already - if (layer.url && (layer.async || - !this.tileCache[layer.getURL(tile.bounds)])) { + if (layer.url && (layer.async || !img)) { // add to queue only if not in queue already var tileQueue = this.tileQueue[layer.map.id]; if (!~OpenLayers.Util.indexOf(tileQueue, tile)) { From 84e36dd57367fdbda9c82c9eba5228f80f625faa Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 4 Feb 2013 15:46:45 -0700 Subject: [PATCH 050/148] Avoid touching the geolocation object until needed IE9 leaks when `navigator.geolocation` is accessed (see #461). The goal of this change is to avoid that leak in builds that include the Geolocate control but do not use it. --- lib/OpenLayers/Control/Geolocate.js | 13 ++++++++++++- tests/Control/Geolocate.html | 12 ------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/OpenLayers/Control/Geolocate.js b/lib/OpenLayers/Control/Geolocate.js index f2fcb91910..4b5b43958e 100644 --- a/lib/OpenLayers/Control/Geolocate.js +++ b/lib/OpenLayers/Control/Geolocate.js @@ -45,8 +45,15 @@ OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, { /** * Property: geolocation * {Object} The geolocation engine, as a property to be possibly mocked. + * This is set lazily to avoid a memory leak in IE9. */ - geolocation: navigator.geolocation, + geolocation: null, + + /** + * Property: available + * {Boolean} The navigator.geolocation object is available. + */ + available: ('geolocation' in navigator), /** * APIProperty: bind @@ -90,6 +97,10 @@ OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, { * {Boolean} The control was effectively activated. */ activate: function () { + if (this.available && !this.geolocation) { + // set lazily to avoid IE9 memory leak + this.geolocation = navigator.geolocation; + } if (!this.geolocation) { this.events.triggerEvent("locationuncapable"); return false; diff --git a/tests/Control/Geolocate.html b/tests/Control/Geolocate.html index aa12c0452d..4e43f39945 100644 --- a/tests/Control/Geolocate.html +++ b/tests/Control/Geolocate.html @@ -101,18 +101,6 @@ map.removeControl(control); map.setCenter(centerLL); } - function test_uncapable(t) { - t.plan(1); - var control = new OpenLayers.Control.Geolocate({ - geolocation: null, - bind: false - }); - control.events.register('locationuncapable', null, function() { - t.ok(true,'uncapable browser fired locationuncapable event'); - }); - map.addControl(control); - control.activate(); - } function test_destroy(t) { t.plan(1); var control = new OpenLayers.Control.Geolocate({ From 23355abb4292346a3964a6f6667456495cac46ab Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 09:35:53 +0100 Subject: [PATCH 051/148] Make 'geodesic' & 'displaySystem' API properties. The geodesic-property is used inside of our examples, yet isn't officially part of the public API. The displaySystem-property provides a very useful way of configuring the output of the measurements and should be promoted as well. --- lib/OpenLayers/Control/Measure.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/Measure.js b/lib/OpenLayers/Control/Measure.js index f37683c0be..39cae06bc8 100644 --- a/lib/OpenLayers/Control/Measure.js +++ b/lib/OpenLayers/Control/Measure.js @@ -49,14 +49,14 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { callbacks: null, /** - * Property: displaySystem + * APIProperty: displaySystem * {String} Display system for output measurements. Supported values * are 'english', 'metric', and 'geographic'. Default is 'metric'. */ displaySystem: 'metric', /** - * Property: geodesic + * APIProperty: geodesic * {Boolean} Calculate geodesic metrics instead of planar metrics. This * requires that geometries can be transformed into Geographic/WGS84 * (if that is not already the map projection). Default is false. From cbc705bdf7abad0de6c7b800b3c0ffd84a4b59ab Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 09:42:52 +0100 Subject: [PATCH 052/148] Adjust method documentation. --- lib/OpenLayers/Control/Measure.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/Measure.js b/lib/OpenLayers/Control/Measure.js index 39cae06bc8..f0fb89d855 100644 --- a/lib/OpenLayers/Control/Measure.js +++ b/lib/OpenLayers/Control/Measure.js @@ -226,8 +226,10 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { * Method: measureImmediate * Called each time the measurement sketch is modified. * - * Parameters: point - {} The point at the - * mouseposition. feature - {} The sketch feature. + * Parameters: + * point - {} The point at the mouse position. + * feature - {} The sketch feature. + * drawing - {Boolean} Indicates whether we're currently drawing. */ measureImmediate : function(point, feature, drawing) { if (drawing && !this.handler.freehandMode(this.handler.evt)) { From 9f7a0ed4483a3c6b47e21136237ad812a860e5b1 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 09:44:04 +0100 Subject: [PATCH 053/148] Remove end-of-line whitespace. --- lib/OpenLayers/Control/Measure.js | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/OpenLayers/Control/Measure.js b/lib/OpenLayers/Control/Measure.js index f0fb89d855..03c22b8c1c 100644 --- a/lib/OpenLayers/Control/Measure.js +++ b/lib/OpenLayers/Control/Measure.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ @@ -17,7 +17,7 @@ */ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { - /** + /** * APIProperty: events * {} Events instance for listeners and triggering * control specific events. @@ -41,20 +41,20 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { * APIProperty: handlerOptions * {Object} Used to set non-default properties on the control's handler */ - + /** * Property: callbacks * {Object} The functions that are sent to the handler for callback */ callbacks: null, - + /** * APIProperty: displaySystem * {String} Display system for output measurements. Supported values * are 'english', 'metric', and 'geographic'. Default is 'metric'. */ displaySystem: 'metric', - + /** * APIProperty: geodesic * {Boolean} Calculate geodesic metrics instead of planar metrics. This @@ -62,7 +62,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { * (if that is not already the map projection). Default is false. */ geodesic: false, - + /** * Property: displaySystemUnits * {Object} Units for various measurement systems. Values are arrays @@ -111,10 +111,10 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { /** * Constructor: OpenLayers.Control.Measure - * + * * Parameters: - * handler - {} - * options - {Object} + * handler - {} + * options - {Object} */ initialize: function(handler, options) { OpenLayers.Control.prototype.initialize.apply(this, [options]); @@ -125,14 +125,14 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { } this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks); - // let the handler options override, so old code that passes 'persist' + // let the handler options override, so old code that passes 'persist' // directly to the handler does not need an update this.handlerOptions = OpenLayers.Util.extend( {persist: this.persist}, this.handlerOptions ); this.handler = new handler(this, this.callbacks, this.handlerOptions); }, - + /** * APIMethod: deactivate */ @@ -164,7 +164,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { delete this.callbacks.modify; } }, - + /** * Method: updateHandler * @@ -194,7 +194,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { this.cancelDelay(); this.measure(geometry, "measure"); }, - + /** * Method: measurePartial * Called each time a new point is added to the measurement sketch. @@ -225,7 +225,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { /** * Method: measureImmediate * Called each time the measurement sketch is modified. - * + * * Parameters: * point - {} The point at the mouse position. * feature - {} The sketch feature. @@ -272,7 +272,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { geometry: geometry }); }, - + /** * Method: getBestArea * Based on the returns the area of a geometry. @@ -296,7 +296,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { } return [area, unit]; }, - + /** * Method: getArea * @@ -323,7 +323,7 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { } return area; }, - + /** * Method: getBestLength * Based on the returns the length of a geometry. From 14a3afb6cfe7e466e1895351af051eaee829e937 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 10:06:19 +0100 Subject: [PATCH 054/148] Promote several properties to public API. The properties * layers * queryVisible * url * layerUrls * infoFormat * vendorParams * format * formatOptions should all be visible in the public API since they are essentially very convenient to use when customizing the control. --- lib/OpenLayers/Control/WMSGetFeatureInfo.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index acdce6a459..b827749488 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -65,7 +65,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { output: "features", /** - * Property: layers + * APIProperty: layers * {Array()} The layers to query for feature info. * If omitted, all map WMS layers with a url that matches this or * will be considered. @@ -73,21 +73,21 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { layers: null, /** - * Property: queryVisible + * APIProperty: queryVisible * {Boolean} If true, filter out hidden layers when searching the map for * layers to query. Default is false. */ queryVisible: false, /** - * Property: url + * APIProperty: url * {String} The URL of the WMS service to use. If not provided, the url * of the first eligible layer will be used. */ url: null, /** - * Property: layerUrls + * APIProperty: layerUrls * {Array(String)} Optional list of urls for layers that should be queried. * This can be used when the layer url differs from the url used for * making GetFeatureInfo requests (in the case of a layer using cached @@ -96,7 +96,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { layerUrls: null, /** - * Property: infoFormat + * APIProperty: infoFormat * {String} The mimetype to request from the server. If you are using * drillDown mode and have multiple servers that do not share a common * infoFormat, you can override the control's infoFormat by providing an @@ -105,7 +105,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { infoFormat: 'text/html', /** - * Property: vendorParams + * APIProperty: vendorParams * {Object} Additional parameters that will be added to the request, for * WMS implementations that support them. This could e.g. look like * (start code) @@ -117,14 +117,14 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { vendorParams: {}, /** - * Property: format + * APIProperty: format * {} A format for parsing GetFeatureInfo responses. * Default is . */ format: null, /** - * Property: formatOptions + * APIProperty: formatOptions * {Object} Optional properties to set on the format (if one is not provided * in the property. */ From a8d7d246e550a35e230e7db1837198017d6d6398 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 10:12:14 +0100 Subject: [PATCH 055/148] Reformat documentation to match surrounding doc. --- lib/OpenLayers/Control/WMSGetFeatureInfo.js | 30 +++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index b827749488..1bfea8f93b 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -49,18 +49,20 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { */ maxFeatures: 10, - /** APIProperty: clickCallback - * {String} The click callback to register in the - * {} object created when the hover - * option is set to false. Default is "click". + /** + * APIProperty: clickCallback + * {String} The click callback to register in the + * {} object created when the hover + * option is set to false. Default is "click". */ clickCallback: "click", - /** APIProperty: output - * {String} Either "features" or "object". When triggering a - * getfeatureinfo request should we pass on an array of features - * or an object with with a "features" property and other properties - * (such as the url of the WMS). Default is "features". + /** + * APIProperty: output + * {String} Either "features" or "object". When triggering a getfeatureinfo + * request should we pass on an array of features or an object with with + * a "features" property and other properties (such as the url of the + * WMS). Default is "features". */ output: "features", @@ -97,17 +99,17 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: infoFormat - * {String} The mimetype to request from the server. If you are using - * drillDown mode and have multiple servers that do not share a common - * infoFormat, you can override the control's infoFormat by providing an - * INFO_FORMAT parameter in your instance(s). + * {String} The mimetype to request from the server. If you are using + * drillDown mode and have multiple servers that do not share a common + * infoFormat, you can override the control's infoFormat by providing an + * INFO_FORMAT parameter in your instance(s). */ infoFormat: 'text/html', /** * APIProperty: vendorParams * {Object} Additional parameters that will be added to the request, for - * WMS implementations that support them. This could e.g. look like + * WMS implementations that support them. This could e.g. look like * (start code) * { * radius: 5 From 70ea8f6588d9d55cabb42e0c12059cb132dbc85f Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 10:17:06 +0100 Subject: [PATCH 056/148] Readd dangling space in header. This allows for easier search and replace operations. The space will eventually be removed in all files in a seperate commit. --- lib/OpenLayers/Control/Measure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Control/Measure.js b/lib/OpenLayers/Control/Measure.js index 03c22b8c1c..d1fce4a306 100644 --- a/lib/OpenLayers/Control/Measure.js +++ b/lib/OpenLayers/Control/Measure.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ From c5dbaf7cab0495f7fddec36b20edbc6a6db13519 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 10:13:57 +0100 Subject: [PATCH 057/148] Remove end-of-line whitespace. The license header is left untouched, to keep it the same in all files. A seperate commit will probably deal with this --- lib/OpenLayers/Control/WMSGetFeatureInfo.js | 68 ++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index 1bfea8f93b..c376063e9f 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -15,10 +15,10 @@ /** * Class: OpenLayers.Control.WMSGetFeatureInfo * The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map. The - * information may be in a display-friendly format such as HTML, or a machine-friendly format such - * as GML, depending on the server's capabilities and the client's configuration. This control - * handles click or hover events, attempts to parse the results using an OpenLayers.Format, and - * fires a 'getfeatureinfo' event with the click position, the raw body of the response, and an + * information may be in a display-friendly format such as HTML, or a machine-friendly format such + * as GML, depending on the server's capabilities and the client's configuration. This control + * handles click or hover events, attempts to parse the results using an OpenLayers.Format, and + * fires a 'getfeatureinfo' event with the click position, the raw body of the response, and an * array of features if it successfully read the response. * * Inherits from: @@ -56,7 +56,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * option is set to false. Default is "click". */ clickCallback: "click", - + /** * APIProperty: output * {String} Either "features" or "object". When triggering a getfeatureinfo @@ -65,7 +65,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * WMS). Default is "features". */ output: "features", - + /** * APIProperty: layers * {Array()} The layers to query for feature info. @@ -87,7 +87,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * of the first eligible layer will be used. */ url: null, - + /** * APIProperty: layerUrls * {Array(String)} Optional list of urls for layers that should be queried. @@ -105,7 +105,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * INFO_FORMAT parameter in your instance(s). */ infoFormat: 'text/html', - + /** * APIProperty: vendorParams * {Object} Additional parameters that will be added to the request, for @@ -117,14 +117,14 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * (end) */ vendorParams: {}, - + /** * APIProperty: format * {} A format for parsing GetFeatureInfo responses. * Default is . */ format: null, - + /** * APIProperty: formatOptions * {Object} Optional properties to set on the format (if one is not provided @@ -142,21 +142,21 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * } * (end) */ - + /** * Property: handler * {Object} Reference to the for this control */ handler: null, - + /** * Property: hoverRequest * {} contains the currently running hover request * (if any). */ hoverRequest: null, - - /** + + /** * APIProperty: events * {} Events instance for listeners and triggering * control specific events. @@ -168,7 +168,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * * Supported event types (in addition to those from ): * beforegetfeatureinfo - Triggered before the request is sent. - * The event object has an *xy* property with the position of the + * The event object has an *xy* property with the position of the * mouse click or hover event that triggers the request. * nogetfeatureinfo - no queryable layers were found. * getfeatureinfo - Triggered when a GetFeatureInfo response is received. @@ -186,20 +186,20 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * Constructor: * * Parameters: - * options - {Object} + * options - {Object} */ initialize: function(options) { options = options || {}; options.handlerOptions = options.handlerOptions || {}; OpenLayers.Control.prototype.initialize.apply(this, [options]); - + if(!this.format) { this.format = new OpenLayers.Format.WMSGetFeatureInfo( options.formatOptions ); } - + if(this.drillDown === true) { this.hover = false; } @@ -222,11 +222,11 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { }, /** - * Method: getInfoForClick + * Method: getInfoForClick * Called on click * * Parameters: - * evt - {} + * evt - {} */ getInfoForClick: function(evt) { this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy}); @@ -235,7 +235,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait"); this.request(evt.xy, {}); }, - + /** * Method: getInfoForHover * Pause callback for the hover handler @@ -286,7 +286,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { } return layers; }, - + /** * Method: urlMatches * Test to see if the provided url matches either the control or one @@ -385,7 +385,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * Method: getStyleNames * Gets the STYLES parameter for the layer. Make sure the STYLES parameter * matches the LAYERS parameter - * + * * Parameters: * layer - {} * @@ -413,12 +413,12 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { /** * Method: request * Sends a GetFeatureInfo request to the WMS - * + * * Parameters: * clickPosition - {} The position on the map where the * mouse event occurred. * options - {Object} additional options for this method. - * + * * Valid options: * - *hover* {Boolean} true if we do the request for the hover handler */ @@ -430,13 +430,13 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); return; } - + options = options || {}; if(this.drillDown === false) { var wmsOptions = this.buildWMSOptions(this.url, layers, - clickPosition, layers[0].params.FORMAT); + clickPosition, layers[0].params.FORMAT); var request = OpenLayers.Request.GET(wmsOptions); - + if (options.hover === true) { this.hoverRequest = request; } @@ -460,9 +460,9 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { var layers; for (var url in services) { layers = services[url]; - var wmsOptions = this.buildWMSOptions(url, layers, + var wmsOptions = this.buildWMSOptions(url, layers, clickPosition, layers[0].params.FORMAT); - OpenLayers.Request.GET(wmsOptions); + OpenLayers.Request.GET(wmsOptions); } } }, @@ -490,11 +490,11 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { // Reset the cursor. OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); }, - + /** * Method: handleResponse * Handler for the GetFeatureInfo response. - * + * * Parameters: * xy - {} The position on the map where the * mouse event occurred. @@ -502,7 +502,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { * url - {String} The url which was used for this request. */ handleResponse: function(xy, request, url) { - + var doc = request.responseXML; if(!doc || !doc.documentElement) { doc = request.responseText; @@ -520,7 +520,7 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { this._features = (this._features || []).concat(features); } if (this._requestCount === this._numRequests) { - this.triggerGetFeatureInfo(request, xy, this._features.concat()); + this.triggerGetFeatureInfo(request, xy, this._features.concat()); delete this._features; delete this._requestCount; delete this._numRequests; From a34e627b755be5abc154d0deaf15c106def7801b Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 10:33:20 +0100 Subject: [PATCH 058/148] Remove dangling space in license header. --- lib/OpenLayers.js | 2 +- lib/OpenLayers/BaseTypes.js | 2 +- lib/OpenLayers/BaseTypes/Bounds.js | 2 +- lib/OpenLayers/BaseTypes/Class.js | 2 +- lib/OpenLayers/BaseTypes/Element.js | 2 +- lib/OpenLayers/BaseTypes/LonLat.js | 2 +- lib/OpenLayers/BaseTypes/Pixel.js | 2 +- lib/OpenLayers/BaseTypes/Size.js | 2 +- lib/OpenLayers/Console.js | 2 +- lib/OpenLayers/Control.js | 2 +- lib/OpenLayers/Control/ArgParser.js | 2 +- lib/OpenLayers/Control/Attribution.js | 2 +- lib/OpenLayers/Control/Button.js | 2 +- lib/OpenLayers/Control/CacheRead.js | 2 +- lib/OpenLayers/Control/CacheWrite.js | 2 +- lib/OpenLayers/Control/DragFeature.js | 2 +- lib/OpenLayers/Control/DragPan.js | 2 +- lib/OpenLayers/Control/DrawFeature.js | 2 +- lib/OpenLayers/Control/EditingToolbar.js | 2 +- lib/OpenLayers/Control/GetFeature.js | 2 +- lib/OpenLayers/Control/Graticule.js | 2 +- lib/OpenLayers/Control/KeyboardDefaults.js | 2 +- lib/OpenLayers/Control/LayerSwitcher.js | 2 +- lib/OpenLayers/Control/Measure.js | 2 +- lib/OpenLayers/Control/ModifyFeature.js | 2 +- lib/OpenLayers/Control/NavToolbar.js | 2 +- lib/OpenLayers/Control/Navigation.js | 2 +- lib/OpenLayers/Control/NavigationHistory.js | 2 +- lib/OpenLayers/Control/OverviewMap.js | 2 +- lib/OpenLayers/Control/Pan.js | 2 +- lib/OpenLayers/Control/PanPanel.js | 2 +- lib/OpenLayers/Control/PanZoom.js | 2 +- lib/OpenLayers/Control/PanZoomBar.js | 2 +- lib/OpenLayers/Control/Panel.js | 2 +- lib/OpenLayers/Control/Permalink.js | 2 +- lib/OpenLayers/Control/SLDSelect.js | 2 +- lib/OpenLayers/Control/Scale.js | 2 +- lib/OpenLayers/Control/ScaleLine.js | 2 +- lib/OpenLayers/Control/SelectFeature.js | 2 +- lib/OpenLayers/Control/Snapping.js | 2 +- lib/OpenLayers/Control/Split.js | 2 +- lib/OpenLayers/Control/TransformFeature.js | 2 +- lib/OpenLayers/Control/UTFGrid.js | 2 +- lib/OpenLayers/Control/WMSGetFeatureInfo.js | 2 +- lib/OpenLayers/Control/WMTSGetFeatureInfo.js | 2 +- lib/OpenLayers/Control/Zoom.js | 2 +- lib/OpenLayers/Control/ZoomBox.js | 2 +- lib/OpenLayers/Control/ZoomIn.js | 2 +- lib/OpenLayers/Control/ZoomOut.js | 2 +- lib/OpenLayers/Control/ZoomPanel.js | 2 +- lib/OpenLayers/Control/ZoomToMaxExtent.js | 2 +- lib/OpenLayers/Events.js | 2 +- lib/OpenLayers/Events/buttonclick.js | 2 +- lib/OpenLayers/Feature.js | 2 +- lib/OpenLayers/Feature/Vector.js | 2 +- lib/OpenLayers/Filter.js | 2 +- lib/OpenLayers/Filter/Comparison.js | 2 +- lib/OpenLayers/Filter/FeatureId.js | 2 +- lib/OpenLayers/Filter/Function.js | 2 +- lib/OpenLayers/Filter/Logical.js | 2 +- lib/OpenLayers/Filter/Spatial.js | 2 +- lib/OpenLayers/Format.js | 2 +- lib/OpenLayers/Format/ArcXML.js | 2 +- lib/OpenLayers/Format/ArcXML/Features.js | 2 +- lib/OpenLayers/Format/Atom.js | 2 +- lib/OpenLayers/Format/CQL.js | 2 +- lib/OpenLayers/Format/CSWGetDomain.js | 2 +- lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js | 2 +- lib/OpenLayers/Format/CSWGetRecords.js | 2 +- lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js | 2 +- lib/OpenLayers/Format/Context.js | 2 +- lib/OpenLayers/Format/Filter.js | 2 +- lib/OpenLayers/Format/Filter/v1.js | 2 +- lib/OpenLayers/Format/Filter/v1_0_0.js | 2 +- lib/OpenLayers/Format/Filter/v1_1_0.js | 2 +- lib/OpenLayers/Format/GML.js | 2 +- lib/OpenLayers/Format/GML/Base.js | 2 +- lib/OpenLayers/Format/GML/v2.js | 2 +- lib/OpenLayers/Format/GML/v3.js | 2 +- lib/OpenLayers/Format/GPX.js | 2 +- lib/OpenLayers/Format/GeoJSON.js | 2 +- lib/OpenLayers/Format/GeoRSS.js | 2 +- lib/OpenLayers/Format/JSON.js | 2 +- lib/OpenLayers/Format/KML.js | 2 +- lib/OpenLayers/Format/OGCExceptionReport.js | 2 +- lib/OpenLayers/Format/OSM.js | 2 +- lib/OpenLayers/Format/OWSCommon.js | 2 +- lib/OpenLayers/Format/OWSCommon/v1.js | 2 +- lib/OpenLayers/Format/OWSCommon/v1_0_0.js | 2 +- lib/OpenLayers/Format/OWSCommon/v1_1_0.js | 2 +- lib/OpenLayers/Format/OWSContext.js | 2 +- lib/OpenLayers/Format/OWSContext/v0_3_1.js | 2 +- lib/OpenLayers/Format/QueryStringFilter.js | 2 +- lib/OpenLayers/Format/SLD.js | 2 +- lib/OpenLayers/Format/SLD/v1.js | 2 +- lib/OpenLayers/Format/SLD/v1_0_0.js | 2 +- lib/OpenLayers/Format/SLD/v1_0_0_GeoServer.js | 2 +- lib/OpenLayers/Format/SOSCapabilities.js | 2 +- lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js | 2 +- lib/OpenLayers/Format/SOSGetFeatureOfInterest.js | 2 +- lib/OpenLayers/Format/SOSGetObservation.js | 2 +- lib/OpenLayers/Format/Text.js | 2 +- lib/OpenLayers/Format/WCSCapabilities.js | 2 +- lib/OpenLayers/Format/WCSCapabilities/v1.js | 2 +- lib/OpenLayers/Format/WCSCapabilities/v1_0_0.js | 2 +- lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js | 2 +- lib/OpenLayers/Format/WCSGetCoverage.js | 2 +- lib/OpenLayers/Format/WFS.js | 2 +- lib/OpenLayers/Format/WFSCapabilities.js | 2 +- lib/OpenLayers/Format/WFSCapabilities/v1.js | 2 +- lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js | 2 +- lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js | 2 +- lib/OpenLayers/Format/WFSDescribeFeatureType.js | 2 +- lib/OpenLayers/Format/WFST.js | 2 +- lib/OpenLayers/Format/WFST/v1.js | 2 +- lib/OpenLayers/Format/WFST/v1_0_0.js | 2 +- lib/OpenLayers/Format/WFST/v1_1_0.js | 2 +- lib/OpenLayers/Format/WKT.js | 2 +- lib/OpenLayers/Format/WMC.js | 2 +- lib/OpenLayers/Format/WMC/v1.js | 2 +- lib/OpenLayers/Format/WMC/v1_0_0.js | 2 +- lib/OpenLayers/Format/WMC/v1_1_0.js | 2 +- lib/OpenLayers/Format/WMSCapabilities.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_1.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_3.js | 2 +- lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js | 2 +- lib/OpenLayers/Format/WMSDescribeLayer.js | 2 +- lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js | 2 +- lib/OpenLayers/Format/WMSGetFeatureInfo.js | 2 +- lib/OpenLayers/Format/WMTSCapabilities.js | 2 +- lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js | 2 +- lib/OpenLayers/Format/WPSCapabilities.js | 2 +- lib/OpenLayers/Format/WPSCapabilities/v1_0_0.js | 2 +- lib/OpenLayers/Format/WPSDescribeProcess.js | 2 +- lib/OpenLayers/Format/WPSExecute.js | 2 +- lib/OpenLayers/Format/XLS.js | 2 +- lib/OpenLayers/Format/XLS/v1.js | 2 +- lib/OpenLayers/Format/XLS/v1_1_0.js | 2 +- lib/OpenLayers/Format/XML.js | 2 +- lib/OpenLayers/Format/XML/VersionedOGC.js | 2 +- lib/OpenLayers/Geometry.js | 2 +- lib/OpenLayers/Geometry/Collection.js | 2 +- lib/OpenLayers/Geometry/Curve.js | 2 +- lib/OpenLayers/Geometry/LineString.js | 2 +- lib/OpenLayers/Geometry/LinearRing.js | 2 +- lib/OpenLayers/Geometry/MultiLineString.js | 2 +- lib/OpenLayers/Geometry/MultiPoint.js | 2 +- lib/OpenLayers/Geometry/MultiPolygon.js | 2 +- lib/OpenLayers/Geometry/Point.js | 2 +- lib/OpenLayers/Geometry/Polygon.js | 2 +- lib/OpenLayers/Handler.js | 2 +- lib/OpenLayers/Handler/Box.js | 2 +- lib/OpenLayers/Handler/Click.js | 2 +- lib/OpenLayers/Handler/Drag.js | 2 +- lib/OpenLayers/Handler/Feature.js | 2 +- lib/OpenLayers/Handler/Hover.js | 2 +- lib/OpenLayers/Handler/Keyboard.js | 2 +- lib/OpenLayers/Handler/MouseWheel.js | 2 +- lib/OpenLayers/Handler/Path.js | 2 +- lib/OpenLayers/Handler/Point.js | 2 +- lib/OpenLayers/Handler/Polygon.js | 2 +- lib/OpenLayers/Handler/RegularPolygon.js | 2 +- lib/OpenLayers/Icon.js | 2 +- lib/OpenLayers/Kinetic.js | 2 +- lib/OpenLayers/Lang.js | 2 +- lib/OpenLayers/Layer.js | 2 +- lib/OpenLayers/Layer/ArcGIS93Rest.js | 2 +- lib/OpenLayers/Layer/ArcIMS.js | 2 +- lib/OpenLayers/Layer/Bing.js | 2 +- lib/OpenLayers/Layer/Boxes.js | 2 +- lib/OpenLayers/Layer/EventPane.js | 2 +- lib/OpenLayers/Layer/FixedZoomLevels.js | 2 +- lib/OpenLayers/Layer/GeoRSS.js | 2 +- lib/OpenLayers/Layer/Google.js | 2 +- lib/OpenLayers/Layer/Google/v3.js | 2 +- lib/OpenLayers/Layer/Grid.js | 2 +- lib/OpenLayers/Layer/HTTPRequest.js | 2 +- lib/OpenLayers/Layer/Image.js | 2 +- lib/OpenLayers/Layer/KaMap.js | 2 +- lib/OpenLayers/Layer/KaMapCache.js | 2 +- lib/OpenLayers/Layer/MapGuide.js | 2 +- lib/OpenLayers/Layer/MapServer.js | 2 +- lib/OpenLayers/Layer/Markers.js | 2 +- lib/OpenLayers/Layer/OSM.js | 2 +- lib/OpenLayers/Layer/PointGrid.js | 2 +- lib/OpenLayers/Layer/PointTrack.js | 2 +- lib/OpenLayers/Layer/SphericalMercator.js | 2 +- lib/OpenLayers/Layer/TMS.js | 2 +- lib/OpenLayers/Layer/Text.js | 2 +- lib/OpenLayers/Layer/TileCache.js | 2 +- lib/OpenLayers/Layer/UTFGrid.js | 2 +- lib/OpenLayers/Layer/Vector.js | 2 +- lib/OpenLayers/Layer/Vector/RootContainer.js | 2 +- lib/OpenLayers/Layer/WMS.js | 2 +- lib/OpenLayers/Layer/WMTS.js | 2 +- lib/OpenLayers/Layer/WorldWind.js | 2 +- lib/OpenLayers/Layer/XYZ.js | 2 +- lib/OpenLayers/Layer/Zoomify.js | 2 +- lib/OpenLayers/Map.js | 2 +- lib/OpenLayers/Marker.js | 2 +- lib/OpenLayers/Marker/Box.js | 2 +- lib/OpenLayers/Popup.js | 2 +- lib/OpenLayers/Popup/Anchored.js | 2 +- lib/OpenLayers/Popup/AnchoredBubble.js | 2 +- lib/OpenLayers/Popup/Framed.js | 2 +- lib/OpenLayers/Popup/FramedCloud.js | 2 +- lib/OpenLayers/Projection.js | 2 +- lib/OpenLayers/Protocol.js | 2 +- lib/OpenLayers/Protocol/CSW.js | 2 +- lib/OpenLayers/Protocol/CSW/v2_0_2.js | 2 +- lib/OpenLayers/Protocol/HTTP.js | 2 +- lib/OpenLayers/Protocol/SOS.js | 2 +- lib/OpenLayers/Protocol/SOS/v1_0_0.js | 2 +- lib/OpenLayers/Protocol/Script.js | 2 +- lib/OpenLayers/Protocol/WFS.js | 2 +- lib/OpenLayers/Protocol/WFS/v1.js | 2 +- lib/OpenLayers/Protocol/WFS/v1_0_0.js | 2 +- lib/OpenLayers/Protocol/WFS/v1_1_0.js | 2 +- lib/OpenLayers/Renderer.js | 2 +- lib/OpenLayers/Renderer/Canvas.js | 2 +- lib/OpenLayers/Renderer/Elements.js | 2 +- lib/OpenLayers/Renderer/SVG.js | 2 +- lib/OpenLayers/Renderer/VML.js | 2 +- lib/OpenLayers/Request.js | 2 +- lib/OpenLayers/Rule.js | 2 +- lib/OpenLayers/SingleFile.js | 2 +- lib/OpenLayers/Strategy.js | 2 +- lib/OpenLayers/Strategy/BBOX.js | 2 +- lib/OpenLayers/Strategy/Cluster.js | 2 +- lib/OpenLayers/Strategy/Filter.js | 2 +- lib/OpenLayers/Strategy/Fixed.js | 2 +- lib/OpenLayers/Strategy/Paging.js | 2 +- lib/OpenLayers/Strategy/Refresh.js | 2 +- lib/OpenLayers/Strategy/Save.js | 2 +- lib/OpenLayers/Style.js | 2 +- lib/OpenLayers/Style2.js | 2 +- lib/OpenLayers/StyleMap.js | 2 +- lib/OpenLayers/Symbolizer.js | 2 +- lib/OpenLayers/Symbolizer/Line.js | 2 +- lib/OpenLayers/Symbolizer/Point.js | 2 +- lib/OpenLayers/Symbolizer/Polygon.js | 2 +- lib/OpenLayers/Symbolizer/Raster.js | 2 +- lib/OpenLayers/Symbolizer/Text.js | 2 +- lib/OpenLayers/Tile.js | 2 +- lib/OpenLayers/Tile/Image.js | 2 +- lib/OpenLayers/Tile/Image/IFrame.js | 2 +- lib/OpenLayers/Tile/UTFGrid.js | 2 +- lib/OpenLayers/TileManager.js | 2 +- lib/OpenLayers/Tween.js | 2 +- lib/OpenLayers/Util.js | 2 +- 254 files changed, 254 insertions(+), 254 deletions(-) diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index 05dc3fa7fb..e35dcfd1a3 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index 4755a2388e..9010251f23 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index cb83a3922d..f40ca231f9 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/Class.js b/lib/OpenLayers/BaseTypes/Class.js index 1bbceeaef8..2be7212994 100644 --- a/lib/OpenLayers/BaseTypes/Class.js +++ b/lib/OpenLayers/BaseTypes/Class.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/Element.js b/lib/OpenLayers/BaseTypes/Element.js index ccb9976a27..dc71b5c8ef 100644 --- a/lib/OpenLayers/BaseTypes/Element.js +++ b/lib/OpenLayers/BaseTypes/Element.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/LonLat.js b/lib/OpenLayers/BaseTypes/LonLat.js index f06a88f8b5..0780dc339d 100644 --- a/lib/OpenLayers/BaseTypes/LonLat.js +++ b/lib/OpenLayers/BaseTypes/LonLat.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/Pixel.js b/lib/OpenLayers/BaseTypes/Pixel.js index 08753090f4..d6ac60abff 100644 --- a/lib/OpenLayers/BaseTypes/Pixel.js +++ b/lib/OpenLayers/BaseTypes/Pixel.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes/Size.js b/lib/OpenLayers/BaseTypes/Size.js index ef5ae2740e..34c7a6c80b 100644 --- a/lib/OpenLayers/BaseTypes/Size.js +++ b/lib/OpenLayers/BaseTypes/Size.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Console.js b/lib/OpenLayers/Console.js index c0be882b16..ef5029aa40 100644 --- a/lib/OpenLayers/Console.js +++ b/lib/OpenLayers/Console.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control.js b/lib/OpenLayers/Control.js index 9fd154ad59..472a4e6e44 100644 --- a/lib/OpenLayers/Control.js +++ b/lib/OpenLayers/Control.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ArgParser.js b/lib/OpenLayers/Control/ArgParser.js index 3008532089..6b076f5736 100644 --- a/lib/OpenLayers/Control/ArgParser.js +++ b/lib/OpenLayers/Control/ArgParser.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Attribution.js b/lib/OpenLayers/Control/Attribution.js index 713e00680b..e5ea1ce6fb 100644 --- a/lib/OpenLayers/Control/Attribution.js +++ b/lib/OpenLayers/Control/Attribution.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Button.js b/lib/OpenLayers/Control/Button.js index 3d1536388c..830df6d69f 100644 --- a/lib/OpenLayers/Control/Button.js +++ b/lib/OpenLayers/Control/Button.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/CacheRead.js b/lib/OpenLayers/Control/CacheRead.js index 6b639f81f8..7768bce2db 100644 --- a/lib/OpenLayers/Control/CacheRead.js +++ b/lib/OpenLayers/Control/CacheRead.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/CacheWrite.js b/lib/OpenLayers/Control/CacheWrite.js index c937520baf..3d4ecf5156 100644 --- a/lib/OpenLayers/Control/CacheWrite.js +++ b/lib/OpenLayers/Control/CacheWrite.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/DragFeature.js b/lib/OpenLayers/Control/DragFeature.js index c634cde82e..d8fb15f9ea 100644 --- a/lib/OpenLayers/Control/DragFeature.js +++ b/lib/OpenLayers/Control/DragFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/DragPan.js b/lib/OpenLayers/Control/DragPan.js index 62d6059e3c..1b9bd1fab4 100644 --- a/lib/OpenLayers/Control/DragPan.js +++ b/lib/OpenLayers/Control/DragPan.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/DrawFeature.js b/lib/OpenLayers/Control/DrawFeature.js index 5afe2f8e13..b0afc71ac4 100644 --- a/lib/OpenLayers/Control/DrawFeature.js +++ b/lib/OpenLayers/Control/DrawFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/EditingToolbar.js b/lib/OpenLayers/Control/EditingToolbar.js index 89575e3fb7..ba7ca40109 100644 --- a/lib/OpenLayers/Control/EditingToolbar.js +++ b/lib/OpenLayers/Control/EditingToolbar.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/GetFeature.js b/lib/OpenLayers/Control/GetFeature.js index eea7a65512..144e87fc80 100644 --- a/lib/OpenLayers/Control/GetFeature.js +++ b/lib/OpenLayers/Control/GetFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Graticule.js b/lib/OpenLayers/Control/Graticule.js index a5a908a803..2fce50d4e7 100644 --- a/lib/OpenLayers/Control/Graticule.js +++ b/lib/OpenLayers/Control/Graticule.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/KeyboardDefaults.js b/lib/OpenLayers/Control/KeyboardDefaults.js index aab664e9e9..3af88317f0 100644 --- a/lib/OpenLayers/Control/KeyboardDefaults.js +++ b/lib/OpenLayers/Control/KeyboardDefaults.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index 6f5ab78ed6..67dc3f484a 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Measure.js b/lib/OpenLayers/Control/Measure.js index f37683c0be..968376e4c2 100644 --- a/lib/OpenLayers/Control/Measure.js +++ b/lib/OpenLayers/Control/Measure.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index ecda73a088..8882ae3065 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/NavToolbar.js b/lib/OpenLayers/Control/NavToolbar.js index 626b616476..b6bc2aa464 100644 --- a/lib/OpenLayers/Control/NavToolbar.js +++ b/lib/OpenLayers/Control/NavToolbar.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index 8c838dddb9..3073a94db6 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/NavigationHistory.js b/lib/OpenLayers/Control/NavigationHistory.js index 22aa72168d..bf2f95afa3 100644 --- a/lib/OpenLayers/Control/NavigationHistory.js +++ b/lib/OpenLayers/Control/NavigationHistory.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index 142cfaaae1..50b9300f05 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Pan.js b/lib/OpenLayers/Control/Pan.js index bc3d5759ed..d7fcc07c01 100644 --- a/lib/OpenLayers/Control/Pan.js +++ b/lib/OpenLayers/Control/Pan.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/PanPanel.js b/lib/OpenLayers/Control/PanPanel.js index b79f472c64..eeedbd0bce 100644 --- a/lib/OpenLayers/Control/PanPanel.js +++ b/lib/OpenLayers/Control/PanPanel.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/PanZoom.js b/lib/OpenLayers/Control/PanZoom.js index 4635384b56..dd007cf43b 100644 --- a/lib/OpenLayers/Control/PanZoom.js +++ b/lib/OpenLayers/Control/PanZoom.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 86ed201bf0..ebf29647b6 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Panel.js b/lib/OpenLayers/Control/Panel.js index 51b47b3905..150afa7063 100644 --- a/lib/OpenLayers/Control/Panel.js +++ b/lib/OpenLayers/Control/Panel.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Permalink.js b/lib/OpenLayers/Control/Permalink.js index 7ef003a81e..3d5d7a284d 100644 --- a/lib/OpenLayers/Control/Permalink.js +++ b/lib/OpenLayers/Control/Permalink.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/SLDSelect.js b/lib/OpenLayers/Control/SLDSelect.js index 56f5d3892a..cd348a79f9 100644 --- a/lib/OpenLayers/Control/SLDSelect.js +++ b/lib/OpenLayers/Control/SLDSelect.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Scale.js b/lib/OpenLayers/Control/Scale.js index 7e83075c93..c9f2d2b9f4 100644 --- a/lib/OpenLayers/Control/Scale.js +++ b/lib/OpenLayers/Control/Scale.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ScaleLine.js b/lib/OpenLayers/Control/ScaleLine.js index 984be3ec9f..926241425e 100644 --- a/lib/OpenLayers/Control/ScaleLine.js +++ b/lib/OpenLayers/Control/ScaleLine.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/SelectFeature.js b/lib/OpenLayers/Control/SelectFeature.js index b2d8f60594..5467267174 100644 --- a/lib/OpenLayers/Control/SelectFeature.js +++ b/lib/OpenLayers/Control/SelectFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Snapping.js b/lib/OpenLayers/Control/Snapping.js index 2abec96ef3..217311479e 100644 --- a/lib/OpenLayers/Control/Snapping.js +++ b/lib/OpenLayers/Control/Snapping.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Split.js b/lib/OpenLayers/Control/Split.js index e32b144db0..de19eb7ce6 100644 --- a/lib/OpenLayers/Control/Split.js +++ b/lib/OpenLayers/Control/Split.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/TransformFeature.js b/lib/OpenLayers/Control/TransformFeature.js index 52d18be8fa..8c2145649e 100644 --- a/lib/OpenLayers/Control/TransformFeature.js +++ b/lib/OpenLayers/Control/TransformFeature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/UTFGrid.js b/lib/OpenLayers/Control/UTFGrid.js index b5ec004d5a..799320110f 100644 --- a/lib/OpenLayers/Control/UTFGrid.js +++ b/lib/OpenLayers/Control/UTFGrid.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index acdce6a459..cbc3220d0a 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/WMTSGetFeatureInfo.js b/lib/OpenLayers/Control/WMTSGetFeatureInfo.js index cd73342319..c26f8f36ba 100644 --- a/lib/OpenLayers/Control/WMTSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMTSGetFeatureInfo.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/Zoom.js b/lib/OpenLayers/Control/Zoom.js index 9680f0a398..70140f46de 100644 --- a/lib/OpenLayers/Control/Zoom.js +++ b/lib/OpenLayers/Control/Zoom.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index ff4db5c5ad..d3ec81adf9 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomIn.js b/lib/OpenLayers/Control/ZoomIn.js index 735367d61f..8da1e1cf21 100644 --- a/lib/OpenLayers/Control/ZoomIn.js +++ b/lib/OpenLayers/Control/ZoomIn.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomOut.js b/lib/OpenLayers/Control/ZoomOut.js index d0a570a90a..72a657b335 100644 --- a/lib/OpenLayers/Control/ZoomOut.js +++ b/lib/OpenLayers/Control/ZoomOut.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomPanel.js b/lib/OpenLayers/Control/ZoomPanel.js index 22f7756ea2..147f6cb188 100644 --- a/lib/OpenLayers/Control/ZoomPanel.js +++ b/lib/OpenLayers/Control/ZoomPanel.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomToMaxExtent.js b/lib/OpenLayers/Control/ZoomToMaxExtent.js index 5553060969..bc2e75464a 100644 --- a/lib/OpenLayers/Control/ZoomToMaxExtent.js +++ b/lib/OpenLayers/Control/ZoomToMaxExtent.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index 74692a8775..8699601cef 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Events/buttonclick.js b/lib/OpenLayers/Events/buttonclick.js index aff5ceafea..40f29424d4 100644 --- a/lib/OpenLayers/Events/buttonclick.js +++ b/lib/OpenLayers/Events/buttonclick.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index d2f60f229d..ed7fd167aa 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index 30a496a45f..8b53112898 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter.js b/lib/OpenLayers/Filter.js index bbd8535ab9..99c0448189 100644 --- a/lib/OpenLayers/Filter.js +++ b/lib/OpenLayers/Filter.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter/Comparison.js b/lib/OpenLayers/Filter/Comparison.js index 368bce6934..6863ea8dc4 100644 --- a/lib/OpenLayers/Filter/Comparison.js +++ b/lib/OpenLayers/Filter/Comparison.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter/FeatureId.js b/lib/OpenLayers/Filter/FeatureId.js index 283bc42001..29276512d7 100644 --- a/lib/OpenLayers/Filter/FeatureId.js +++ b/lib/OpenLayers/Filter/FeatureId.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter/Function.js b/lib/OpenLayers/Filter/Function.js index ecd2685e18..0d5a7a9f61 100644 --- a/lib/OpenLayers/Filter/Function.js +++ b/lib/OpenLayers/Filter/Function.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter/Logical.js b/lib/OpenLayers/Filter/Logical.js index cf4b4125e6..4eac57994d 100644 --- a/lib/OpenLayers/Filter/Logical.js +++ b/lib/OpenLayers/Filter/Logical.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Filter/Spatial.js b/lib/OpenLayers/Filter/Spatial.js index a6d772f739..dd9e2a7c3e 100644 --- a/lib/OpenLayers/Filter/Spatial.js +++ b/lib/OpenLayers/Filter/Spatial.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format.js b/lib/OpenLayers/Format.js index a805a599e7..620ecc7e98 100644 --- a/lib/OpenLayers/Format.js +++ b/lib/OpenLayers/Format.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/ArcXML.js b/lib/OpenLayers/Format/ArcXML.js index e655f8f310..9d523d1c80 100644 --- a/lib/OpenLayers/Format/ArcXML.js +++ b/lib/OpenLayers/Format/ArcXML.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/ArcXML/Features.js b/lib/OpenLayers/Format/ArcXML/Features.js index 62d8b23ff5..5b8730d956 100644 --- a/lib/OpenLayers/Format/ArcXML/Features.js +++ b/lib/OpenLayers/Format/ArcXML/Features.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Atom.js b/lib/OpenLayers/Format/Atom.js index a999989b3c..8eb57922d3 100644 --- a/lib/OpenLayers/Format/Atom.js +++ b/lib/OpenLayers/Format/Atom.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/CQL.js b/lib/OpenLayers/Format/CQL.js index 33a92b0235..8430a8b51c 100644 --- a/lib/OpenLayers/Format/CQL.js +++ b/lib/OpenLayers/Format/CQL.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/CSWGetDomain.js b/lib/OpenLayers/Format/CSWGetDomain.js index 73327e803f..18d53284ae 100644 --- a/lib/OpenLayers/Format/CSWGetDomain.js +++ b/lib/OpenLayers/Format/CSWGetDomain.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js b/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js index 2cdaead723..78200eab75 100644 --- a/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js +++ b/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/CSWGetRecords.js b/lib/OpenLayers/Format/CSWGetRecords.js index dc8902c143..923c548739 100644 --- a/lib/OpenLayers/Format/CSWGetRecords.js +++ b/lib/OpenLayers/Format/CSWGetRecords.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js b/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js index d786d209cb..3c8761270e 100644 --- a/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js +++ b/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Context.js b/lib/OpenLayers/Format/Context.js index 1b8c5909fe..73d6203dca 100644 --- a/lib/OpenLayers/Format/Context.js +++ b/lib/OpenLayers/Format/Context.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Filter.js b/lib/OpenLayers/Format/Filter.js index f3fc0b343b..59c06a8ed0 100644 --- a/lib/OpenLayers/Format/Filter.js +++ b/lib/OpenLayers/Format/Filter.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Filter/v1.js b/lib/OpenLayers/Format/Filter/v1.js index 9cb89c847e..539ec0f488 100644 --- a/lib/OpenLayers/Format/Filter/v1.js +++ b/lib/OpenLayers/Format/Filter/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Filter/v1_0_0.js b/lib/OpenLayers/Format/Filter/v1_0_0.js index 5cf105e964..52e650e4b4 100644 --- a/lib/OpenLayers/Format/Filter/v1_0_0.js +++ b/lib/OpenLayers/Format/Filter/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Filter/v1_1_0.js b/lib/OpenLayers/Format/Filter/v1_1_0.js index 64a902b959..628c4890fd 100644 --- a/lib/OpenLayers/Format/Filter/v1_1_0.js +++ b/lib/OpenLayers/Format/Filter/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index e26e01e44a..467f8758c0 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GML/Base.js b/lib/OpenLayers/Format/GML/Base.js index 1e6d5316b9..6c499694aa 100644 --- a/lib/OpenLayers/Format/GML/Base.js +++ b/lib/OpenLayers/Format/GML/Base.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GML/v2.js b/lib/OpenLayers/Format/GML/v2.js index 8a489a045a..bd26b99995 100644 --- a/lib/OpenLayers/Format/GML/v2.js +++ b/lib/OpenLayers/Format/GML/v2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GML/v3.js b/lib/OpenLayers/Format/GML/v3.js index 16b141cece..82c7b1e498 100644 --- a/lib/OpenLayers/Format/GML/v3.js +++ b/lib/OpenLayers/Format/GML/v3.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index d6c3ffb058..430ba4d1a2 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GeoJSON.js b/lib/OpenLayers/Format/GeoJSON.js index 962b3991d6..0e02377bd2 100644 --- a/lib/OpenLayers/Format/GeoJSON.js +++ b/lib/OpenLayers/Format/GeoJSON.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/GeoRSS.js b/lib/OpenLayers/Format/GeoRSS.js index 1bc782f614..cbbb4d897f 100644 --- a/lib/OpenLayers/Format/GeoRSS.js +++ b/lib/OpenLayers/Format/GeoRSS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/JSON.js b/lib/OpenLayers/Format/JSON.js index f4ebff5b5e..5b25e6af67 100644 --- a/lib/OpenLayers/Format/JSON.js +++ b/lib/OpenLayers/Format/JSON.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index fa15c5806d..e10bce7b03 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OGCExceptionReport.js b/lib/OpenLayers/Format/OGCExceptionReport.js index 9fa293accd..61a9da5457 100644 --- a/lib/OpenLayers/Format/OGCExceptionReport.js +++ b/lib/OpenLayers/Format/OGCExceptionReport.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OSM.js b/lib/OpenLayers/Format/OSM.js index 75a4f89418..7283348f1c 100644 --- a/lib/OpenLayers/Format/OSM.js +++ b/lib/OpenLayers/Format/OSM.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSCommon.js b/lib/OpenLayers/Format/OWSCommon.js index 7decbf0f2b..fd71820659 100644 --- a/lib/OpenLayers/Format/OWSCommon.js +++ b/lib/OpenLayers/Format/OWSCommon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSCommon/v1.js b/lib/OpenLayers/Format/OWSCommon/v1.js index db317e6a00..57ae9d2576 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1.js +++ b/lib/OpenLayers/Format/OWSCommon/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSCommon/v1_0_0.js b/lib/OpenLayers/Format/OWSCommon/v1_0_0.js index 0ba511a5a5..bc9852d76b 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1_0_0.js +++ b/lib/OpenLayers/Format/OWSCommon/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js index aca42e8fcb..9da216c8e5 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js +++ b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSContext.js b/lib/OpenLayers/Format/OWSContext.js index 459ed14d45..ab38734fbd 100644 --- a/lib/OpenLayers/Format/OWSContext.js +++ b/lib/OpenLayers/Format/OWSContext.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/OWSContext/v0_3_1.js b/lib/OpenLayers/Format/OWSContext/v0_3_1.js index d7a38c39b5..d6487e8434 100644 --- a/lib/OpenLayers/Format/OWSContext/v0_3_1.js +++ b/lib/OpenLayers/Format/OWSContext/v0_3_1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/QueryStringFilter.js b/lib/OpenLayers/Format/QueryStringFilter.js index dbef01930a..e33f7226ae 100644 --- a/lib/OpenLayers/Format/QueryStringFilter.js +++ b/lib/OpenLayers/Format/QueryStringFilter.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SLD.js b/lib/OpenLayers/Format/SLD.js index 8bb1dc8c70..56e59d087d 100644 --- a/lib/OpenLayers/Format/SLD.js +++ b/lib/OpenLayers/Format/SLD.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SLD/v1.js b/lib/OpenLayers/Format/SLD/v1.js index 7e765abd1e..c43bac4fe8 100644 --- a/lib/OpenLayers/Format/SLD/v1.js +++ b/lib/OpenLayers/Format/SLD/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SLD/v1_0_0.js b/lib/OpenLayers/Format/SLD/v1_0_0.js index f0ad738784..e920b502a3 100644 --- a/lib/OpenLayers/Format/SLD/v1_0_0.js +++ b/lib/OpenLayers/Format/SLD/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SLD/v1_0_0_GeoServer.js b/lib/OpenLayers/Format/SLD/v1_0_0_GeoServer.js index a579784eb8..902da67a14 100644 --- a/lib/OpenLayers/Format/SLD/v1_0_0_GeoServer.js +++ b/lib/OpenLayers/Format/SLD/v1_0_0_GeoServer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SOSCapabilities.js b/lib/OpenLayers/Format/SOSCapabilities.js index f4a2d7318e..1abb1c81db 100644 --- a/lib/OpenLayers/Format/SOSCapabilities.js +++ b/lib/OpenLayers/Format/SOSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js index 18d138d01c..89c0e914a7 100644 --- a/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js b/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js index be8d162b00..aac2030d4c 100644 --- a/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js +++ b/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/SOSGetObservation.js b/lib/OpenLayers/Format/SOSGetObservation.js index 9748b5a087..9a6e2d7383 100644 --- a/lib/OpenLayers/Format/SOSGetObservation.js +++ b/lib/OpenLayers/Format/SOSGetObservation.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/Text.js b/lib/OpenLayers/Format/Text.js index e4ec0f4225..bf9bcd557b 100644 --- a/lib/OpenLayers/Format/Text.js +++ b/lib/OpenLayers/Format/Text.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WCSCapabilities.js b/lib/OpenLayers/Format/WCSCapabilities.js index f73ee1b7d5..934aaa5d49 100644 --- a/lib/OpenLayers/Format/WCSCapabilities.js +++ b/lib/OpenLayers/Format/WCSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WCSCapabilities/v1.js b/lib/OpenLayers/Format/WCSCapabilities/v1.js index b4e433dc1f..bf8da3b181 100644 --- a/lib/OpenLayers/Format/WCSCapabilities/v1.js +++ b/lib/OpenLayers/Format/WCSCapabilities/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WCSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/WCSCapabilities/v1_0_0.js index 571e3fc1b9..4dfa0b8bde 100644 --- a/lib/OpenLayers/Format/WCSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/WCSCapabilities/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js b/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js index 6efe1b1294..1753c51e83 100644 --- a/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js +++ b/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WCSGetCoverage.js b/lib/OpenLayers/Format/WCSGetCoverage.js index e84af0674d..2817f2894a 100644 --- a/lib/OpenLayers/Format/WCSGetCoverage.js +++ b/lib/OpenLayers/Format/WCSGetCoverage.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 18628615ea..44b03a3af0 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFSCapabilities.js b/lib/OpenLayers/Format/WFSCapabilities.js index 690de3d536..61af08563a 100644 --- a/lib/OpenLayers/Format/WFSCapabilities.js +++ b/lib/OpenLayers/Format/WFSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFSCapabilities/v1.js b/lib/OpenLayers/Format/WFSCapabilities/v1.js index 9f63c98e43..c4ec517042 100644 --- a/lib/OpenLayers/Format/WFSCapabilities/v1.js +++ b/lib/OpenLayers/Format/WFSCapabilities/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js index 36457e67de..6b202c743f 100644 --- a/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js b/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js index 0f691cb90a..84f6b4bfcd 100644 --- a/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js +++ b/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFSDescribeFeatureType.js b/lib/OpenLayers/Format/WFSDescribeFeatureType.js index 44a5c1c936..416e845e24 100644 --- a/lib/OpenLayers/Format/WFSDescribeFeatureType.js +++ b/lib/OpenLayers/Format/WFSDescribeFeatureType.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFST.js b/lib/OpenLayers/Format/WFST.js index ed101c3afc..eb3d9d9c77 100644 --- a/lib/OpenLayers/Format/WFST.js +++ b/lib/OpenLayers/Format/WFST.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFST/v1.js b/lib/OpenLayers/Format/WFST/v1.js index d853ce7609..306ba6ff74 100644 --- a/lib/OpenLayers/Format/WFST/v1.js +++ b/lib/OpenLayers/Format/WFST/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFST/v1_0_0.js b/lib/OpenLayers/Format/WFST/v1_0_0.js index abdbc664b5..ed81a2d292 100644 --- a/lib/OpenLayers/Format/WFST/v1_0_0.js +++ b/lib/OpenLayers/Format/WFST/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WFST/v1_1_0.js b/lib/OpenLayers/Format/WFST/v1_1_0.js index c145700f0b..ff2a88d3e0 100644 --- a/lib/OpenLayers/Format/WFST/v1_1_0.js +++ b/lib/OpenLayers/Format/WFST/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WKT.js b/lib/OpenLayers/Format/WKT.js index d7dfbfaa51..f19c9b7a3f 100644 --- a/lib/OpenLayers/Format/WKT.js +++ b/lib/OpenLayers/Format/WKT.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMC.js b/lib/OpenLayers/Format/WMC.js index 185326a5c8..ded1b3a00e 100644 --- a/lib/OpenLayers/Format/WMC.js +++ b/lib/OpenLayers/Format/WMC.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMC/v1.js b/lib/OpenLayers/Format/WMC/v1.js index 84ab222286..6c9a5c3d52 100644 --- a/lib/OpenLayers/Format/WMC/v1.js +++ b/lib/OpenLayers/Format/WMC/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMC/v1_0_0.js b/lib/OpenLayers/Format/WMC/v1_0_0.js index bacf64a794..ace0d95c7e 100644 --- a/lib/OpenLayers/Format/WMC/v1_0_0.js +++ b/lib/OpenLayers/Format/WMC/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMC/v1_1_0.js b/lib/OpenLayers/Format/WMC/v1_1_0.js index ffbd01c109..e5efc3e2fa 100644 --- a/lib/OpenLayers/Format/WMC/v1_1_0.js +++ b/lib/OpenLayers/Format/WMC/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities.js b/lib/OpenLayers/Format/WMSCapabilities.js index da3918464e..2bf3cef0c7 100644 --- a/lib/OpenLayers/Format/WMSCapabilities.js +++ b/lib/OpenLayers/Format/WMSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1.js b/lib/OpenLayers/Format/WMSCapabilities/v1.js index c6f0db14ff..ef5c133e2d 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_1.js b/lib/OpenLayers/Format/WMSCapabilities/v1_1.js index 469a0f751a..0e15d38088 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_1.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js b/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js index c7c9793a0c..a1c6279136 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js b/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js index 8e76b1842c..459572b6f4 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js b/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js index e824114661..e58e4f755a 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_3.js b/lib/OpenLayers/Format/WMSCapabilities/v1_3.js index 46631de8b2..57aee1a0b8 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_3.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_3.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js b/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js index 867a80377d..c2c4ca48b6 100644 --- a/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js +++ b/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSDescribeLayer.js b/lib/OpenLayers/Format/WMSDescribeLayer.js index 397c2301fa..296262c42d 100644 --- a/lib/OpenLayers/Format/WMSDescribeLayer.js +++ b/lib/OpenLayers/Format/WMSDescribeLayer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js index adda347467..3929d4b278 100644 --- a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js +++ b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMSGetFeatureInfo.js b/lib/OpenLayers/Format/WMSGetFeatureInfo.js index 97be9ba213..57eb219837 100644 --- a/lib/OpenLayers/Format/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Format/WMSGetFeatureInfo.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMTSCapabilities.js b/lib/OpenLayers/Format/WMTSCapabilities.js index 985591202e..9cff69c80b 100644 --- a/lib/OpenLayers/Format/WMTSCapabilities.js +++ b/lib/OpenLayers/Format/WMTSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js index 3a201448eb..fda2584b6a 100644 --- a/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WPSCapabilities.js b/lib/OpenLayers/Format/WPSCapabilities.js index 96593d9ed4..f0d74dbd41 100644 --- a/lib/OpenLayers/Format/WPSCapabilities.js +++ b/lib/OpenLayers/Format/WPSCapabilities.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WPSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/WPSCapabilities/v1_0_0.js index 7f6e872af9..e6762a9b32 100644 --- a/lib/OpenLayers/Format/WPSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/WPSCapabilities/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WPSDescribeProcess.js b/lib/OpenLayers/Format/WPSDescribeProcess.js index e6cc47ae03..e8f96bb248 100644 --- a/lib/OpenLayers/Format/WPSDescribeProcess.js +++ b/lib/OpenLayers/Format/WPSDescribeProcess.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/WPSExecute.js b/lib/OpenLayers/Format/WPSExecute.js index f7dda5444d..0795b0d180 100644 --- a/lib/OpenLayers/Format/WPSExecute.js +++ b/lib/OpenLayers/Format/WPSExecute.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/XLS.js b/lib/OpenLayers/Format/XLS.js index c90dcd48d7..76f3f10ad5 100644 --- a/lib/OpenLayers/Format/XLS.js +++ b/lib/OpenLayers/Format/XLS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/XLS/v1.js b/lib/OpenLayers/Format/XLS/v1.js index 413a74e2db..642474f0dd 100644 --- a/lib/OpenLayers/Format/XLS/v1.js +++ b/lib/OpenLayers/Format/XLS/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/XLS/v1_1_0.js b/lib/OpenLayers/Format/XLS/v1_1_0.js index 89e9103b2f..7ffca26156 100644 --- a/lib/OpenLayers/Format/XLS/v1_1_0.js +++ b/lib/OpenLayers/Format/XLS/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/XML.js b/lib/OpenLayers/Format/XML.js index 76341ca11e..56f587131b 100644 --- a/lib/OpenLayers/Format/XML.js +++ b/lib/OpenLayers/Format/XML.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Format/XML/VersionedOGC.js b/lib/OpenLayers/Format/XML/VersionedOGC.js index 381b9d6805..e68d9686d6 100644 --- a/lib/OpenLayers/Format/XML/VersionedOGC.js +++ b/lib/OpenLayers/Format/XML/VersionedOGC.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry.js b/lib/OpenLayers/Geometry.js index 7737c261d5..9cc0c5d11c 100644 --- a/lib/OpenLayers/Geometry.js +++ b/lib/OpenLayers/Geometry.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/Collection.js b/lib/OpenLayers/Geometry/Collection.js index 9d1793454d..f76cc85374 100644 --- a/lib/OpenLayers/Geometry/Collection.js +++ b/lib/OpenLayers/Geometry/Collection.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/Curve.js b/lib/OpenLayers/Geometry/Curve.js index 288367bf28..e663e0b57c 100644 --- a/lib/OpenLayers/Geometry/Curve.js +++ b/lib/OpenLayers/Geometry/Curve.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/LineString.js b/lib/OpenLayers/Geometry/LineString.js index e0db1e7d42..b7d7dac3a0 100644 --- a/lib/OpenLayers/Geometry/LineString.js +++ b/lib/OpenLayers/Geometry/LineString.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/LinearRing.js b/lib/OpenLayers/Geometry/LinearRing.js index b502572671..b0a694cb0d 100644 --- a/lib/OpenLayers/Geometry/LinearRing.js +++ b/lib/OpenLayers/Geometry/LinearRing.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/MultiLineString.js b/lib/OpenLayers/Geometry/MultiLineString.js index 2917fb6ce3..4e330b0e83 100644 --- a/lib/OpenLayers/Geometry/MultiLineString.js +++ b/lib/OpenLayers/Geometry/MultiLineString.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/MultiPoint.js b/lib/OpenLayers/Geometry/MultiPoint.js index a19f2aa766..ed8ff67f05 100644 --- a/lib/OpenLayers/Geometry/MultiPoint.js +++ b/lib/OpenLayers/Geometry/MultiPoint.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/MultiPolygon.js b/lib/OpenLayers/Geometry/MultiPolygon.js index aa94f965a9..d1e59dc020 100644 --- a/lib/OpenLayers/Geometry/MultiPolygon.js +++ b/lib/OpenLayers/Geometry/MultiPolygon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/Point.js b/lib/OpenLayers/Geometry/Point.js index c2f6f55b13..456956f61a 100644 --- a/lib/OpenLayers/Geometry/Point.js +++ b/lib/OpenLayers/Geometry/Point.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Geometry/Polygon.js b/lib/OpenLayers/Geometry/Polygon.js index 7b9732a05a..6aaff1fb2d 100644 --- a/lib/OpenLayers/Geometry/Polygon.js +++ b/lib/OpenLayers/Geometry/Polygon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler.js b/lib/OpenLayers/Handler.js index f929fe51c7..38a4875c8d 100644 --- a/lib/OpenLayers/Handler.js +++ b/lib/OpenLayers/Handler.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Box.js b/lib/OpenLayers/Handler/Box.js index 4c6ba17942..9d3289aaa4 100644 --- a/lib/OpenLayers/Handler/Box.js +++ b/lib/OpenLayers/Handler/Box.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Click.js b/lib/OpenLayers/Handler/Click.js index a54b1b7694..1b9002263b 100644 --- a/lib/OpenLayers/Handler/Click.js +++ b/lib/OpenLayers/Handler/Click.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index e3218d2181..9298db14c0 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 373debb27c..ed6f3d1e22 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Hover.js b/lib/OpenLayers/Handler/Hover.js index e0988ecab1..18b81f4145 100644 --- a/lib/OpenLayers/Handler/Hover.js +++ b/lib/OpenLayers/Handler/Hover.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Keyboard.js b/lib/OpenLayers/Handler/Keyboard.js index 2cbb4c1f1c..de7a464853 100644 --- a/lib/OpenLayers/Handler/Keyboard.js +++ b/lib/OpenLayers/Handler/Keyboard.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index ce73d08ef3..6f40620a29 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Path.js b/lib/OpenLayers/Handler/Path.js index 7bf254801e..49ec8ee387 100644 --- a/lib/OpenLayers/Handler/Path.js +++ b/lib/OpenLayers/Handler/Path.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Point.js b/lib/OpenLayers/Handler/Point.js index a32e02af1f..c3e1701577 100644 --- a/lib/OpenLayers/Handler/Point.js +++ b/lib/OpenLayers/Handler/Point.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/Polygon.js b/lib/OpenLayers/Handler/Polygon.js index c9f8825ced..4f6dfd2888 100644 --- a/lib/OpenLayers/Handler/Polygon.js +++ b/lib/OpenLayers/Handler/Polygon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Handler/RegularPolygon.js b/lib/OpenLayers/Handler/RegularPolygon.js index 556a57b020..bf4e2db973 100644 --- a/lib/OpenLayers/Handler/RegularPolygon.js +++ b/lib/OpenLayers/Handler/RegularPolygon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Icon.js b/lib/OpenLayers/Icon.js index 65e93c99bb..2d8f967398 100644 --- a/lib/OpenLayers/Icon.js +++ b/lib/OpenLayers/Icon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Kinetic.js b/lib/OpenLayers/Kinetic.js index 46b54d7cf1..1cd7886403 100644 --- a/lib/OpenLayers/Kinetic.js +++ b/lib/OpenLayers/Kinetic.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Lang.js b/lib/OpenLayers/Lang.js index bc2d9f9c0f..068562d341 100644 --- a/lib/OpenLayers/Lang.js +++ b/lib/OpenLayers/Lang.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 94b7706307..01178f086d 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/ArcGIS93Rest.js b/lib/OpenLayers/Layer/ArcGIS93Rest.js index 7ae60164d6..42967108ef 100644 --- a/lib/OpenLayers/Layer/ArcGIS93Rest.js +++ b/lib/OpenLayers/Layer/ArcGIS93Rest.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/ArcIMS.js b/lib/OpenLayers/Layer/ArcIMS.js index eb59f04306..e19584c9f1 100644 --- a/lib/OpenLayers/Layer/ArcIMS.js +++ b/lib/OpenLayers/Layer/ArcIMS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Bing.js b/lib/OpenLayers/Layer/Bing.js index 28096b1914..75d527cc3f 100644 --- a/lib/OpenLayers/Layer/Bing.js +++ b/lib/OpenLayers/Layer/Bing.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Boxes.js b/lib/OpenLayers/Layer/Boxes.js index c9e7495539..7cd605a94a 100644 --- a/lib/OpenLayers/Layer/Boxes.js +++ b/lib/OpenLayers/Layer/Boxes.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/EventPane.js b/lib/OpenLayers/Layer/EventPane.js index 9e05071a16..15a852fb6d 100644 --- a/lib/OpenLayers/Layer/EventPane.js +++ b/lib/OpenLayers/Layer/EventPane.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/FixedZoomLevels.js b/lib/OpenLayers/Layer/FixedZoomLevels.js index 5b5e52e559..f64723890f 100644 --- a/lib/OpenLayers/Layer/FixedZoomLevels.js +++ b/lib/OpenLayers/Layer/FixedZoomLevels.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/GeoRSS.js b/lib/OpenLayers/Layer/GeoRSS.js index eb409bf9db..564d071cb4 100644 --- a/lib/OpenLayers/Layer/GeoRSS.js +++ b/lib/OpenLayers/Layer/GeoRSS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Google.js b/lib/OpenLayers/Layer/Google.js index 8f9bd7ca75..6f9d3e16f1 100644 --- a/lib/OpenLayers/Layer/Google.js +++ b/lib/OpenLayers/Layer/Google.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Google/v3.js b/lib/OpenLayers/Layer/Google/v3.js index 6147d965d4..a70c7bbf13 100644 --- a/lib/OpenLayers/Layer/Google/v3.js +++ b/lib/OpenLayers/Layer/Google/v3.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 6989594fa3..57a19f9c91 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/HTTPRequest.js b/lib/OpenLayers/Layer/HTTPRequest.js index e41e19c6c1..ccb0291fa8 100644 --- a/lib/OpenLayers/Layer/HTTPRequest.js +++ b/lib/OpenLayers/Layer/HTTPRequest.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Image.js b/lib/OpenLayers/Layer/Image.js index ffe8ebe5f6..b96e369e74 100644 --- a/lib/OpenLayers/Layer/Image.js +++ b/lib/OpenLayers/Layer/Image.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/KaMap.js b/lib/OpenLayers/Layer/KaMap.js index 4041a94200..3de2224feb 100644 --- a/lib/OpenLayers/Layer/KaMap.js +++ b/lib/OpenLayers/Layer/KaMap.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/KaMapCache.js b/lib/OpenLayers/Layer/KaMapCache.js index f343d2bc69..be6bdb0d6b 100644 --- a/lib/OpenLayers/Layer/KaMapCache.js +++ b/lib/OpenLayers/Layer/KaMapCache.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/MapGuide.js b/lib/OpenLayers/Layer/MapGuide.js index 9cde653357..8f7d9792fd 100644 --- a/lib/OpenLayers/Layer/MapGuide.js +++ b/lib/OpenLayers/Layer/MapGuide.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/MapServer.js b/lib/OpenLayers/Layer/MapServer.js index 69dcfaf889..713035f633 100644 --- a/lib/OpenLayers/Layer/MapServer.js +++ b/lib/OpenLayers/Layer/MapServer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Markers.js b/lib/OpenLayers/Layer/Markers.js index b8e0824396..de848d4937 100644 --- a/lib/OpenLayers/Layer/Markers.js +++ b/lib/OpenLayers/Layer/Markers.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/OSM.js b/lib/OpenLayers/Layer/OSM.js index d5b29468c5..49150fd332 100644 --- a/lib/OpenLayers/Layer/OSM.js +++ b/lib/OpenLayers/Layer/OSM.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/PointGrid.js b/lib/OpenLayers/Layer/PointGrid.js index 72a3d03929..10a4d02275 100644 --- a/lib/OpenLayers/Layer/PointGrid.js +++ b/lib/OpenLayers/Layer/PointGrid.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/PointTrack.js b/lib/OpenLayers/Layer/PointTrack.js index ad9f892059..accfac7da2 100644 --- a/lib/OpenLayers/Layer/PointTrack.js +++ b/lib/OpenLayers/Layer/PointTrack.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/SphericalMercator.js b/lib/OpenLayers/Layer/SphericalMercator.js index 2bcb5545d5..60bb2fe790 100644 --- a/lib/OpenLayers/Layer/SphericalMercator.js +++ b/lib/OpenLayers/Layer/SphericalMercator.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/TMS.js b/lib/OpenLayers/Layer/TMS.js index 2f816e9e86..ab76847588 100644 --- a/lib/OpenLayers/Layer/TMS.js +++ b/lib/OpenLayers/Layer/TMS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Text.js b/lib/OpenLayers/Layer/Text.js index 99e559f82f..4a4c9e3fbb 100644 --- a/lib/OpenLayers/Layer/Text.js +++ b/lib/OpenLayers/Layer/Text.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/TileCache.js b/lib/OpenLayers/Layer/TileCache.js index 07fddf8954..5b336beb0e 100644 --- a/lib/OpenLayers/Layer/TileCache.js +++ b/lib/OpenLayers/Layer/TileCache.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/UTFGrid.js b/lib/OpenLayers/Layer/UTFGrid.js index 78bd2be70d..51db26402c 100644 --- a/lib/OpenLayers/Layer/UTFGrid.js +++ b/lib/OpenLayers/Layer/UTFGrid.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index ceef21941f..4ef4cbf175 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Vector/RootContainer.js b/lib/OpenLayers/Layer/Vector/RootContainer.js index 114669a2bf..075edaa788 100644 --- a/lib/OpenLayers/Layer/Vector/RootContainer.js +++ b/lib/OpenLayers/Layer/Vector/RootContainer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 45315a0de8..15dee2fb77 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/WMTS.js b/lib/OpenLayers/Layer/WMTS.js index f713cbf3a6..31b611d72b 100644 --- a/lib/OpenLayers/Layer/WMTS.js +++ b/lib/OpenLayers/Layer/WMTS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/WorldWind.js b/lib/OpenLayers/Layer/WorldWind.js index adaafccd00..8581289e17 100644 --- a/lib/OpenLayers/Layer/WorldWind.js +++ b/lib/OpenLayers/Layer/WorldWind.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/XYZ.js b/lib/OpenLayers/Layer/XYZ.js index e61bb108a3..5af5ce3b4b 100644 --- a/lib/OpenLayers/Layer/XYZ.js +++ b/lib/OpenLayers/Layer/XYZ.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Layer/Zoomify.js b/lib/OpenLayers/Layer/Zoomify.js index 126653f345..1c3d57dd1c 100644 --- a/lib/OpenLayers/Layer/Zoomify.js +++ b/lib/OpenLayers/Layer/Zoomify.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index fae33ea086..c7aea333c9 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 2d22b583ab..1dde347b4a 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Marker/Box.js b/lib/OpenLayers/Marker/Box.js index c3086bfe78..e42e5602eb 100644 --- a/lib/OpenLayers/Marker/Box.js +++ b/lib/OpenLayers/Marker/Box.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 41cec8ccbb..290318eaf4 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index e630e7e6a6..9415546976 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Popup/AnchoredBubble.js b/lib/OpenLayers/Popup/AnchoredBubble.js index 38377ea076..c1c428b786 100644 --- a/lib/OpenLayers/Popup/AnchoredBubble.js +++ b/lib/OpenLayers/Popup/AnchoredBubble.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Popup/Framed.js b/lib/OpenLayers/Popup/Framed.js index 514b5da834..cb2d5d9cfd 100644 --- a/lib/OpenLayers/Popup/Framed.js +++ b/lib/OpenLayers/Popup/Framed.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Popup/FramedCloud.js b/lib/OpenLayers/Popup/FramedCloud.js index 7be869b6e1..8ad8b94883 100644 --- a/lib/OpenLayers/Popup/FramedCloud.js +++ b/lib/OpenLayers/Popup/FramedCloud.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Projection.js b/lib/OpenLayers/Projection.js index a556073df1..387e26a364 100644 --- a/lib/OpenLayers/Projection.js +++ b/lib/OpenLayers/Projection.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol.js b/lib/OpenLayers/Protocol.js index 0ea6737827..7e63439ae2 100644 --- a/lib/OpenLayers/Protocol.js +++ b/lib/OpenLayers/Protocol.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/CSW.js b/lib/OpenLayers/Protocol/CSW.js index 53554b41ef..5641182baf 100644 --- a/lib/OpenLayers/Protocol/CSW.js +++ b/lib/OpenLayers/Protocol/CSW.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/CSW/v2_0_2.js b/lib/OpenLayers/Protocol/CSW/v2_0_2.js index 5efe33ab46..88bfd75441 100644 --- a/lib/OpenLayers/Protocol/CSW/v2_0_2.js +++ b/lib/OpenLayers/Protocol/CSW/v2_0_2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/HTTP.js b/lib/OpenLayers/Protocol/HTTP.js index 7b0e1fdc8c..a53b497223 100644 --- a/lib/OpenLayers/Protocol/HTTP.js +++ b/lib/OpenLayers/Protocol/HTTP.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/SOS.js b/lib/OpenLayers/Protocol/SOS.js index 3c7b64dcea..578f3691fc 100644 --- a/lib/OpenLayers/Protocol/SOS.js +++ b/lib/OpenLayers/Protocol/SOS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/SOS/v1_0_0.js b/lib/OpenLayers/Protocol/SOS/v1_0_0.js index 968b0aaaf0..9cf87f5353 100644 --- a/lib/OpenLayers/Protocol/SOS/v1_0_0.js +++ b/lib/OpenLayers/Protocol/SOS/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/Script.js b/lib/OpenLayers/Protocol/Script.js index 259b21dcb8..93ab32a556 100644 --- a/lib/OpenLayers/Protocol/Script.js +++ b/lib/OpenLayers/Protocol/Script.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/WFS.js b/lib/OpenLayers/Protocol/WFS.js index 3e0be8893f..66faf43e60 100644 --- a/lib/OpenLayers/Protocol/WFS.js +++ b/lib/OpenLayers/Protocol/WFS.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/WFS/v1.js b/lib/OpenLayers/Protocol/WFS/v1.js index f22f57b777..8a21d7e189 100644 --- a/lib/OpenLayers/Protocol/WFS/v1.js +++ b/lib/OpenLayers/Protocol/WFS/v1.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/WFS/v1_0_0.js b/lib/OpenLayers/Protocol/WFS/v1_0_0.js index 19924c06c1..b1e2ca16f5 100644 --- a/lib/OpenLayers/Protocol/WFS/v1_0_0.js +++ b/lib/OpenLayers/Protocol/WFS/v1_0_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Protocol/WFS/v1_1_0.js b/lib/OpenLayers/Protocol/WFS/v1_1_0.js index 187e9c7743..97991a615a 100644 --- a/lib/OpenLayers/Protocol/WFS/v1_1_0.js +++ b/lib/OpenLayers/Protocol/WFS/v1_1_0.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Renderer.js b/lib/OpenLayers/Renderer.js index 0255b7cbb4..c5c7d0d692 100644 --- a/lib/OpenLayers/Renderer.js +++ b/lib/OpenLayers/Renderer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js index fb5ff82498..c18a435874 100644 --- a/lib/OpenLayers/Renderer/Canvas.js +++ b/lib/OpenLayers/Renderer/Canvas.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index 7f62db315f..18a0d797c5 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index fed9289399..c3dd05713a 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Renderer/VML.js b/lib/OpenLayers/Renderer/VML.js index bd91bf46e5..8f6374b4b0 100644 --- a/lib/OpenLayers/Renderer/VML.js +++ b/lib/OpenLayers/Renderer/VML.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Request.js b/lib/OpenLayers/Request.js index 03a9ac886f..2b28dfc86b 100644 --- a/lib/OpenLayers/Request.js +++ b/lib/OpenLayers/Request.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Rule.js b/lib/OpenLayers/Rule.js index 7995044dde..dbf5e68890 100644 --- a/lib/OpenLayers/Rule.js +++ b/lib/OpenLayers/Rule.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index 7a76504bc3..0ad8d449dc 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy.js b/lib/OpenLayers/Strategy.js index 4a2b35c547..113deb14e8 100644 --- a/lib/OpenLayers/Strategy.js +++ b/lib/OpenLayers/Strategy.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/BBOX.js b/lib/OpenLayers/Strategy/BBOX.js index 3c9a591152..e066764586 100644 --- a/lib/OpenLayers/Strategy/BBOX.js +++ b/lib/OpenLayers/Strategy/BBOX.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Cluster.js b/lib/OpenLayers/Strategy/Cluster.js index 3be70ac340..d478598a24 100644 --- a/lib/OpenLayers/Strategy/Cluster.js +++ b/lib/OpenLayers/Strategy/Cluster.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Filter.js b/lib/OpenLayers/Strategy/Filter.js index d785cfb9a5..721fe52968 100644 --- a/lib/OpenLayers/Strategy/Filter.js +++ b/lib/OpenLayers/Strategy/Filter.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Fixed.js b/lib/OpenLayers/Strategy/Fixed.js index 5f1ee11663..a3fd5646c1 100644 --- a/lib/OpenLayers/Strategy/Fixed.js +++ b/lib/OpenLayers/Strategy/Fixed.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Paging.js b/lib/OpenLayers/Strategy/Paging.js index e1cc4445b2..22154faca6 100644 --- a/lib/OpenLayers/Strategy/Paging.js +++ b/lib/OpenLayers/Strategy/Paging.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Refresh.js b/lib/OpenLayers/Strategy/Refresh.js index 9dc095164b..726b89725e 100644 --- a/lib/OpenLayers/Strategy/Refresh.js +++ b/lib/OpenLayers/Strategy/Refresh.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Strategy/Save.js b/lib/OpenLayers/Strategy/Save.js index 2216808b26..2211e95f44 100644 --- a/lib/OpenLayers/Strategy/Save.js +++ b/lib/OpenLayers/Strategy/Save.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Style.js b/lib/OpenLayers/Style.js index ff5a6ed803..39c4a48fde 100644 --- a/lib/OpenLayers/Style.js +++ b/lib/OpenLayers/Style.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Style2.js b/lib/OpenLayers/Style2.js index ea2cc969e1..672dae9753 100644 --- a/lib/OpenLayers/Style2.js +++ b/lib/OpenLayers/Style2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/StyleMap.js b/lib/OpenLayers/StyleMap.js index 232c291085..b6daca21f1 100644 --- a/lib/OpenLayers/StyleMap.js +++ b/lib/OpenLayers/StyleMap.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer.js b/lib/OpenLayers/Symbolizer.js index 6ac5c3ba34..e0d54e8812 100644 --- a/lib/OpenLayers/Symbolizer.js +++ b/lib/OpenLayers/Symbolizer.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer/Line.js b/lib/OpenLayers/Symbolizer/Line.js index 34fb824e4a..41203e5ea0 100644 --- a/lib/OpenLayers/Symbolizer/Line.js +++ b/lib/OpenLayers/Symbolizer/Line.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer/Point.js b/lib/OpenLayers/Symbolizer/Point.js index 41ebbd5d24..fa9d93284f 100644 --- a/lib/OpenLayers/Symbolizer/Point.js +++ b/lib/OpenLayers/Symbolizer/Point.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer/Polygon.js b/lib/OpenLayers/Symbolizer/Polygon.js index 6ea68ae7cf..e4158c8589 100644 --- a/lib/OpenLayers/Symbolizer/Polygon.js +++ b/lib/OpenLayers/Symbolizer/Polygon.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer/Raster.js b/lib/OpenLayers/Symbolizer/Raster.js index cfeca16443..cf87a42cf7 100644 --- a/lib/OpenLayers/Symbolizer/Raster.js +++ b/lib/OpenLayers/Symbolizer/Raster.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Symbolizer/Text.js b/lib/OpenLayers/Symbolizer/Text.js index 22119e2e82..10dab2032f 100644 --- a/lib/OpenLayers/Symbolizer/Text.js +++ b/lib/OpenLayers/Symbolizer/Text.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index f943b2c1e3..b3d1ba5e1e 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 153997c4ee..9923109087 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Tile/Image/IFrame.js b/lib/OpenLayers/Tile/Image/IFrame.js index d15b4086a0..9e33acc0a1 100644 --- a/lib/OpenLayers/Tile/Image/IFrame.js +++ b/lib/OpenLayers/Tile/Image/IFrame.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Tile/UTFGrid.js b/lib/OpenLayers/Tile/UTFGrid.js index d819227549..2836ee07f8 100644 --- a/lib/OpenLayers/Tile/UTFGrid.js +++ b/lib/OpenLayers/Tile/UTFGrid.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index 7820e74029..c2e86bad9d 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Tween.js b/lib/OpenLayers/Tween.js index d722a9933c..0432dad1e6 100644 --- a/lib/OpenLayers/Tween.js +++ b/lib/OpenLayers/Tween.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index f08ab257fc..6c5d6e10b0 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ From 39a5aed5a6b4d9cde070a6b5a05f407be294c45e Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Mon, 4 Feb 2013 15:45:19 +0100 Subject: [PATCH 059/148] Remove trailing whitespace. --- lib/OpenLayers/Control/LayerSwitcher.js | 226 ++++++++++++------------ 1 file changed, 113 insertions(+), 113 deletions(-) diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index 6f5ab78ed6..d4e686d8de 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -3,7 +3,7 @@ * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ -/** +/** * @requires OpenLayers/Control.js * @requires OpenLayers/Lang.js * @requires OpenLayers/Console.js @@ -12,18 +12,18 @@ /** * Class: OpenLayers.Control.LayerSwitcher - * The LayerSwitcher control displays a table of contents for the map. This + * The LayerSwitcher control displays a table of contents for the map. This * allows the user interface to switch between BaseLasyers and to show or hide - * Overlays. By default the switcher is shown minimized on the right edge of + * Overlays. By default the switcher is shown minimized on the right edge of * the map, the user may expand it by clicking on the handle. * - * To create the LayerSwitcher outside of the map, pass the Id of a html div + * To create the LayerSwitcher outside of the map, pass the Id of a html div * as the first argument to the constructor. - * + * * Inherits from: * - */ -OpenLayers.Control.LayerSwitcher = +OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, { /** @@ -37,104 +37,104 @@ OpenLayers.Control.LayerSwitcher = */ roundedCorner: false, - /** + /** * APIProperty: roundedCornerColor * {String} The color of the rounded corners, only applies if roundedCorner * is true, defaults to "darkblue". */ roundedCornerColor: "darkblue", - - /** - * Property: layerStates - * {Array(Object)} Basically a copy of the "state" of the map's layers + + /** + * Property: layerStates + * {Array(Object)} Basically a copy of the "state" of the map's layers * the last time the control was drawn. We have this in order to avoid * unnecessarily redrawing the control. */ layerStates: null, - + // DOM Elements - + /** * Property: layersDiv - * {DOMElement} + * {DOMElement} */ layersDiv: null, - - /** + + /** * Property: baseLayersDiv * {DOMElement} */ baseLayersDiv: null, - /** + /** * Property: baseLayers * {Array(Object)} */ baseLayers: null, - - - /** + + + /** * Property: dataLbl - * {DOMElement} + * {DOMElement} */ dataLbl: null, - - /** + + /** * Property: dataLayersDiv - * {DOMElement} + * {DOMElement} */ dataLayersDiv: null, - /** + /** * Property: dataLayers - * {Array(Object)} + * {Array(Object)} */ dataLayers: null, - /** + /** * Property: minimizeDiv - * {DOMElement} + * {DOMElement} */ minimizeDiv: null, - /** + /** * Property: maximizeDiv - * {DOMElement} + * {DOMElement} */ maximizeDiv: null, - + /** * APIProperty: ascending - * {Boolean} + * {Boolean} */ ascending: true, - + /** * Constructor: OpenLayers.Control.LayerSwitcher - * + * * Parameters: * options - {Object} */ initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this, arguments); this.layerStates = []; - + if(this.roundedCorner) { OpenLayers.Console.warn('roundedCorner option is deprecated'); } }, /** - * APIMethod: destroy - */ + * APIMethod: destroy + */ destroy: function() { - - //clear out layers info and unregister their events + + //clear out layers info and unregister their events this.clearLayersArray("base"); this.clearLayersArray("data"); - + this.map.events.un({ buttonclick: this.onButtonClick, addlayer: this.redraw, @@ -144,15 +144,15 @@ OpenLayers.Control.LayerSwitcher = scope: this }); this.events.unregister("buttonclick", this, this.onButtonClick); - + OpenLayers.Control.prototype.destroy.apply(this, arguments); }, - /** + /** * Method: setMap * * Properties: - * map - {} + * map - {} */ setMap: function(map) { OpenLayers.Control.prototype.setMap.apply(this, arguments); @@ -176,9 +176,9 @@ OpenLayers.Control.LayerSwitcher = * Method: draw * * Returns: - * {DOMElement} A reference to the DIV DOMElement containing the + * {DOMElement} A reference to the DIV DOMElement containing the * switcher tabs. - */ + */ draw: function() { OpenLayers.Control.prototype.draw.apply(this); @@ -191,7 +191,7 @@ OpenLayers.Control.LayerSwitcher = } // populate div with current info - this.redraw(); + this.redraw(); return this.div; }, @@ -224,13 +224,13 @@ OpenLayers.Control.LayerSwitcher = } }, - /** + /** * Method: clearLayersArray * User specifies either "base" or "data". we then clear all the * corresponding listeners, the div, and reinitialize a new array. - * + * * Parameters: - * layersType - {String} + * layersType - {String} */ clearLayersArray: function(layersType) { this[layersType + "LayersDiv"].innerHTML = ""; @@ -241,9 +241,9 @@ OpenLayers.Control.LayerSwitcher = /** * Method: checkRedraw * Checks if the layer state has changed since the last redraw() call. - * + * * Returns: - * {Boolean} The layer state changed since the last redraw() call. + * {Boolean} The layer state changed since the last redraw() call. */ checkRedraw: function() { var redraw = false; @@ -254,41 +254,41 @@ OpenLayers.Control.LayerSwitcher = for (var i=0, len=this.layerStates.length; i Date: Thu, 7 Feb 2013 11:00:50 +0100 Subject: [PATCH 060/148] Give ArcGISCache layer a license header. --- lib/OpenLayers/Layer/ArcGIS93Rest.js | 1 - lib/OpenLayers/Layer/ArcGISCache.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/ArcGIS93Rest.js b/lib/OpenLayers/Layer/ArcGIS93Rest.js index 42967108ef..c5bac36c53 100644 --- a/lib/OpenLayers/Layer/ArcGIS93Rest.js +++ b/lib/OpenLayers/Layer/ArcGIS93Rest.js @@ -3,7 +3,6 @@ * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ - /** * @requires OpenLayers/Layer/Grid.js */ diff --git a/lib/OpenLayers/Layer/ArcGISCache.js b/lib/OpenLayers/Layer/ArcGISCache.js index b9671d35f4..99f7ddac5c 100644 --- a/lib/OpenLayers/Layer/ArcGISCache.js +++ b/lib/OpenLayers/Layer/ArcGISCache.js @@ -1,3 +1,8 @@ +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the 2-clause BSD license. + * See license.txt in the OpenLayers distribution or repository for the + * full text of the license. */ + /** * @requires OpenLayers/Layer/XYZ.js */ From 0dc531794da51523ee8816a684060d04fa291bc0 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 11:04:35 +0100 Subject: [PATCH 061/148] Adjust license header of vendorPrefix.js. --- lib/OpenLayers/Util/vendorPrefix.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Util/vendorPrefix.js b/lib/OpenLayers/Util/vendorPrefix.js index 658719fc0e..89286d7a8b 100644 --- a/lib/OpenLayers/Util/vendorPrefix.js +++ b/lib/OpenLayers/Util/vendorPrefix.js @@ -1,9 +1,9 @@ -/** - * Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. - * + * full text of the license. */ + +/** * @requires OpenLayers/SingleFile.js */ From 6c5ffb69302caf7ffb417423d7b4c6c5cf400439 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 11:08:30 +0100 Subject: [PATCH 062/148] Adjust license header of Animation.js. --- lib/OpenLayers/Animation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Animation.js b/lib/OpenLayers/Animation.js index 7123d6549b..7b47a088a2 100644 --- a/lib/OpenLayers/Animation.js +++ b/lib/OpenLayers/Animation.js @@ -1,9 +1,9 @@ -/** - * Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. - * + * full text of the license. */ + +/** * @requires OpenLayers/SingleFile.js * @requires OpenLayers/Util/vendorPrefix.js */ From 716d85594ca8c5b73e7dfffa0f631f90d3820c79 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 11:11:46 +0100 Subject: [PATCH 063/148] Adjust license header of WPSClient.js. --- lib/OpenLayers/WPSClient.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/WPSClient.js b/lib/OpenLayers/WPSClient.js index 1b783b4edf..e0c8c49926 100644 --- a/lib/OpenLayers/WPSClient.js +++ b/lib/OpenLayers/WPSClient.js @@ -1,9 +1,9 @@ -/** - * Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. - * + * full text of the license. */ + +/** * @requires OpenLayers/SingleFile.js */ From d417ba7c2595ca469533ae579678a74a38db9aeb Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 7 Feb 2013 11:12:11 +0100 Subject: [PATCH 064/148] Adjust license header of WPSProcess.js. --- lib/OpenLayers/WPSProcess.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/WPSProcess.js b/lib/OpenLayers/WPSProcess.js index 88743575cf..874020d1f9 100644 --- a/lib/OpenLayers/WPSProcess.js +++ b/lib/OpenLayers/WPSProcess.js @@ -1,9 +1,9 @@ -/** - * Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for +/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. - * + * full text of the license. */ + +/** * @requires OpenLayers/SingleFile.js */ From 7936f0345fe17eb274177de47f8f69dddaeada04 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 7 Feb 2013 16:44:16 +0100 Subject: [PATCH 065/148] Tile images should not have an id When the TileManager adds an image to its cache, it might be a backbuffer image. Backbuffer images have an id with a '_bb' postfix. Regular images do not have an id at all. In OpenLayers.Layer.Grid, in addTileMonitoringHooks, a loadend listener is created for each tile. This listener checks for tie image id, and will remove it from its parent node. This will cause images to be removed from the layerDiv if the image comes from the TileManager's tileCache and was on a backbuffer by the time it was added to the cache. Simply removing the image's id before assigning it to a tile resolves the issue. --- lib/OpenLayers/TileManager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index c2e86bad9d..78266ed5fa 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -363,6 +363,8 @@ OpenLayers.TileManager = OpenLayers.Class({ img.style.opacity = 0; img.style.visibility = 'hidden'; } + // Only backbuffer tiles have an id, so we don't want one here + img.id = null; tile.setImage(img); // LRU - move tile to the end of the array to mark it as the most // recently used From 09d1b9e8ca7116655f66927401ad8b02836f1029 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Fri, 8 Feb 2013 14:02:20 +0100 Subject: [PATCH 066/148] the tileQueue is not always cleared, for instance when adding a layer in GeoExplorer and then switching base layers, so make sure we also clear the tileQueue when the visibility of a layer changes --- lib/OpenLayers/TileManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/TileManager.js b/lib/OpenLayers/TileManager.js index 78266ed5fa..4ef5031919 100644 --- a/lib/OpenLayers/TileManager.js +++ b/lib/OpenLayers/TileManager.js @@ -183,7 +183,7 @@ OpenLayers.TileManager = OpenLayers.Class({ * evt - {Object} Listener argument */ changeLayer: function(evt) { - if (evt.property === 'params') { + if (evt.property === 'visibility' || evt.property === 'params') { this.updateTimeout(evt.object, 0); } }, @@ -425,4 +425,4 @@ OpenLayers.TileManager = OpenLayers.Class({ this._destroyed = true; } -}); \ No newline at end of file +}); From 97c793281f4dbb6610faf996197c621a4e9148ab Mon Sep 17 00:00:00 2001 From: Gregers Gram Rygg Date: Mon, 11 Feb 2013 16:32:38 +0100 Subject: [PATCH 067/148] Subtract page scroll from button position, since clientX/Y is relative to the viewport not page --- lib/OpenLayers/Events/buttonclick.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/OpenLayers/Events/buttonclick.js b/lib/OpenLayers/Events/buttonclick.js index e0b2a87514..89e10e16e0 100644 --- a/lib/OpenLayers/Events/buttonclick.js +++ b/lib/OpenLayers/Events/buttonclick.js @@ -170,6 +170,12 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({ } else if (this.startEvt) { if (this.completeRegEx.test(evt.type)) { var pos = OpenLayers.Util.pagePosition(button); + var viewportElement = OpenLayers.Util.getViewportElement(); + var scrollTop = window.pageYOffset || viewportElement.scrollTop; + var scrollLeft = window.pageXOffset || viewportElement.scrollLeft; + pos[0] = pos[0] - scrollLeft; + pos[1] = pos[1] - scrollTop; + this.target.triggerEvent("buttonclick", { buttonElement: button, buttonXY: { From 73c5dbd8dcb08a024622bfc9fef57cb2b5aa3c0b Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Mon, 4 Feb 2013 16:43:34 +0100 Subject: [PATCH 068/148] Only valid characters in generated ids. --- lib/OpenLayers/Control/LayerSwitcher.js | 14 +++++-- tests/Control/LayerSwitcher.html | 51 ++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index d4e686d8de..3e4972d28b 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -7,6 +7,7 @@ * @requires OpenLayers/Control.js * @requires OpenLayers/Lang.js * @requires OpenLayers/Console.js + * @requires OpenLayers/Util.js * @requires OpenLayers/Events/buttonclick.js */ @@ -52,7 +53,6 @@ OpenLayers.Control.LayerSwitcher = */ layerStates: null, - // DOM Elements /** @@ -325,8 +325,14 @@ OpenLayers.Control.LayerSwitcher = : layer.getVisibility(); // create input element - var inputElem = document.createElement("input"); - inputElem.id = this.id + "_input_" + layer.name; + var inputElem = document.createElement("input"), + // The input shall have an id attribute so we can use + // labels to interact with them. + inputId = OpenLayers.Util.createUniqueID( + this.id + "_input_" + ); + + inputElem.id = inputId; inputElem.name = (baseLayer) ? this.id + "_baseLayers" : layer.name; inputElem.type = (baseLayer) ? "radio" : "checkbox"; inputElem.value = layer.name; @@ -342,6 +348,8 @@ OpenLayers.Control.LayerSwitcher = // create span var labelSpan = document.createElement("label"); + // this isn't the DOM attribute 'for', but an arbitrary name we + // use to find the appropriate input element in labelSpan["for"] = inputElem.id; OpenLayers.Element.addClass(labelSpan, "labelSpan olButton"); labelSpan._layer = layer.id; diff --git a/tests/Control/LayerSwitcher.html b/tests/Control/LayerSwitcher.html index 0094e77108..0b42257151 100644 --- a/tests/Control/LayerSwitcher.html +++ b/tests/Control/LayerSwitcher.html @@ -88,13 +88,13 @@ control = new OpenLayers.Control.LayerSwitcher(); map.addControl(control); - var wmsInput = OpenLayers.Util.getElement(control.id + "_input_" + layer.name); + var wmsInput = control.div.childNodes[0].childNodes[1].childNodes[0]; t.ok(wmsInput != null, "correctly makes an input for wms layer"); t.eq(wmsInput.type, "radio", "wms correctly made a radio button"); t.eq(wmsInput.name, control.id + "_baseLayers", "wms correctly named"); t.eq(wmsInput.value, layer.name, "wms correctly valued"); - var markersInput = OpenLayers.Util.getElement(control.id + "_input_" + markers.name); + var markersInput = control.div.childNodes[0].childNodes[3].childNodes[0]; t.ok(markersInput != null, "correctly makes an input for markers layer"); t.eq(markersInput.type, "checkbox", "wms correctly made a radio button"); t.eq(markersInput.name, markers.name, "wms correctly named"); @@ -191,7 +191,54 @@ t.eq(control.div.childNodes[0].childNodes[0].style.display, "" , "Base layer display on when visble base layer"); } + // See e.g. https://github.com/openlayers/openlayers/issues/866 + function test_Control_LayerSwitcher_validIds(t){ + t.plan(2); + // setup + var layername = "Name with spaces & illegal characters * + ~ ` ' ? )", + map = new OpenLayers.Map("map", { + controls: [ + new OpenLayers.Control.LayerSwitcher() + ], + layers: [ + new OpenLayers.Layer.WMS( + layername, + "http://example.com/" + ), + // add another layer with the same name, the generated id + // must be different + new OpenLayers.Layer.WMS( + layername, + "http://example.com/" + ) + ] + }); + + var baselayerDiv = map.controls[0].div.childNodes[0].childNodes[1], + firstGeneratedInputId = baselayerDiv.childNodes[0].id, + secondGeneratedInputId = baselayerDiv.childNodes[1].id, + // legal ids start with a letter and are followed only by word + // characters (letters, digits, and underscores) plus the dash (-) + // This is only a subset of all allowed charcters inside of ids. + allowedIdChars = (/^[a-zA-Z]{1}[\w-]*$/g); + + // tests + // validity + t.ok( + allowedIdChars.test(firstGeneratedInputId), + "id only contains letters, digits, underscores and dashes. It " + + "starts with a letter." + ); + // uniqueness + t.ok( + firstGeneratedInputId !== secondGeneratedInputId, + "generated ids are different even for equal layernames" + ); + + // teardown + map.destroy(); + } From 465498b83a2f86c03df9486d18a3d017c872a429 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 14 Feb 2013 09:10:18 +0100 Subject: [PATCH 069/148] Use blank.gif as WMS-mockup URL in test. --- tests/Control/LayerSwitcher.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Control/LayerSwitcher.html b/tests/Control/LayerSwitcher.html index 0b42257151..c81a77934a 100644 --- a/tests/Control/LayerSwitcher.html +++ b/tests/Control/LayerSwitcher.html @@ -204,13 +204,13 @@ layers: [ new OpenLayers.Layer.WMS( layername, - "http://example.com/" + "../../img/blank.gif" ), // add another layer with the same name, the generated id // must be different new OpenLayers.Layer.WMS( layername, - "http://example.com/" + "../../img/blank.gif" ) ] }); From d0249643b344629dd6951eb4d7de40acbcee91b6 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 14 Feb 2013 10:11:48 +0100 Subject: [PATCH 070/148] Incorporating @elemoine's review comments --- lib/OpenLayers/Layer/Grid.js | 9 ----- lib/OpenLayers/Map.js | 5 ++- tests/Layer/Grid.html | 71 +++++++++++++++++++++++++++++++++++- tests/Map.html | 4 +- 4 files changed, 74 insertions(+), 15 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index acaf6f5078..ad8a04a995 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1140,15 +1140,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); }, - /** - * Method: onLoadEnd - * Sets the loading flag to false and triggers the loadend event. - */ - onLoadEnd: function() { - this.loading = false; - this.events.triggerEvent("loadend"); - }, - /** * Method: removeTileMonitoringHooks * This function takes a tile as input and removes the tile hooks diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 83dca79426..dbd0349a85 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -2399,7 +2399,7 @@ OpenLayers.Map = OpenLayers.Class({ // update the end scale, and reuse the running zoomTween map.zoomTween.finish = { scale: map.zoomTween.finish.scale * end.scale - } + }; } else { if (!xy) { var size = map.getSize(); @@ -2805,7 +2805,8 @@ OpenLayers.Map = OpenLayers.Class({ if (transform) { // Try translate3d, but only if the viewPortDiv has a transform // defined in a stylesheet - var computedStyle = OpenLayers.Element.getStyle(this.viewPortDiv, OpenLayers.Util.vendorPrefix.css('transform')); + var computedStyle = OpenLayers.Element.getStyle(this.viewPortDiv, + OpenLayers.Util.vendorPrefix.css('transform')); if (!computedStyle || computedStyle !== 'none') { template = ['translate3d(', ',0) ', 'scale3d(', ',1)']; style[transform] = [template[0], '0,0', template[1]].join(''); diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 6903db6f26..aff5a5422f 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -968,7 +968,7 @@ } function test_applyBackBuffer(t) { - t.plan(9); + t.plan(12); var map = new OpenLayers.Map('map2'); var layer = new OpenLayers.Layer.WMS('', '', {}, { @@ -1025,7 +1025,25 @@ t.eq(layer.backBuffer.style.top, '295px', 'back buffer has correct top'); - map.destroy(); + // test #4 + // and a back buffer in the layer and do as if back buffer removal + // has been scheduled, and test that applyBackBuffer removes the + // back buffer and clears the timer + layer.createBackBuffer = function() { + return; + }; + backBuffer = document.createElement('div'); + map.layerContainerDiv.insertBefore(backBuffer, map.baseLayer.div); + layer.backBuffer = backBuffer; + layer.backBufferTimerId = 'fake'; + layer.applyBackBuffer(2); + t.ok(backBuffer !== map.layerContainerDiv.firstChild, + 'back buffer is not first child of layer container div'); + t.eq(layer.backBuffer, null, + 'back buffer not set in layer'); + t.eq(layer.backBufferTimerId, null, + 'back buffer timer cleared'); + map.destroy(); } function test_createBackBuffer(t) { @@ -1269,6 +1287,55 @@ OpenLayers.Tile.Image.prototype.createBackBuffer = origCreateBackBuffer } + + function test_delayed_back_buffer_removal(t) { + // + // Test that the delaying of the back buffer removal behaves + // as expected. + // + + t.plan(5); + + // set up + + var map = new OpenLayers.Map('map', { + resolutions: [32, 16, 8, 4, 2, 1], + zoomMethod: null + }); + var layer = new OpenLayers.Layer.WMS('', '', {}, { + isBaseLayer: true, + transitionEffect: 'resize' + }); + map.addLayer(layer); + map.setCenter(new OpenLayers.LonLat(0, 0), 0); + + map.zoomTo(1); + + t.ok(layer.backBuffer === map.layerContainerDiv.firstChild, + '[a] back buffer is first child of layer container div'); + + // Mark one tile loaded, to see if back buffer removal gets scheduled. + layer.grid[1][1].onImageLoad(); + + t.ok(layer.backBufferTimerId !== null, + '[a] back buffer scheduled for removal'); + + var backBuffer = layer.backBuffer; + + map.zoomTo(2); + + t.ok(layer.backBuffer !== backBuffer, + '[b] a new back buffer was created'); + t.ok(layer.backBuffer === map.layerContainerDiv.firstChild, + '[b] back buffer is first child of layer container div'); + t.ok(layer.backBufferTimerId === null, + '[b] back buffer no longer scheduled for removal'); + + // tear down + + map.destroy(); + } + function test_getGridData(t) { t.plan(12); diff --git a/tests/Map.html b/tests/Map.html index 4b1475a75d..0de10e7a56 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -2022,7 +2022,7 @@ map.applyTransform = function(x, y, scale) { log.push([x || map.layerContainerOriginPx.x, y || map.layerContainerOriginPx.y, scale]); OpenLayers.Map.prototype.applyTransform.apply(this, arguments); - } + }; moved = {}; map.zoomToExtent(new OpenLayers.Bounds(-1, -1, 1, 1)); @@ -2091,7 +2091,7 @@ map.applyTransform = function(x, y, scale) { log.push([x || map.layerContainerOriginPx.x, y || map.layerContainerOriginPx.y, scale]); OpenLayers.Map.prototype.applyTransform.apply(this, arguments); - } + }; map.moveByPx(-10, -10); t.eq(log[0][0], 10, 'layer container left correct'); From e9b65691c44f236d4338fd6b222d948a11d12fa7 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 14 Feb 2013 10:44:41 +0100 Subject: [PATCH 071/148] Updating example to match @ahocevar's mobile-wmts-vienna branch --- examples/mobile-wmts-vienna.js | 53 ++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index ab593e04ce..ded4d00f83 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -96,20 +96,14 @@ var map; theme: null, projection: "EPSG:3857", units: "m", - maxExtent: [-20037508.34, -20037508.34, 20037508.34, 20037508.34], - maxResolution: 156543.0339, - numZoomLevels: 20, + restrictedExtent: [1799448.394855, 6124949.747770, 1848250.442089, 6162571.828177], + maxResolution: 38.21851413574219, + numZoomLevels: 8, tileManager: new OpenLayers.TileManager(), controls: [ new OpenLayers.Control.Navigation({ - mouseWheelOptions: { - cumulative: false, - interval: 20 - }, dragPanOptions: { - enableKinetic: { - deceleration: 0.02 - } + enableKinetic: true }, zoomBoxEnabled: false }), @@ -133,9 +127,11 @@ var map; // Defaults for the WMTS layers var defaults = { + zoomOffset: 12, requestEncoding: "REST", matrixSet: "google3857", - attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' + attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at', + transitionEffect: "resize" }; // The WMTS layers we're going to add @@ -160,10 +156,10 @@ var map; var doc = request.responseText, caps = format.read(doc); fmzk = format.createLayer(caps, OpenLayers.Util.applyDefaults( - {layer:"fmzk", transitionEffect:"resize"}, defaults + {layer:"fmzk"}, defaults )); aerial = format.createLayer(caps, OpenLayers.Util.applyDefaults( - {layer:"lb", transitionEffect:"resize"}, defaults + {layer:"lb"}, defaults )); labels = format.createLayer(caps, OpenLayers.Util.applyDefaults( {layer:"beschriftung", isBaseLayer: false}, @@ -182,24 +178,39 @@ var map; var extent = new OpenLayers.Bounds(1799448.394855, 6124949.74777, 1848250.442089, 6162571.828177); defaults.tileFullExtent = extent; fmzk = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://maps.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + url: [ + "http://maps.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps1.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps2.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps3.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps4.wien.gv.at/wmts/fmzk/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg" + ], layer: "fmzk", - style: "pastell", - transitionEffect: "resize" + style: "pastell" }, defaults)); aerial = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://maps.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + url: [ + "http://maps.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps1.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps2.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps3.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg", + "http://maps4.wien.gv.at/wmts/lb/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg" + ], layer: "lb", - style: "farbe", - transitionEffect: "resize" + style: "farbe" }, defaults)); labels = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://maps.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", + url: [ + "http://maps.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", + "http://maps1.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", + "http://maps2.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", + "http://maps3.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", + "http://maps4.wien.gv.at/wmts/beschriftung/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png" + ], layer: "beschriftung", style: "normal", - transitionEffect: null, isBaseLayer: false }, defaults)); From e9eefc7a33824ed511db0e2e9022fe02dd2b9bdf Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 12:29:03 -0700 Subject: [PATCH 072/148] Fewer failing tests There are still tests failing, but this change addresses some of the new failures after 4b163e04826236ad37baa591bca6c381f60c7c85 (which is an awesome improvement despite the test failures :). --- tests/Control/ZoomBox.html | 1 + tests/Layer/WMS.html | 2 +- tests/TileManager.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Control/ZoomBox.html b/tests/Control/ZoomBox.html index 2e037192e5..0ff3e6010c 100644 --- a/tests/Control/ZoomBox.html +++ b/tests/Control/ZoomBox.html @@ -23,6 +23,7 @@ function test_zoomBox(t) { t.plan(4); var map = new OpenLayers.Map("map", { + zoomMethod: null, layers: [new OpenLayers.Layer("", {isBaseLayer: true})], center: [0, 0], zoom: 1 diff --git a/tests/Layer/WMS.html b/tests/Layer/WMS.html index 08037e2312..8ceb5874b8 100644 --- a/tests/Layer/WMS.html +++ b/tests/Layer/WMS.html @@ -557,7 +557,7 @@ function test_tileBounds(t) { t.plan(3); - var map = new OpenLayers.Map("map", {projection: "EPSG:3857"}); + var map = new OpenLayers.Map("map", {projection: "EPSG:3857", zoomMethod: null}); var layer = new OpenLayers.Layer.WMS("wms", "../../img/blank.gif"); map.addLayer(layer); map.setCenter([0, 0], 1); diff --git a/tests/TileManager.html b/tests/TileManager.html index b49b1bc1b1..72a58b4922 100644 --- a/tests/TileManager.html +++ b/tests/TileManager.html @@ -8,6 +8,7 @@ var tileManager = new OpenLayers.TileManager(); var map = new OpenLayers.Map('map', { + zoomMethod: null, tileManager: tileManager }); var layer = new OpenLayers.Layer.WMS('WMS1', '../img/blank.gif'); From ba0ba64c7402b7d5ad251d0baa57e6f664d1d90a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 14 Feb 2013 22:13:07 +0100 Subject: [PATCH 073/148] Updating PinchZoom tests (see #800) With the map's applyTransform method, the control does not need and have its own applyTransform and center management any more. --- tests/Control/PinchZoom.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Control/PinchZoom.html b/tests/Control/PinchZoom.html index 3fc5ba6851..22db6a5039 100644 --- a/tests/Control/PinchZoom.html +++ b/tests/Control/PinchZoom.html @@ -95,23 +95,23 @@ var centerPx = map.getPixelFromLonLat(map.getCenter()); control.pinchStart = function(evt, pinchData) { - t.eq(control.pinchOrigin, centerPx, "center preserved"); - t.eq(control.currentCenter, centerPx, "center preserved"); + t.eq(map.layerContainerOriginPx, {x: 0, y: 0}, "center preserved"); + t.eq(map.getPixelFromLonLat(map.getCenter()), centerPx, "center preserved"); } control.pinchStart(null); var log = []; - control.applyTransform = function(transform) { - log.push(transform); + map.applyTransform = function(x, y, scale) { + log.push([x, y, scale]); } control.pinchOrigin = map.getPixelFromLonLat(map.getCenter()); var cases = [ - {scale: 1, transform: "translate(0px, 0px) scale(1)"}, - {scale: 2, transform: "translate(-128px, -128px) scale(2)"}, - {scale: 2.5, transform: "translate(-192px, -192px) scale(2.5)"}, - {scale: 0.25, transform: "translate(96px, 96px) scale(0.25)"} + {scale: 1, transform: [0, 0, 1]}, + {scale: 2, transform: [-128, -128, 2]}, + {scale: 2.5, transform: [-192, -192, 2.5]}, + {scale: 0.25, transform: [96, 96, 0.25]} ]; var len = cases.length; From d32ab412927cf135114ad1d59cc34d85a1881c1a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 14:22:11 -0700 Subject: [PATCH 074/148] Correcting misinformation --- lib/OpenLayers/BaseTypes/Bounds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index f40ca231f9..1e1e3715f0 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -63,7 +63,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * left - {Number} The left bounds of the box. Note that for width * calculations, this is assumed to be less than the right value. * bottom - {Number} The bottom bounds of the box. Note that for height - * calculations, this is assumed to be more than the top value. + * calculations, this is assumed to be less than the top value. * right - {Number} The right bounds. * top - {Number} The top bounds. * From 30c82bad45e8b53c0efd4e16f04672aa7a1a651f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 14:24:14 -0700 Subject: [PATCH 075/148] For pixel bounds, the bottom is a larger value than the top This still doesn't address the broken ZoomBox test (see #800), it fails in the same way with or without this change. --- tests/Control/ZoomBox.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Control/ZoomBox.html b/tests/Control/ZoomBox.html index 0ff3e6010c..7763bcff2c 100644 --- a/tests/Control/ZoomBox.html +++ b/tests/Control/ZoomBox.html @@ -38,7 +38,8 @@ t.eq(map.getZoom(), 2, "not zoomed with zoomOnClick set to false"); map.zoomToMaxExtent(); - control.zoomBox(new OpenLayers.Bounds(128, 64, 256, 128)); + // pixel bounds bottom > top + control.zoomBox(new OpenLayers.Bounds(128, 128, 256, 64)); t.eq(map.getCenter().toShortString(), "-45, 22.5", "centered to box center"); t.eq(map.getZoom(), 3, "zoomed to box extent"); From 1ac16835f299379282eef6a5193e8432f1df11d0 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 14:27:00 -0700 Subject: [PATCH 076/148] If we are getting flipped top/bottom, let's correct it at the source --- lib/OpenLayers/Control/ZoomBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index 217a90a434..68fd1c3d34 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -83,8 +83,8 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat, maxXY.lon, maxXY.lat); } else { - var pixWidth = Math.abs(position.right-position.left); - var pixHeight = Math.abs(position.top-position.bottom); + var pixWidth = position.right - position.left; + var pixHeight = position.bottom - position.top; var zoomFactor = Math.min((this.map.size.h / pixHeight), (this.map.size.w / pixWidth)); var extent = this.map.getExtent(); From 399c8ff6432f75801d7f39557679a6308678a311 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 14:38:35 -0700 Subject: [PATCH 077/148] Correct calculation of anchor for zooming Quick explanation: Let targetCenterPx be described by PX and PY. Let oldRes and newRes be R0 and R1 respectively. Let centerPx (center after zoom) be described by CX and CY. And assume there is some anchored pixel point out there that represents the same map location before and after zoom. Let this be the origin OX and OY. We want to recenter the map on the provided box. This means the map distance between the origin and box center at R0 is the same as the map distance between the origin and the map center at R1. That is, R0 * (OX - PX) = R1 * (OX - CX), and R1 * (OY - PY) = R1 * (OY - CY) Or, solving for OX and OY: OX = (R0 * PX - R1 * CX) / (R0 - R1), and OY = (R0 * PY - R1 * CY) / (R0 - R1) --- lib/OpenLayers/Control/ZoomBox.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index 68fd1c3d34..f8cea39bed 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -103,10 +103,10 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { oldRes = this.map.getResolution(), newRes = this.map.getResolutionForZoom(zoom), zoomOriginPx = { - x: targetCenterPx.x + - (targetCenterPx.x - centerPx.x) * newRes / oldRes, - y: targetCenterPx.y + - (targetCenterPx.y - centerPx.y) * newRes / oldRes + x: (oldRes * targetCenterPx.x - newRes * centerPx.x) / + (oldRes - newRes), + y: (oldRes * targetCenterPx.y - newRes * centerPx.y) / + (oldRes - newRes) }; this.map.zoomTo(zoom, zoomOriginPx); if (lastZoom == this.map.getZoom() && this.alwaysZoom == true){ From 891cd35f60cbd129c346f54bd8aaf1eea30e0103 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:17:55 -0700 Subject: [PATCH 078/148] Kinetic dragging by default --- lib/OpenLayers/Control/DragPan.js | 10 +++++----- notes/2.13.md | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Control/DragPan.js b/lib/OpenLayers/Control/DragPan.js index 1b9bd1fab4..2e2146f2cd 100644 --- a/lib/OpenLayers/Control/DragPan.js +++ b/lib/OpenLayers/Control/DragPan.js @@ -56,11 +56,11 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { * {Boolean} Set this option to enable "kinetic dragging". Can be * set to true or to an object. If set to an object this * object will be passed to the {} - * constructor. Defaults to false. - * If you set this property, you should ensure that - * OpenLayers/Kinetic.js is included in your build config + * constructor. Defaults to true. + * To get kinetic dragging, ensure that OpenLayers/Kinetic.js is + * included in your build config. */ - enableKinetic: false, + enableKinetic: true, /** * APIProperty: kineticInterval @@ -77,7 +77,7 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { * as callbacks. */ draw: function() { - if(this.enableKinetic) { + if (this.enableKinetic && OpenLayers.Kinetic) { var config = {interval: this.kineticInterval}; if(typeof this.enableKinetic === "object") { config = OpenLayers.Util.extend(config, this.enableKinetic); diff --git a/notes/2.13.md b/notes/2.13.md index dd3ca649a1..288d980b76 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -51,6 +51,10 @@ The `moveDelay` is the replacement for the `tileLoadingDelay` layer config optio In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager. +## Control.DragPan: Kinetic by default + +The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build. + ## window.$ is no longer an alias for OpenLayers.Util.getElement We do no longer create a global variable '$' when such a symbol isn't already From 0cf98333625bb5fa6292accb414aa3714e74f372 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:18:07 -0700 Subject: [PATCH 079/148] Resize transitions by default --- lib/OpenLayers/Layer/Grid.js | 8 ++++---- notes/2.13.md | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 2e09885e94..304920f217 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -96,16 +96,16 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {String} The transition effect to use when the map is zoomed. * Two posible values: * - * null - No transition effect (the default). * "resize" - Existing tiles are resized on zoom to provide a visual * effect of the zoom having taken place immediately. As the * new tiles become available, they are drawn over top of the - * resized tiles. + * resized tiles (this is the default setting). + * null - No transition effect. * * Using "resize" on non-opaque layers can cause undesired visual - * effects. This is therefore discouraged. + * effects. Set transitionEffect to null in this case. */ - transitionEffect: null, + transitionEffect: "resize", /** * APIProperty: numLoadingTiles diff --git a/notes/2.13.md b/notes/2.13.md index 288d980b76..9af7553152 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -51,6 +51,10 @@ The `moveDelay` is the replacement for the `tileLoadingDelay` layer config optio In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager. +## Layer.Grid: Resize transitions by default + +The `transitionEffect` property for grid layers has been changed to "resize" by default. This allows smooth transitions with animated zooming (also enabled by default). If resize transitions are not wanted for individual layers, set `transitionEffect` to `null`. + ## Control.DragPan: Kinetic by default The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build. From a2896beafdb1bbdcce99c86c0bf088da5a66bc93 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:26:05 -0700 Subject: [PATCH 080/148] As the comments mention, this assumes null transitionEffect --- tests/Layer/Grid.html | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 68c65ecfbe..1a4d9abfca 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1181,6 +1181,7 @@ var map = new OpenLayers.Map('map', {zoomMethod: null}); var layer = new OpenLayers.Layer.WMS('', '', {}, { isBaseLayer: true, + transitionEffect: null, singleTile: true, ratio: 1.1 }); From 419cb272c7de2c6bee1e54427a4977570974e5cf Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 16 Feb 2013 10:32:35 +0100 Subject: [PATCH 081/148] Adding ZoomBox and OSM fallback layer Using the new defaults, we don't need to pass options to the Navigation control anymore. As a side effect, we get ZoomBox, but need to add css for it to work properly. For users outside Vienna, an OSM fallback layer was added which gets activated when the viewport does not intersect Vienna. --- examples/mobile-wmts-vienna.css | 15 +++++ examples/mobile-wmts-vienna.js | 102 +++++++++++++++++--------------- 2 files changed, 68 insertions(+), 49 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index 48e83d8372..82af86790b 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -30,12 +30,27 @@ html, body, #map { perspective: 1000; } +/* Tile fade animation */ .olLayerGrid .olTileImage { -webkit-transition: opacity 0.2s linear; -moz-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear; transition: opacity 0.2s linear; } + +/* Zoom Box */ +.olHandlerBoxZoomBox { + border: 2px solid red; + position: absolute; + background-color: white; + opacity: 0.50; + font-size: 1px; + filter: alpha(opacity=50); +} +.olDrawBox { + cursor: crosshair; +} + div.olControlAttribution { position: absolute; font-size: 10px; diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index ded4d00f83..ca28f1e1e9 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -46,49 +46,53 @@ var map; // Geolocate control for the Locate button - the locationupdated handler // draws a cross at the location and a circle showing the accuracy radius. - zoomPanel.addControls([ - new OpenLayers.Control.Geolocate({ - type: OpenLayers.Control.TYPE_TOGGLE, - geolocationOptions: { - enableHighAccuracy: false, - maximumAge: 0, - timeout: 7000 + var geolocate = new OpenLayers.Control.Geolocate({ + type: OpenLayers.Control.TYPE_TOGGLE, + bind: false, + watch: true, + geolocationOptions: { + enableHighAccuracy: false, + maximumAge: 0, + timeout: 7000 + }, + eventListeners: { + activate: function() { + map.addLayer(vector); }, - eventListeners: { - activate: function() { - map.addLayer(vector); - }, - deactivate: function() { - map.removeLayer(vector); - vector.removeAllFeatures(); - }, - locationupdated: function(e) { - vector.removeAllFeatures(); - vector.addFeatures([ - new OpenLayers.Feature.Vector(e.point, null, { - graphicName: 'cross', + deactivate: function() { + map.removeLayer(vector); + vector.removeAllFeatures(); + }, + locationupdated: function(e) { + vector.removeAllFeatures(); + vector.addFeatures([ + new OpenLayers.Feature.Vector(e.point, null, { + graphicName: 'cross', + strokeColor: '#f00', + strokeWidth: 2, + fillOpacity: 0, + pointRadius: 10 + }), + new OpenLayers.Feature.Vector( + OpenLayers.Geometry.Polygon.createRegularPolygon( + new OpenLayers.Geometry.Point(e.point.x, e.point.y), + e.position.coords.accuracy / 2, 50, 0 + ), null, { + fillOpacity: 0.1, + fillColor: '#000', strokeColor: '#f00', - strokeWidth: 2, - fillOpacity: 0, - pointRadius: 10 - }), - new OpenLayers.Feature.Vector( - OpenLayers.Geometry.Polygon.createRegularPolygon( - new OpenLayers.Geometry.Point(e.point.x, e.point.y), - e.position.coords.accuracy / 2, 50, 0 - ), null, { - fillOpacity: 0.1, - fillColor: '#000', - strokeColor: '#f00', - strokeOpacity: 0.6 - } - ) - ]); - map.zoomToExtent(vector.getDataExtent()); - } + strokeOpacity: 0.6 + } + ) + ]); + map.zoomToExtent(vector.getDataExtent()); } - }) - ]); + } + }) + zoomPanel.addControls([geolocate]); + + // Fallback layer when outside Vienna + var osm = new OpenLayers.Layer.OSM(); // Map with navigation controls optimized for touch devices map = new OpenLayers.Map({ @@ -96,17 +100,11 @@ var map; theme: null, projection: "EPSG:3857", units: "m", - restrictedExtent: [1799448.394855, 6124949.747770, 1848250.442089, 6162571.828177], maxResolution: 38.21851413574219, numZoomLevels: 8, tileManager: new OpenLayers.TileManager(), controls: [ - new OpenLayers.Control.Navigation({ - dragPanOptions: { - enableKinetic: true - }, - zoomBoxEnabled: false - }), + new OpenLayers.Control.Navigation(), new OpenLayers.Control.Attribution(), zoomPanel, layerPanel @@ -116,6 +114,13 @@ var map; // update anchor for permalinks var ctr = map.getCenter(); window.location.hash = "x="+ctr.lon+"&y="+ctr.lat+"&z="+map.getZoom(); + // switch to OSM when outside Vienna + if (!map.getExtent().intersectsBounds(fmzk.tileFullExtent)) { + if (map.baseLayer !== osm) { + map.addLayer(osm); + map.setBaseLayer(osm); + } + } } } }); @@ -130,8 +135,7 @@ var map; zoomOffset: 12, requestEncoding: "REST", matrixSet: "google3857", - attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at', - transitionEffect: "resize" + attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' }; // The WMTS layers we're going to add From 2f85ca99bf827936685451586107f7467b990f7e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sun, 17 Feb 2013 12:53:59 +0100 Subject: [PATCH 082/148] Remove osm layer when back in Vienna Thanks @tschaub for this suggestion. --- examples/mobile-wmts-vienna.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index ca28f1e1e9..183240a81a 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -88,7 +88,7 @@ var map; map.zoomToExtent(vector.getDataExtent()); } } - }) + }); zoomPanel.addControls([geolocate]); // Fallback layer when outside Vienna @@ -120,6 +120,8 @@ var map; map.addLayer(osm); map.setBaseLayer(osm); } + } else if (map.baseLayer === osm) { + map.removeLayer(osm); } } } From 007368fce519256df96f73fcea5882d3792a91d6 Mon Sep 17 00:00:00 2001 From: rauldobrota Date: Mon, 18 Feb 2013 23:39:56 -0800 Subject: [PATCH 083/148] Create ro.js Language support for romanian users. --- lib/OpenLayers/Lang/ro.js | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 lib/OpenLayers/Lang/ro.js diff --git a/lib/OpenLayers/Lang/ro.js b/lib/OpenLayers/Lang/ro.js new file mode 100644 index 0000000000..6e8a04f003 --- /dev/null +++ b/lib/OpenLayers/Lang/ro.js @@ -0,0 +1,69 @@ +/** + * @requires OpenLayers/Lang.js + */ +/** + * Namespace: OpenLayers.Lang["ro"] + * Dictionary for Romanian. Keys for entries are used in calls to + * . Entry bodies are normal strings or + * strings formatted for use with calls. +*/ +OpenLayers.Lang.ro = { + 'unhandledRequest': "Cerere nesoluÈ›ionată return ${statusText}", + 'Permalink': "Legatură permanentă", + 'Overlays': "Straturi vector", + 'Base Layer': "Straturi de bază", + 'noFID': "Nu pot actualiza un feature pentru care nu există FID.", + 'browserNotSupported': + "Browserul tău nu suportă afiÈ™area vectorilor. Supoetul curent pentru randare:\n${renderers}", + // console message + 'minZoomLevelError': + "Proprietatea minZoomLevel este doar pentru a fi folosită " + + "cu straturile FixedZoomLevels-descendent. De aceea acest " + + "strat wfs verifică dacă minZoomLevel este o relicvă" + + ". Nu îl putem , oricum, înlătura fără " + + "a afecta aplicaÈ›iile Openlayers care depind de ea." + + " De aceea considerăm depreciat -- minZoomLevel " + + "È™i îl vom înlătura în 3.0. FoloseÈ™te " + + "min/max resolution cum este descrisă aici: " + + "http://trac.openlayers.org/wiki/SettingZoomLevels", + 'commitSuccess': "TranzacÈ›ie WFS: SUCCES ${response}", + 'commitFailed': "TranzacÈ›ie WFS : EȘEC ${response}", + 'googleWarning': + "Stratul Google nu a putut fi încărcat corect.

" + + "Pentru a elimina acest mesaj, selectează un nou strat de bază " + + "în Layerswitcher din colțul dreata-sus.

" + + "Asta datorită, faptului că Google Maps library " + + "script nu este inclus, sau nu conține " + + "cheia API corectă pentru situl tău.

" + + "Developeri: Pentru ajutor, " + + "apăsați aici", + 'getLayerWarning': + "Stratul ${layerType} nu a putut fi încărcat corect.

" + + "pentru a înlătura acest mesaj, selectează un nou strat de bază " + + "Acesta eroare apare de obicei când ${layerLib} library " + + "script nu a fost încărcat corect.

" + + "Developeri: Pentru ajutor privind utilizarea corectă, " + + "apasă aici", + 'Scale = 1 : ${scaleDenom}': "Scara = 1 : ${scaleDenom}", + //labels for the graticule control + 'W': 'V', + 'E': 'E', + 'N': 'N', + 'S': 'S', + 'Graticule': 'Graticule', + // console message + 'reprojectDeprecated': + "foloseÈ™ti opÈ›iunea 'reproject' " + + "pentru stratul ${layerName} . Această opÈ›iune este depreciată: " + + "a fost utilizată pentru afiÈ™area straturilor de bază comerciale " + + "Mai multe informaÈ›ii despre proiecÈ›ia Mercator sunt disponibile aici " + + "http://trac.openlayers.org/wiki/SphericalMercator.", + // console message + 'methodDeprecated': + "Această metodă este depreciată È™i va fi înlăturată in versiunea 3.0. " + + "foloseÈ™te metoda ${newMethod}.", + // **** end **** + 'end': '' +}; From 22db2a9f61f6c3646da60475c663656f04505281 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 20 Feb 2013 13:33:04 -0700 Subject: [PATCH 084/148] Update MapQuest tile URL templates --- examples/mapquest.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/mapquest.js b/examples/mapquest.js index 9761e897b3..5a45d1c3ed 100644 --- a/examples/mapquest.js +++ b/examples/mapquest.js @@ -5,10 +5,10 @@ var map = new OpenLayers.Map({ new OpenLayers.Layer.XYZ( "OpenStreetMap", [ - "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", - "http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png" + "http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png", + "http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png", + "http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png", + "http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png" ], { attribution: "Data, imagery and map information provided by MapQuest, Open Street Map and contributors, CC-BY-SA ", @@ -18,10 +18,10 @@ var map = new OpenLayers.Map({ new OpenLayers.Layer.XYZ( "Imagery", [ - "http://oatile1.mqcdn.com/naip/${z}/${x}/${y}.png", - "http://oatile2.mqcdn.com/naip/${z}/${x}/${y}.png", - "http://oatile3.mqcdn.com/naip/${z}/${x}/${y}.png", - "http://oatile4.mqcdn.com/naip/${z}/${x}/${y}.png" + "http://otile1.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png", + "http://otile2.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png", + "http://otile3.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png", + "http://otile4.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png" ], { attribution: "Tiles Courtesy of MapQuest. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency. ", From f1a79135b4e2214a5f106ec6c2516520fd70d6a2 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 21 Feb 2013 11:31:41 -0700 Subject: [PATCH 085/148] Chasing tiles --- examples/mapbox.js | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/examples/mapbox.js b/examples/mapbox.js index 134d0d865e..f5679dcf63 100644 --- a/examples/mapbox.js +++ b/examples/mapbox.js @@ -1,35 +1,21 @@ -var streets = new OpenLayers.Layer.XYZ( - "MapBox Streets", +var earth = new OpenLayers.Layer.XYZ( + "Natural Earth", [ - "http://a.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png", - "http://b.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png", - "http://c.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png", - "http://d.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png" + "http://a.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png", + "http://b.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png", + "http://c.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png", + "http://d.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png" ], { - attribution: "Tiles © MapBox | " + - "Data © OpenStreetMap " + - "and contributors, CC-BY-SA", + attribution: "Tiles © MapBox", sphericalMercator: true, wrapDateLine: true, - transitionEffect: "resize", - buffer: 1, - numZoomLevels: 17 + numZoomLevels: 5 } ); var map = new OpenLayers.Map({ div: "map", - layers: [streets], - controls: [ - new OpenLayers.Control.Attribution(), - new OpenLayers.Control.Navigation({ - dragPanOptions: { - enableKinetic: true - } - }), - new OpenLayers.Control.Zoom(), - new OpenLayers.Control.Permalink({anchor: true}) - ], + layers: [earth], center: [0, 0], zoom: 1 }); From 8e555dee560d77bcef5755841143d5c11928ab2a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 21 Feb 2013 12:12:12 -0700 Subject: [PATCH 086/148] Overriding createBackBuffer in UTFGrid layer This layer doesn't need to create a backbuffer. --- lib/OpenLayers/Layer/UTFGrid.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/OpenLayers/Layer/UTFGrid.js b/lib/OpenLayers/Layer/UTFGrid.js index 51db26402c..c6448816c4 100644 --- a/lib/OpenLayers/Layer/UTFGrid.js +++ b/lib/OpenLayers/Layer/UTFGrid.js @@ -109,6 +109,12 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.XYZ, { utfgridResolution: this.utfgridResolution }, this.tileOptions); }, + + /** + * Method: createBackBuffer + * The UTFGrid cannot create a back buffer, so this method is overriden. + */ + createBackBuffer: function() {}, /** * APIMethod: clone From 461c5c43284f39726130fd8b6c16315f0e86aec3 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 21 Feb 2013 12:17:55 -0700 Subject: [PATCH 087/148] Test that createBackBuffer doesn't fail --- tests/Layer/UTFGrid.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Layer/UTFGrid.html b/tests/Layer/UTFGrid.html index 16cb852a02..08ff16d422 100644 --- a/tests/Layer/UTFGrid.html +++ b/tests/Layer/UTFGrid.html @@ -58,6 +58,19 @@ layer.destroy(); } + + function test_createBackBuffer(t) { + t.plan(1); + setUp(); + + var got; + try { + got = layer.createBackBuffer(); + } catch (e) { + got = e; + } + t.eq(got, undefined, "createBackBuffer returns undefined"); + } function test_clone(t) { t.plan(3); From 7c4df5186f81eebf3d11ebb1c1a6a4eb79f5340b Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 21 Feb 2013 12:19:34 -0700 Subject: [PATCH 088/148] Test clean up --- tests/Layer/UTFGrid.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Layer/UTFGrid.html b/tests/Layer/UTFGrid.html index 08ff16d422..f90403e6f0 100644 --- a/tests/Layer/UTFGrid.html +++ b/tests/Layer/UTFGrid.html @@ -68,6 +68,8 @@ got = layer.createBackBuffer(); } catch (e) { got = e; + } finally { + tearDown(); } t.eq(got, undefined, "createBackBuffer returns undefined"); } From e1e11ab9c6aca75e544692755b42413ec1f2f879 Mon Sep 17 00:00:00 2001 From: mosesonline Date: Fri, 1 Mar 2013 12:44:29 +0100 Subject: [PATCH 089/148] [BugFix] visibilitychanged listener is not unregistered on deactivation of Strategy/Refresh. --- lib/OpenLayers/Strategy/Refresh.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/OpenLayers/Strategy/Refresh.js b/lib/OpenLayers/Strategy/Refresh.js index 726b89725e..cca187c95a 100644 --- a/lib/OpenLayers/Strategy/Refresh.js +++ b/lib/OpenLayers/Strategy/Refresh.js @@ -79,6 +79,10 @@ OpenLayers.Strategy.Refresh = OpenLayers.Class(OpenLayers.Strategy, { var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this); if(deactivated) { this.stop(); + this.layer.events.un({ + "visibilitychanged": this.reset, + scope: this + }); } return deactivated; }, From 05227d32d095684712507a0e83f1e43f10a97a7b Mon Sep 17 00:00:00 2001 From: mosesonline Date: Fri, 1 Mar 2013 12:52:18 +0100 Subject: [PATCH 090/148] [New] Tests for deactivation of refresh strategy --- tests/Strategy/Refresh.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Strategy/Refresh.html b/tests/Strategy/Refresh.html index f8fb451c76..054f02818c 100644 --- a/tests/Strategy/Refresh.html +++ b/tests/Strategy/Refresh.html @@ -31,6 +31,21 @@ "activates registers visibilitychanged listener"); } + function test_deactivate(t) { + t.plan(3); + + var l = new OpenLayers.Layer.Vector(); + l.setVisibility(false); + var s = new OpenLayers.Strategy.Refresh(); + s.setLayer(l); + s.activate(); + var deactivated = s.deactivate(); + t.eq(deactivated, true, "deactivate returns true"); + t.eq(s.active, false, "deactivated after activate"); + t.ok(l.events.listeners.visibilitychanged.length == 0, + "deactivate unregisters visibilitychanged listener"); + } + function test_activateWithVisibleLayer(t) { t.plan(5); From 3dea8dacb45441c218d2242391c71246b937a05d Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 13 Mar 2013 08:06:41 +0100 Subject: [PATCH 091/148] Using the correct parent node When we have a Google base layer, the parent node of the base layer's div will be a different one. --- lib/OpenLayers/Layer/Grid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 304920f217..0b47935bd0 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -653,7 +653,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { if (resolution === this.gridResolution) { this.div.insertBefore(backBuffer, this.div.firstChild); } else { - this.map.layerContainerDiv.insertBefore(backBuffer, this.map.baseLayer.div); + this.map.baseLayer.div.parentNode.insertBefore(backBuffer, this.map.baseLayer.div); } this.backBuffer = backBuffer; From d2a32d542182fad943872928d0261671cfabf557 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 19 Mar 2013 23:00:10 +0100 Subject: [PATCH 092/148] Simplifying and unhacking the ModifyFeature control With two nested controls (DragFeature, SelectFeature), which - among others - activated two OpenLayers.Handler.Feature instances, the ModifyFeature control was fragile and hard to debug. The issue that @iwillig, @bartvde and myself tried to track down was that the two Feature handlers interfered with each other, making it hard to select features on mobile devices, and causing points to jump during dragging because of not updated last pixel positions. With this refactoring, there are no more nested controls. All that's left is a Drag handler. All tests pass. I had to remove one test that checked for dragging of an unselected point while another was selected, because now (and partially even before this change, thanks to the ugly drag handler hack that is now removed) dragging a point will also select it, saving the user an extra click. --- lib/OpenLayers/Control/ModifyFeature.js | 229 +++++++++--------------- tests/Control/ModifyFeature.html | 106 +++++------ 2 files changed, 125 insertions(+), 210 deletions(-) diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index 8882ae3065..1dba01c6c1 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -4,8 +4,7 @@ * full text of the license. */ /** - * @requires OpenLayers/Control/DragFeature.js - * @requires OpenLayers/Control/SelectFeature.js + * @requires OpenLayers/Handler/Drag.js * @requires OpenLayers/Handler/Keyboard.js */ @@ -88,18 +87,6 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { */ virtualVertices: null, - /** - * Property: selectControl - * {} - */ - selectControl: null, - - /** - * Property: dragControl - * {} - */ - dragControl: null, - /** * Property: handlers * {Object} @@ -232,64 +219,50 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { if(!(OpenLayers.Util.isArray(this.deleteCodes))) { this.deleteCodes = [this.deleteCodes]; } - var control = this; - - // configure the select control - var selectOptions = { - geometryTypes: this.geometryTypes, - clickout: this.clickout, - toggle: this.toggle, - onBeforeSelect: this.beforeSelectFeature, - onSelect: this.selectFeature, - onUnselect: this.unselectFeature, - scope: this - }; - if(this.standalone === false) { - this.selectControl = new OpenLayers.Control.SelectFeature( - layer, selectOptions - ); - } - - // configure the drag control - var dragOptions = { - documentDrag: this.documentDrag, - geometryTypes: ["OpenLayers.Geometry.Point"], - onStart: function(feature, pixel) { - control.dragStart.apply(control, [feature, pixel]); + + // configure the drag handler + var dragCallbacks = { + down: function(pixel) { + this.vertex = null; + var feature = this.layer.getFeatureFromEvent( + this.handlers.drag.evt); + if (feature) { + this.dragStart(feature); + } else if (this.feature && this.clickout) { + this.unselectFeature(this.feature); + } }, - onDrag: function(feature, pixel) { - control.dragVertex.apply(control, [feature, pixel]); + move: function(pixel) { + delete this._unselect; + if (this.vertex) { + this.dragVertex(this.vertex, pixel); + } }, - onComplete: function(feature) { - control.dragComplete.apply(control, [feature]); + up: function() { + this.handlers.drag.stopDown = false; + if (this._unselect) { + this.unselectFeature(this._unselect); + delete this._unselect; + } }, - featureCallbacks: { - over: function(feature) { - /** - * In normal mode, the feature handler is set up to allow - * dragging of all points. In standalone mode, we only - * want to allow dragging of sketch vertices and virtual - * vertices - or, in the case of a modifiable point, the - * point itself. - */ - if(control.standalone !== true || feature._sketch || - control.feature === feature) { - control.dragControl.overFeature.apply( - control.dragControl, [feature]); - } + done: function(pixel) { + if (this.vertex) { + this.dragComplete(this.vertex); } } }; - this.dragControl = new OpenLayers.Control.DragFeature( - layer, dragOptions - ); + var dragOptions = { + documentDrag: this.documentDrag, + stopDown: false + }; // configure the keyboard handler var keyboardOptions = { keydown: this.handleKeypress }; this.handlers = { - keyboard: new OpenLayers.Handler.Keyboard(this, keyboardOptions) + keyboard: new OpenLayers.Handler.Keyboard(this, keyboardOptions), + drag: new OpenLayers.Handler.Drag(this, dragCallbacks, dragOptions) }; }, @@ -299,8 +272,6 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { */ destroy: function() { this.layer = null; - this.standalone || this.selectControl.destroy(); - this.dragControl.destroy(); OpenLayers.Control.prototype.destroy.apply(this, []); }, @@ -312,8 +283,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * {Boolean} Successfully activated the control. */ activate: function() { - return ((this.standalone || this.selectControl.activate()) && - this.handlers.keyboard.activate() && + return (this.handlers.keyboard.activate() && + this.handlers.drag.activate() && OpenLayers.Control.prototype.activate.apply(this, arguments)); }, @@ -331,26 +302,17 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.layer.removeFeatures(this.vertices, {silent: true}); this.layer.removeFeatures(this.virtualVertices, {silent: true}); this.vertices = []; - this.dragControl.deactivate(); - var feature = this.feature; - var valid = feature && feature.geometry && feature.layer; - if(this.standalone === false) { - if(valid) { - this.selectControl.unselect.apply(this.selectControl, - [feature]); - } - this.selectControl.deactivate(); - } else { - if(valid) { - this.unselectFeature(feature); - } - } + this.handlers.drag.deactivate(); this.handlers.keyboard.deactivate(); + var feature = this.feature; + if (feature && feature.geometry && feature.layer) { + this.unselectFeature(feature); + } deactivated = true; } return deactivated; }, - + /** * Method: beforeSelectFeature * Called before a feature is selected. @@ -375,11 +337,19 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * feature - {} the selected feature. */ selectFeature: function(feature) { + if (this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes, + feature.geometry.CLASS_NAME) == -1) { + return; + } if (!this.standalone || this.beforeSelectFeature(feature) !== false) { + if (this.feature) { + this.unselectFeature(this.feature); + } this.feature = feature; + this.layer.selectedFeatures.push(feature); + this.layer.drawFeature(feature, 'select'); this.modified = false; this.resetVertices(); - this.dragControl.activate(); this.onModificationStart(this.feature); } // keep track of geometry modifications @@ -409,8 +379,9 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.layer.destroyFeatures([this.radiusHandle], {silent: true}); delete this.radiusHandle; } + this.layer.drawFeature(this.feature, 'default'); this.feature = null; - this.dragControl.deactivate(); + OpenLayers.Util.removeItem(this.layer.selectedFeatures, feature); this.onModificationEnd(feature); this.layer.events.triggerEvent("afterfeaturemodified", { feature: feature, @@ -418,64 +389,48 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { }); this.modified = false; }, - + + /** * Method: dragStart - * Called by the drag feature control with before a feature is dragged. - * This method is used to differentiate between points and vertices - * of higher order geometries. This respects the - * property and forces a select of points when the drag control is - * already active (and stops events from propagating to the select - * control). + * Called by the drag handler before a feature is dragged. This method is + * used to differentiate between points and vertices + * of higher order geometries. * * Parameters: * feature - {} The point or vertex about to be * dragged. - * pixel - {} Pixel location of the mouse event. */ - dragStart: function(feature, pixel) { - // only change behavior if the feature is not in the vertices array - if(feature != this.feature && !feature.geometry.parent && - feature != this.dragHandle && feature != this.radiusHandle) { - if(this.standalone === false && this.feature) { - // unselect the currently selected feature - this.selectControl.clickFeature.apply(this.selectControl, - [this.feature]); - } - // check any constraints on the geometry type - if(this.geometryTypes == null || - OpenLayers.Util.indexOf(this.geometryTypes, - feature.geometry.CLASS_NAME) != -1) { - // select the point - this.standalone || this.selectControl.clickFeature.apply( - this.selectControl, [feature]); - /** - * TBD: These lines improve workflow by letting the user - * immediately start dragging after the mouse down. - * However, it is very ugly to be messing with controls - * and their handlers in this way. I'd like a better - * solution if the workflow change is necessary. - */ - // prepare the point for dragging - this.dragControl.overFeature.apply(this.dragControl, - [feature]); - this.dragControl.lastPixel = pixel; - this.dragControl.handlers.drag.started = true; - this.dragControl.handlers.drag.start = pixel; - this.dragControl.handlers.drag.last = pixel; + dragStart: function(feature) { + var isPoint = feature.geometry.CLASS_NAME == + 'OpenLayers.Geometry.Point'; + if (!this.standalone && + ((!feature._sketch && isPoint) || !feature._sketch)) { + if (this.toggle && this.feature === feature) { + // mark feature for unselection + this._unselect = feature; } + this.selectFeature(feature); + } + if (feature._sketch || isPoint) { + // feature is a drag or virtual handle or point + this.vertex = feature; + this.handlers.drag.stopDown = true; } }, - + /** * Method: dragVertex - * Called by the drag feature control with each drag move of a vertex. + * Called by the drag handler with each drag move of a vertex. * * Parameters: * vertex - {} The vertex being dragged. * pixel - {} Pixel location of the mouse event. */ dragVertex: function(vertex, pixel) { + var pos = this.map.getLonLatFromViewPortPx(pixel); + var geom = vertex.geometry; + geom.move(pos.lon - geom.x, pos.lat - geom.y); this.modified = true; /** * Five cases: @@ -487,9 +442,6 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { */ if(this.feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { // dragging a simple point - if(this.feature != vertex) { - this.feature = vertex; - } this.layer.events.triggerEvent("vertexmodified", { vertex: vertex.geometry, feature: this.feature, @@ -526,7 +478,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.virtualVertices = []; } this.layer.drawFeature(this.feature, this.standalone ? undefined : - this.selectControl.renderIntent); + 'select'); } // keep the vertex on top so it gets the mouseout after dragging // this should be removed in favor of an option to draw under or @@ -536,7 +488,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { /** * Method: dragComplete - * Called by the drag feature control when the feature dragging is complete. + * Called by the drag handler when the feature dragging is complete. * * Parameters: * vertex - {} The vertex being dragged. @@ -572,16 +524,6 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * Method: resetVertices */ resetVertices: function() { - // if coming from a drag complete we're about to destroy the vertex - // that was just dragged. For that reason, the drag feature control - // will never detect a mouse-out on that vertex, meaning that the drag - // handler won't be deactivated. This can cause errors because the drag - // feature control still has a feature to drag but that feature is - // destroyed. To prevent this, we call outFeature on the drag feature - // control if the control actually has a feature to drag. - if(this.dragControl.feature) { - this.dragControl.outFeature(this.dragControl.feature); - } if(this.vertices.length > 0) { this.layer.removeFeatures(this.vertices, {silent: true}); this.vertices = []; @@ -632,11 +574,10 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { // check for delete key if(this.feature && OpenLayers.Util.indexOf(this.deleteCodes, code) != -1) { - var vertex = this.dragControl.feature; - if(vertex && - OpenLayers.Util.indexOf(this.vertices, vertex) != -1 && - !this.dragControl.handlers.drag.dragging && - vertex.geometry.parent) { + var vertex = this.layer.getFeatureFromEvent(this.handlers.drag.evt); + if (vertex && + OpenLayers.Util.indexOf(this.vertices, vertex) != -1 && + !this.handlers.drag.dragging && vertex.geometry.parent) { // remove the vertex vertex.geometry.parent.removeComponent(vertex.geometry); this.layer.events.triggerEvent("vertexremoved", { @@ -645,8 +586,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { pixel: evt.xy }); this.layer.drawFeature(this.feature, this.standalone ? - undefined : - this.selectControl.renderIntent); + undefined : 'select'); this.modified = true; this.resetVertices(); this.setFeatureState(); @@ -800,8 +740,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * map - {} The control's map. */ setMap: function(map) { - this.standalone || this.selectControl.setMap(map); - this.dragControl.setMap(map); + this.handlers.drag.setMap(map); OpenLayers.Control.prototype.setMap.apply(this, arguments); }, diff --git a/tests/Control/ModifyFeature.html b/tests/Control/ModifyFeature.html index 51a10ac184..91a9430340 100644 --- a/tests/Control/ModifyFeature.html +++ b/tests/Control/ModifyFeature.html @@ -13,34 +13,27 @@ } }; var options = { - geometryTypes: "bar" + documentDrag: true }; var control = new OpenLayers.Control.ModifyFeature(layer, options); t.ok(control.layer == layer, "constructor sets layer correctly"); - t.eq(control.selectControl.geometryTypes, "bar", - "constructor sets options correctly on feature handler"); + t.eq(control.handlers.drag.documentDrag, true, + "constructor sets options correctly on drag handler"); t.eq(control.mode, OpenLayers.Control.ModifyFeature.RESHAPE, "constructor initializes modification mode correctly"); control.destroy(); } function test_destroy(t) { - t.plan(2); + t.plan(1); var map = new OpenLayers.Map("map"); var layer = new OpenLayers.Layer.Vector(); map.addLayer(layer); var control = new OpenLayers.Control.ModifyFeature(layer); - control.selectControl.destroy = function() { - t.ok(true, - "control.destroy calls destroy on select control"); - } - control.dragControl.destroy = function() { - t.ok(true, - "control.destroy calls destroy on feature handler"); - } control.destroy(); + t.eq(control.layer, null, "Layer reference removed on destroy."); map.destroy(); } @@ -51,11 +44,11 @@ map.addLayer(layer); var control = new OpenLayers.Control.ModifyFeature(layer); map.addControl(control); - t.ok(!control.selectControl.active, - "select control is not active prior to activating control"); + t.ok(!control.handlers.drag.active, + "drag handler is not active prior to activating control"); control.activate(); - t.ok(control.selectControl.active, - "select control is active after activating control"); + t.ok(control.handlers.drag.active, + "drag handler is active after activating control"); map.destroy(); } @@ -99,7 +92,8 @@ ); // mock up vertex deletion - control.dragControl.feature = point; + var origGetFeatureFromEvent = layer.getFeatureFromEvent; + layer.getFeatureFromEvent = function() { return point; }; control.feature = poly; // we cannot use selectFeature since the control is not part of a map control._originalGeometry = poly.geometry.clone(); @@ -139,17 +133,18 @@ t.eq(control.feature.state, OpenLayers.State.UPDATE, "feature state set to update"); // now make sure nothing happens if the vertex is mid-drag - control.dragControl.handlers.drag.dragging = true; + control.handlers.drag.dragging = true; control.handleKeypress({keyCode:delKey}); // clean up + layer.getFeatureFromEvent = origGetFeatureFromEvent; control.destroy(); layer.destroy(); } function test_onUnSelect(t) { - t.plan(6); + t.plan(5); var layer = new OpenLayers.Layer.Vector(); var control = new OpenLayers.Control.ModifyFeature(layer); var fakeFeature = {'id':'myid'}; @@ -159,7 +154,6 @@ layer.events.on({"afterfeaturemodified": function(event) { t.eq(event.feature, fakeFeature, "afterfeaturemodified triggered"); }}); - control.dragControl.deactivate = function() { t.ok(true, "Deactivate called on drag control"); } control.onModificationEnd = function (feature) { t.eq(feature.id, fakeFeature.id, "onModificationEnd got feature.") } layer.removeFeatures = function(verts) { t.ok(verts == 'a', "Normal verts removed correctly"); @@ -190,10 +184,6 @@ // If a feature is to be modified, control.selectFeature gets called. // We want this test to fail if selectFeature gets called. var modified = false; - var _ = OpenLayers.Control.ModifyFeature.prototype.selectFeature; - OpenLayers.Control.ModifyFeature.prototype.selectFeature = function() { - modified = true; - } var control = new OpenLayers.Control.ModifyFeature(layer); map.addControl(control); @@ -202,21 +192,19 @@ // register a listener that will stop feature modification layer.events.on({"beforefeaturemodified": function() {return false}}); - // we can initiate feature modification by selecting a feature with - // the control's select feature control - control.selectControl.select(feature); + // we can initiate feature modification by programmatically selecting + // a feature + control.selectFeature(feature); if(modified) { t.fail("selectFeature called, prepping feature for modification"); } else { t.ok(true, "the beforefeaturemodified listener stopped feature modification"); } - - OpenLayers.Control.ModifyFeature.prototype.selectFeature = _; } function test_selectFeature(t) { - t.plan(12); + t.plan(9); var map = new OpenLayers.Map('map'); var layer = new OpenLayers.Layer.Vector("Vectors!", {isBaseLayer: true}); map.addLayer(layer); @@ -228,7 +216,6 @@ t.ok(obj.feature == fakeFeature, "beforefeaturemodified triggered"); }; layer.events.on({"beforefeaturemodified": callback}); - control.dragControl.activate = function() { t.ok(true, "drag Control activated"); } control.onModificationStart = function(feature) { t.eq(feature.id, fakeFeature.id, "On Modification Start called with correct feature."); } // Start of testing @@ -262,7 +249,7 @@ control.selectFeature(fakeFeature); control.vertices = ['a']; - control.virtualVertices = ['b']; + control.virtualVertices = [{destroy: function() {}}]; layer.addFeatures = function(features) {} @@ -283,7 +270,7 @@ } function test_resetVertices(t) { - t.plan(21); + t.plan(20); var layer = new OpenLayers.Layer.Vector(); var control = new OpenLayers.Control.ModifyFeature(layer); var point = new OpenLayers.Geometry.Point(5,6); @@ -340,18 +327,6 @@ t.eq(control.vertices.length, 0, "No vertices when both resizing and reshaping (RESIZE|RESHAPE)"); t.eq(control.virtualVertices.length, 0, "No virtual vertices when both resizing and reshaping (RESIZE|RESHAPE)"); - control.dragControl.feature = new OpenLayers.Feature.Vector(polygon); - control.dragControl.map = {}; - control.dragControl.map.div = {}; - control.dragControl.map.div.style = {}; - control.dragControl.map.viewPortDiv = "foo"; - control.dragControl.handlers.drag.deactivate = function() { - this.active = false; - } - control.resetVertices(); - t.ok(!control.dragControl.handlers.drag.active, "resetVertices deactivates drag handler"); - control.dragControl.map = null; - control.destroy(); layer.destroy(); } @@ -512,17 +487,19 @@ var control = new OpenLayers.Control.ModifyFeature(layer); map.addControl(control); - control.selectControl.deactivate = function() { + control.handlers.keyboard.deactivate = function() { t.ok(true, - "control.deactivate calls deactivate on select control"); + "control.deactivate calls deactivate on keyboard handler"); } - control.dragControl.deactivate = function() { + control.handlers.drag.deactivate = function() { t.ok(true, - "control.deactivate calls deactivate on drag control"); + "control.deactivate calls deactivate on drag handler"); } control.active = true; control.deactivate(); + control.handlers.keyboard.deactivate = OpenLayers.Handler.Keyboard.prototype.deactivate; + control.handlers.drag.deactivate = OpenLayers.Handler.Drag.prototype.deactivate; map.destroy(); } @@ -609,14 +586,17 @@ layer.events.on({"featuremodified": function(event) { t.eq(event.feature.id, poly.id, "featuremodified triggered"); }}); + control.onModification = function(feature) { t.eq(feature.id, poly.id, "onModification called with the right feature on vertex delete"); }; point.geometry.parent = poly.geometry; - control.dragControl.feature = point; + origGetFeatureFromEvent = layer.getFeatureFromEvent; + layer.getFeatureFromEvent = function() { return point; }; control.handleKeypress({keyCode:46}); layer.drawFeature = oldDraw; + layer.getFeatureFromEvent = origGetFeatureFromEvent; map.destroy(); } @@ -694,7 +674,7 @@ function test_standalone(t) { - t.plan(18); + t.plan(17); var map = new OpenLayers.Map("map"); var layer = new OpenLayers.Layer.Vector(); @@ -733,7 +713,6 @@ // activate control control.activate(); t.eq(control.active, true, "[activate] control activated"); - t.eq(control.selectControl, null, "[activate] no select control"); // manually select feature for editing control.selectFeature(f1); @@ -761,22 +740,19 @@ t.ok(log[0].feature === f2, "[deactivate] correct feature"); t.eq(log[0].modified, false, "[deactivate] feature not actually modified"); - // reactivate control and select a point feature to see if we can drag - // another point feature; - control.activate(); - control.selectFeature(f3); - control.dragControl.handlers.feature.triggerCallback("mousemove", "in", [f4]); - t.eq(control.dragControl.handlers.drag.active, false, "cannot drag unselected feature f4"); - control.dragControl.handlers.feature.triggerCallback("mousemove", "in", [f3]); - t.eq(control.dragControl.handlers.drag.active, true, "can drag selected feature f3"); - // select the polygon feature to make sure that we can drag vertices and // virtual vertices control.selectFeature(f2); - control.dragControl.handlers.feature.triggerCallback("mousemove", "in", [control.vertices[0]]); - t.eq(control.dragControl.handlers.drag.active, true, "can drag vertex of feature f2"); - control.dragControl.handlers.feature.triggerCallback("mousemove", "in", [control.virtualVertices[0]]); - t.eq(control.dragControl.handlers.drag.active, true, "can drag virtual vertex of feature f2"); + var origGetFeatureFromEvent = layer.getFeatureFromEvent; + layer.getFeatureFromEvent = function() { return control.vertices[0]; }; + control.handlers.drag.callbacks.down.call(control, new OpenLayers.Pixel(0,0)); + t.ok(control.vertex === control.vertices[0], "can drag vertex of feature f2"); + t.ok(control.feature === f2, "dragging a vertex does not change the selected feature"); + layer.getFeatureFromEvent = function() { return control.virtualVertices[0]; }; + control.handlers.drag.callbacks.down.call(control, new OpenLayers.Pixel(0,0)); + t.ok(control.vertex === control.virtualVertices[0], "can drag virtual vertex of feature f2"); + t.ok(control.feature === f2, "dragging a vertex does not change the selected feature"); + layer.getFeatureFromEvent = origGetFeatureFromEvent; control.deactivate(); map.destroy(); From bed011514f2c5dcbdc2b2069f81bca407bba214e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 20 Mar 2013 05:12:35 +0100 Subject: [PATCH 093/148] Increasing point radius for easier touch selection --- examples/mobile-drawing.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index 869880e30d..0d92e7a6e3 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -5,7 +5,13 @@ function init() { styleMap: new OpenLayers.StyleMap({ temporary: OpenLayers.Util.applyDefaults({ pointRadius: 16 - }, OpenLayers.Feature.Vector.style.temporary) + }, OpenLayers.Feature.Vector.style.temporary), + 'default': OpenLayers.Util.applyDefaults({ + pointRadius: 16 + }, OpenLayers.Feature.Vector.style['default']), + select: OpenLayers.Util.applyDefaults({ + pointRadius: 16 + }, OpenLayers.Feature.Vector.style.select), }) }); From 6fca6aef6067a84ccb5e142279e0bd0a0ec1c71e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 20 Mar 2013 10:23:00 +0100 Subject: [PATCH 094/148] Addressing @bartvde's review comments --- examples/mobile-drawing.js | 2 +- lib/OpenLayers/Control/ModifyFeature.js | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index 0d92e7a6e3..d598ff0a17 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -11,7 +11,7 @@ function init() { }, OpenLayers.Feature.Vector.style['default']), select: OpenLayers.Util.applyDefaults({ pointRadius: 16 - }, OpenLayers.Feature.Vector.style.select), + }, OpenLayers.Feature.Vector.style.select) }) }); diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index 1dba01c6c1..6b0c37ce7b 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -49,7 +49,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * Default is true. */ toggle: true, - + /** * APIProperty: standalone * {Boolean} Set to true to create a control without SelectFeature @@ -66,20 +66,26 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * {} */ layer: null, - + /** * Property: feature * {} Feature currently available for modification. */ feature: null, - + + /** + * Property: vertex + * {} Vertex currently being modified. + */ + vertex: null, + /** * Property: vertices * {Array()} Verticies currently available * for dragging. */ vertices: null, - + /** * Property: virtualVertices * {Array()} Virtual vertices in the middle @@ -92,7 +98,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * {Object} */ handlers: null, - + /** * APIProperty: deleteCodes * {Array(Integer)} Keycodes for deleting verticies. Set to null to disable @@ -107,7 +113,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * {Object} A symbolizer to be used for virtual vertices. */ virtualStyle: null, - + /** * APIProperty: vertexRenderIntent * {String} The renderIntent to use for vertices. If no is From 410a88c674e7f3752f24288ce87176e7280d27b9 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 20 Mar 2013 10:30:05 +0100 Subject: [PATCH 095/148] Thicker strokes make it easier to select line segments --- examples/mobile-drawing.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index d598ff0a17..bac903c667 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -7,10 +7,12 @@ function init() { pointRadius: 16 }, OpenLayers.Feature.Vector.style.temporary), 'default': OpenLayers.Util.applyDefaults({ - pointRadius: 16 + pointRadius: 16, + strokeWidth: 3, }, OpenLayers.Feature.Vector.style['default']), select: OpenLayers.Util.applyDefaults({ - pointRadius: 16 + pointRadius: 16, + strokeWidth: 3 }, OpenLayers.Feature.Vector.style.select) }) }); From 17e972de3d7914378b4158fa6b9744807b711b00 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Wed, 20 Mar 2013 20:56:47 +0100 Subject: [PATCH 096/148] EncodedPolyline: Backported ol3 polyline parser library The ol3 version of the library is more advanced and complete. It can also parse into flat array. It can handle unsigned integers, signed integers and floats. --- lib/OpenLayers/Format/EncodedPolyline.js | 439 +++++++++++++++++++---- tests/Format/EncodedPolyline.html | 251 ++++++++++++- 2 files changed, 615 insertions(+), 75 deletions(-) diff --git a/lib/OpenLayers/Format/EncodedPolyline.js b/lib/OpenLayers/Format/EncodedPolyline.js index b6e81f48e3..7457bcf7f0 100644 --- a/lib/OpenLayers/Format/EncodedPolyline.js +++ b/lib/OpenLayers/Format/EncodedPolyline.js @@ -62,15 +62,16 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, { else if (this.geometryType != "point" && this.geometryType != "polygon") return null; - var points = this.decode(encoded, 2); - var pointGeometries = new Array(); - for (var i in points) { - var point = points[i]; - pointGeometries.push( - new OpenLayers.Geometry.Point(point[1] * 1e-5, point[0] * 1e-5) - ); + var flatPoints = this.decodeDeltas(encoded, 2); + var flatPointsLength = flatPoints.length; + + var pointGeometries = []; + for (var i = 0; i + 1 < flatPointsLength;) { + var y = flatPoints[i++], x = flatPoints[i++]; + pointGeometries.push(new OpenLayers.Geometry.Point(x, y)); } + if (this.geometryType == "point") return new OpenLayers.Feature.Vector( pointGeometries[0] @@ -102,29 +103,18 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, { * coordinates. */ decode: function(encoded, dims) { - var points = new Array(); - var point = new Array(dims); + var flatPoints = this.decodeDeltas(encoded, dims, 1); + var flatPointsLength = flatPoints.length; - // Reset the point array - for (var i = 0; i < point.length; ++i) - point[i] = 0; + var points = []; + for (var i = 0; i + (dims - 1) < flatPointsLength;) { + var point = []; - for (var i = 0; i < encoded.length;) { for (var dim = 0; dim < dims; ++dim) { - var result = 0; - var shift = 0; - - var b; - do { - b = encoded.charCodeAt(i++) - 63; - result |= (b & 0x1f) << shift; - shift += 5; - } while (b >= 0x20); - - point[dim] += ((result & 1) ? ~(result >> 1) : (result >> 1)); + point.push(flatPoints[i++]) } - points.push(point.slice(0)); + points.push(point); } return points; @@ -163,16 +153,16 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, { else return null; - var points = new Array(); - for (var i in pointGeometries) { + var flatPoints = []; + + var pointGeometriesLength = pointGeometries.length; + for (var i = 0; i < pointGeometriesLength; ++i) { var pointGeometry = pointGeometries[i]; - var point = [Math.round(pointGeometry.y * 1e5), - Math.round(pointGeometry.x * 1e5)]; - points.push(point); + flatPoints.push(pointGeometry.y); + flatPoints.push(pointGeometry.x); } - var result = this.encode(points, 2); - return result; + return this.encodeDeltas(flatPoints, 2); }, /** @@ -188,66 +178,377 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, { * {String} An encoded string */ encode: function (points, dims) { - var encoded_points = ""; + var flatPoints = []; - var lastPoint = new Array(dims); - for (var i = 0; i < lastPoint.length; ++i) - lastPoint[i] = 0; - - for (var i = 0; i < points.length; i++) { + var pointsLength = points.length; + for (var i = 0; i < pointsLength; ++i) { var point = points[i]; - for (var dim = 0; dim < lastPoint.length; ++dim) { - var delta = point[dim] - lastPoint[dim]; - encoded_points += this.encodeSignedNumber(delta); + for (var dim = 0; dim < dims; ++dim) { + flatPoints.push(point[dim]); } - - lastPoint = point; } - return encoded_points; + + return this.encodeDeltas(flatPoints, dims, 1); }, /** - * Method: encodeSignedNumber + * APIMethod: encodeDeltas + * Encode a list of n-dimensional points and return an encoded string + * + * Attention: This function will modify the passed array! + * + * Parameters: + * numbers - {Array.} A list of n-dimensional points. + * dimension - {number} The dimension of the points in the list. + * opt_factor - {number=} The factor by which the numbers will be + * multiplied. The remaining decimal places will get rounded away. + * + * Returns: + * {string} The encoded string. + */ + encodeDeltas: function(numbers, dimension, opt_factor) { + var factor = opt_factor || 1e5; + var d; + + var lastNumbers = new Array(dimension); + for (d = 0; d < dimension; ++d) { + lastNumbers[d] = 0; + } + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength;) { + for (d = 0; d < dimension; ++d, ++i) { + var num = numbers[i]; + var delta = num - lastNumbers[d]; + lastNumbers[d] = num; + + numbers[i] = delta; + } + } + + return this.encodeFloats(numbers, factor); + }, + + + /** + * APIMethod: decodeDeltas + * Decode a list of n-dimensional points from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * dimension - {number} The dimension of the points in the encoded string. + * opt_factor - {number=} The factor by which the resulting numbers will + * be divided. + * + * Returns: + * {Array.} A list of n-dimensional points. + */ + decodeDeltas: function(encoded, dimension, opt_factor) { + var factor = opt_factor || 1e5; + var d; + + var lastNumbers = new Array(dimension); + for (d = 0; d < dimension; ++d) { + lastNumbers[d] = 0; + } + + var numbers = this.decodeFloats(encoded, factor); + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength;) { + for (d = 0; d < dimension; ++d, ++i) { + lastNumbers[d] += numbers[i]; + + numbers[i] = lastNumbers[d]; + } + } + + return numbers; + }, + + + /** + * APIMethod: encodeFloats + * Encode a list of floating point numbers and return an encoded string + * + * Attention: This function will modify the passed array! + * + * Parameters: + * numbers - {Array.} A list of floating point numbers. + * opt_factor - {number=} The factor by which the numbers will be + * multiplied. The remaining decimal places will get rounded away. + * + * Returns: + * {string} The encoded string. + */ + encodeFloats: function(numbers, opt_factor) { + var factor = opt_factor || 1e5; + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength; ++i) { + numbers[i] = Math.round(numbers[i] * factor); + } + + return this.encodeSignedIntegers(numbers); + }, + + + /** + * APIMethod: decodeFloats + * Decode a list of floating point numbers from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * opt_factor - {number=} The factor by which the result will be divided. + * + * Returns: + * {Array.} A list of floating point numbers. + */ + decodeFloats: function(encoded, opt_factor) { + var factor = opt_factor || 1e5; + + var numbers = this.decodeSignedIntegers(encoded); + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength; ++i) { + numbers[i] /= factor; + } + + return numbers; + }, + + + /** + * APIMethod: encodeSignedIntegers + * Encode a list of signed integers and return an encoded string + * + * Attention: This function will modify the passed array! + * + * Parameters: + * numbers - {Array.} A list of signed integers. + * + * Returns: + * {string} The encoded string. + */ + encodeSignedIntegers: function(numbers) { + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength; ++i) { + var num = numbers[i]; + + var signedNum = num << 1; + if (num < 0) { + signedNum = ~(signedNum); + } + + numbers[i] = signedNum; + } + + return this.encodeUnsignedIntegers(numbers); + }, + + + /** + * APIMethod: decodeSignedIntegers + * Decode a list of signed integers from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * + * Returns: + * {Array.} A list of signed integers. + */ + decodeSignedIntegers: function(encoded) { + var numbers = this.decodeUnsignedIntegers(encoded); + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength; ++i) { + var num = numbers[i]; + numbers[i] = (num & 1) ? ~(num >> 1) : (num >> 1); + } + + return numbers; + }, + + + /** + * APIMethod: encodeUnsignedIntegers + * Encode a list of unsigned integers and return an encoded string + * + * Parameters: + * numbers - {Array.} A list of unsigned integers. + * + * Returns: + * {string} The encoded string. + */ + encodeUnsignedIntegers: function(numbers) { + var encoded = ''; + + var numbersLength = numbers.length; + for (var i = 0; i < numbersLength; ++i) { + encoded += this.encodeUnsignedInteger(numbers[i]); + } + + return encoded; + }, + + + /** + * APIMethod: decodeUnsignedIntegers + * Decode a list of unsigned integers from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * + * Returns: + * {Array.} A list of unsigned integers. + */ + decodeUnsignedIntegers: function(encoded) { + var numbers = []; + + var current = 0; + var shift = 0; + + var encodedLength = encoded.length; + for (var i = 0; i < encodedLength; ++i) { + var b = encoded.charCodeAt(i) - 63; + + current |= (b & 0x1f) << shift; + + if (b < 0x20) { + numbers.push(current); + current = 0; + shift = 0; + } else { + shift += 5; + } + } + + return numbers; + }, + + + /** + * Method: encodeFloat + * Encode one single floating point number and return an encoded string + * + * Parameters: + * num - {number} Floating point number that should be encoded. + * opt_factor - {number=} The factor by which num will be multiplied. + * The remaining decimal places will get rounded away. + * + * Returns: + * {string} The encoded string. + */ + encodeFloat: function(num, opt_factor) { + num = Math.round(num * (opt_factor || 1e5)); + return this.encodeSignedInteger(num); + }, + + + /** + * Method: decodeFloat + * Decode one single floating point number from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * opt_factor - {number=} The factor by which the result will be divided. + * + * Returns: + * {number} The decoded floating point number. + */ + decodeFloat: function(encoded, opt_factor) { + var result = this.decodeSignedInteger(encoded); + return result / (opt_factor || 1e5); + }, + + + /** + * Method: encodeSignedInteger * Encode one single signed integer and return an encoded string * * Parameters: - * num - {int} A signed integer that should be encoded + * num - {number} Signed integer that should be encoded. * * Returns: - * {String} An encoded string + * {string} The encoded string. */ - encodeSignedNumber: function (num) { - var sgn_num = num << 1; - if (num < 0) - sgn_num = ~(sgn_num); + encodeSignedInteger: function(num) { + var signedNum = num << 1; + if (num < 0) { + signedNum = ~(signedNum); + } - return this.encodeNumber(sgn_num); + return this.encodeUnsignedInteger(signedNum); }, + /** - * Method: encodeNumber - * Encode one single unsigned integer and return an encoded string - * - * encodeSignedNumber should be used instead of using this method directly! + * Method: decodeSignedInteger + * Decode one single signed integer from an encoded string * * Parameters: - * num - {int} An unsigned integer that should be encoded + * encoded - {string} An encoded string. * * Returns: - * {String} An encoded string + * {number} The decoded signed integer. */ - encodeNumber: function (num) { - var encodeString = ""; - var value; - while (num >= 0x20) { - value = (0x20 | (num & 0x1f)) + 63; - encodeString += (String.fromCharCode(value)); - num >>= 5; - } - value = num + 63; - encodeString += (String.fromCharCode(value)); - return encodeString; + decodeSignedInteger: function(encoded) { + var result = this.decodeUnsignedInteger(encoded); + return ((result & 1) ? ~(result >> 1) : (result >> 1)); + }, + + + /** + * Method: encodeUnsignedInteger + * Encode one single unsigned integer and return an encoded string + * + * Parameters: + * num - {number} Unsigned integer that should be encoded. + * + * Returns: + * {string} The encoded string. + */ + encodeUnsignedInteger: function(num) { + var value, encoded = ''; + while (num >= 0x20) { + value = (0x20 | (num & 0x1f)) + 63; + encoded += (String.fromCharCode(value)); + num >>= 5; + } + value = num + 63; + encoded += (String.fromCharCode(value)); + return encoded; + }, + + + /** + * Method: decodeUnsignedInteger + * Decode one single unsigned integer from an encoded string + * + * Parameters: + * encoded - {string} An encoded string. + * + * Returns: + * {number} The decoded unsigned integer. + */ + decodeUnsignedInteger: function(encoded) { + var result = 0; + var shift = 0; + + var encodedLength = encoded.length; + for (var i = 0; i < encodedLength; ++i) { + var b = encoded.charCodeAt(i) - 63; + + result |= (b & 0x1f) << shift; + + if (b < 0x20) + break; + + shift += 5; + } + + return result; }, CLASS_NAME: "OpenLayers.Format.EncodedPolyline" diff --git a/tests/Format/EncodedPolyline.html b/tests/Format/EncodedPolyline.html index 1a93a41afa..6bc7208de0 100644 --- a/tests/Format/EncodedPolyline.html +++ b/tests/Format/EncodedPolyline.html @@ -3,6 +3,27 @@ From 03735b74abcbff04193152ebc0f5fba5263bd430 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 23 Mar 2013 11:27:14 +0100 Subject: [PATCH 097/148] tests/Bounds: Fixed typos --- tests/BaseTypes/Bounds.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/BaseTypes/Bounds.html b/tests/BaseTypes/Bounds.html index a1497cf6da..c03b57c82a 100644 --- a/tests/BaseTypes/Bounds.html +++ b/tests/BaseTypes/Bounds.html @@ -495,7 +495,7 @@ t.ok( ((bounds.left == object.lon) && (bounds.bottom == object.lat) && (bounds.right == originalBounds.right) && - (bounds.top == originalBounds.top)), "obj lonlat to extends correclty modifies left and bottom"); + (bounds.top == originalBounds.top)), "obj lonlat to extends correctly modifies left and bottom"); //right, top bounds = originalBounds.clone(); @@ -507,7 +507,7 @@ t.ok( ((bounds.left == originalBounds.left) && (bounds.bottom == originalBounds.bottom) && (bounds.right == object.lon) && - (bounds.top == object.lat)), "obj lonlat to extends correclty modifies right and top"); + (bounds.top == object.lat)), "obj lonlat to extends correctly modifies right and top"); // obj is point @@ -521,7 +521,7 @@ t.ok( ((bounds.left == object.x) && (bounds.bottom == object.y) && (bounds.right == originalBounds.right) && - (bounds.top == originalBounds.top)), "obj Point to extends correclty modifies left and bottom"); + (bounds.top == originalBounds.top)), "obj Point to extends correctly modifies left and bottom"); //right, top bounds = originalBounds.clone(); @@ -533,7 +533,7 @@ t.ok( ((bounds.left == originalBounds.left) && (bounds.bottom == originalBounds.bottom) && (bounds.right == object.x) && - (bounds.top == object.y)), "obj Point to extends correclty modifies right and top"); + (bounds.top == object.y)), "obj Point to extends correctly modifies right and top"); } From d65f604b253bcf4d6d1abbcc438dc689b5eb4cc8 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 23 Mar 2013 11:33:17 +0100 Subject: [PATCH 098/148] tests/Bounds: Fixed indentation and whitespace --- tests/BaseTypes/Bounds.html | 189 ++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/tests/BaseTypes/Bounds.html b/tests/BaseTypes/Bounds.html index c03b57c82a..3ef7510f98 100644 --- a/tests/BaseTypes/Bounds.html +++ b/tests/BaseTypes/Bounds.html @@ -2,10 +2,10 @@ + + + + + + + + +

Polar Projections WMS Example

+ +
+ switch projections polar +
+ +
Switch between different projections
+ +
+ + + + + +
+

This example shows how to switch between different projections, + maintaining the center and resolution.

+

Click the buttons above to try it, and see + polar-projections.js for the + source code.

+
+ + diff --git a/examples/polar-projections.js b/examples/polar-projections.js new file mode 100644 index 0000000000..ac717fbd97 --- /dev/null +++ b/examples/polar-projections.js @@ -0,0 +1,84 @@ +var map, layer, overlay; + +var projectionOptions = { + 'EPSG:3574': { + projection: new OpenLayers.Projection('EPSG:3574'), + units: 'm', + maxExtent: new OpenLayers.Bounds(-5505054, -5505054, 5505054, 5505054), + maxResolution: 5505054 / 128, + numZoomLevels: 18 + }, + 'EPSG:3576': { + projection: new OpenLayers.Projection('EPSG:3576'), + units: 'm', + maxExtent: new OpenLayers.Bounds(-5505054, -5505054, 5505054, 5505054), + maxResolution: 5505054 / 128, + numZoomLevels: 18 + }, + 'EPSG:3571': { + projection: new OpenLayers.Projection('EPSG:3571'), + units: 'm', + maxExtent: new OpenLayers.Bounds(-5505054, -5505054, 5505054, 5505054), + maxResolution: 5505054 / 128, + numZoomLevels: 18 + }, + 'EPSG:3573': { + projection: new OpenLayers.Projection('EPSG:3573'), + units: 'm', + maxExtent: new OpenLayers.Bounds(-5505054, -5505054, 5505054, 5505054), + maxResolution: 5505054 / 128, + numZoomLevels: 18 + } +}; + +function setProjection() { + projCode = this.innerHTML; + var oldExtent = map.getExtent(); + var oldCenter = map.getCenter(); + var oldProjection = map.getProjectionObject(); + + // map projection is controlled by the base layer + map.baseLayer.addOptions(projectionOptions[projCode]); + + // with the base layer updated, the map has the new projection now + var newProjection = map.getProjectionObject(); + + // transform the center of the old projection, not the extent + map.setCenter( + oldCenter.transform(oldProjection, newProjection, + map.getZoomForExtent(oldExtent.transform(oldProjection, newProjection)) + )); + + for (var i=map.layers.length-1; i>=0; --i) { + // update grid settings + map.layers[i].addOptions(projectionOptions[projCode]); + // redraw layer - just in case center and zoom are the same in old and + // new projection + map.layers[i].redraw(); + } +} + +function init() { + map = new OpenLayers.Map('map'); + layer = new OpenLayers.Layer.WMS( + 'world', + 'http://v2.suite.opengeo.org/geoserver/wms', + {layers: 'world', version: '1.1.1'}, + projectionOptions['EPSG:3574'] + ); + overlay = new OpenLayers.Layer.WMS( + 'world', + 'http://v2.suite.opengeo.org/geoserver/wms', + {transparent: 'true', layers: 'world:borders', styles: 'line'}, + projectionOptions['EPSG:3574'] + ); + overlay.isBaseLayer = false; + map.addLayers([layer, overlay]); + map.zoomToMaxExtent(); + + // add behaviour to dom elements + document.getElementById('epsg3574').onclick = setProjection; + document.getElementById('epsg3576').onclick = setProjection; + document.getElementById('epsg3571').onclick = setProjection; + document.getElementById('epsg3573').onclick = setProjection; +} From 44a2b50455b55949b14f756035a82a575bd3dd1a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 20 Apr 2013 11:03:46 +0200 Subject: [PATCH 126/148] Release notes for GPU, animated zoom and ModifyFeature control --- notes/2.13.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/notes/2.13.md b/notes/2.13.md index 08d876960d..026cfb2dca 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -55,6 +55,28 @@ The `moveDelay` is the replacement for the `tileLoadingDelay` layer config optio In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager. +## Map: Animated zooming and GPU support + +OpenLayers now has animated zooming, which is enabled by default. To turn it off, configure the map with `zoomMethod: null`. + +To make the zoom animation smooth, GPU support is active by default for rendering tiles. This may interer with UI widgets that overlay the map. In this case, it may be necessary to turn GPU support off, which is done with the following css declaration: + + img.olTileImage { + -webkit-transform: inherit; + -moz-transform: inherit; + -o-transform: inherit; + -ms-transform: inherit; + transform: inherit; + -webkit-backface-visibility: inherit; + -moz-backface-visibility: inherit; + -ms-backface-visibility: inherit; + backface-visibility: inherit; + -webkit-perspective: inherit; + -moz-perspective: inherit; + -ms-perspective: inherit; + perspective: inherit; + } + ## Layer.Grid: Resize transitions by default The `transitionEffect` property for grid layers has been changed to "resize" by default. This allows smooth transitions with animated zooming (also enabled by default). If resize transitions are not wanted for individual layers, set `transitionEffect` to `null`. @@ -63,6 +85,11 @@ The `transitionEffect` property for grid layers has been changed to "resize" by The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build. +## Control.ModifyFeature: no more built-in SelectFeature control + +The ModifyFeature control is now much leaner, making it more reliable when combined with other controls. The most noticable change is that it has no +`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer. + ## window.$ is no longer an alias for OpenLayers.Util.getElement We do no longer create a global variable '$' when such a symbol isn't already From 6fb10d6e0a1e0483969bf757c882bb4062f58709 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 20 Apr 2013 11:08:43 +0200 Subject: [PATCH 127/148] Re-ordering topics in the release notes --- notes/2.13.md | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/notes/2.13.md b/notes/2.13.md index 026cfb2dca..d6eb93ef5e 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -37,10 +37,27 @@ Corresponding issues/pull requests: # Behavior Changes from Past Releases +## Control.DragPan: Kinetic by default + +The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build. + +## Control.ModifyFeature: no more built-in SelectFeature control + +The ModifyFeature control is now much leaner, making it more reliable when combined with other controls. The most noticable change is that it has no +`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer. + ## Format.GPX: No more prefixes No `gpx:` prefix is added in the XML tags anymore when writing GPX from `OpenLayers` features. It seems like it is not supported by most of the tools that are able to read GPX. +## Different return type for OpenLayers.Format.WMSDescribeLayer + +The return type of WMSDescribeLayer format's `read` method was different from the one of the VersionedOGC format superclass. So it was changed from an array to an object with a layerDescriptions property that holds the array. For backwards compatibility, the object still has a length property and 0, ..., n properties with the previous array values. + +## Moved errorProperty from the base class to the parser in Format.OWSCommon + +This was necessary for WCS support because there are no properties in common between versions 1.0.0 and 1.1.0 that were appropriate for checking. The only existing code that this affected was WFS parsing. + ## Layer.Grid: Tile queue and tileLoadingDelay changes With the introduction of OpenLayers.TileManager, tile queueing has become optional. The default behavior is back to how it was in OpenLayers 2.11. To use a tile queue in 2.13, the map needs to be configured with a tileManager, e.g.: @@ -55,6 +72,10 @@ The `moveDelay` is the replacement for the `tileLoadingDelay` layer config optio In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager. +## Layer.Grid: Resize transitions by default + +The `transitionEffect` property for grid layers has been changed to "resize" by default. This allows smooth transitions with animated zooming (also enabled by default). If resize transitions are not wanted for individual layers, set `transitionEffect` to `null`. + ## Map: Animated zooming and GPU support OpenLayers now has animated zooming, which is enabled by default. To turn it off, configure the map with `zoomMethod: null`. @@ -77,18 +98,13 @@ To make the zoom animation smooth, GPU support is active by default for renderin perspective: inherit; } -## Layer.Grid: Resize transitions by default +## Map property fallThrough defaults to false -The `transitionEffect` property for grid layers has been changed to "resize" by default. This allows smooth transitions with animated zooming (also enabled by default). If resize transitions are not wanted for individual layers, set `transitionEffect` to `null`. +The behaviour controlled by map property fallThrough wasn't consistent (some events were swallowed even with fallThrough set to true) and changes have been made to fix that. Defaulting fallThrough to false after this change is sensible in most situations and will probably be what most applications expect, but if you previously relied on pointer or keyboard events being passed through you will probably want to set fallThrough to true. -## Control.DragPan: Kinetic by default +Behavioural change was made in this commit: -The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build. - -## Control.ModifyFeature: no more built-in SelectFeature control - -The ModifyFeature control is now much leaner, making it more reliable when combined with other controls. The most noticable change is that it has no -`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer. +* https://github.com/openlayers/openlayers/commit/a6119f6a7528e013b922fd0d997a07df13f6bd6e ## window.$ is no longer an alias for OpenLayers.Util.getElement @@ -107,14 +123,6 @@ Corresponding issue/pull requests: * https://github.com/openlayers/openlayers/pull/423 -## Map property fallThrough defaults to false - -The behaviour controlled by map property fallThrough wasn't consistent (some events were swallowed even with fallThrough set to true) and changes have been made to fix that. Defaulting fallThrough to false after this change is sensible in most situations and will probably be what most applications expect, but if you previously relied on pointer or keyboard events being passed through you will probably want to set fallThrough to true. - -Behavioural change was made in this commit: - -* https://github.com/openlayers/openlayers/commit/a6119f6a7528e013b922fd0d997a07df13f6bd6e - # New Options for Build Script * add the contents of a file as a comment at the front of the build, for example, the output of 'git describe --tags' could be saved as a file and then included @@ -124,12 +132,4 @@ run 'build.py -h' for more details Corresponding issue/pull requests: -* https://github.com/openlayers/openlayers/pull/528 - -# Different return type for OpenLayers.Format.WMSDescribeLayer - -The return type of WMSDescribeLayer format's `read` method was different from the one of the VersionedOGC format superclass. So it was changed from an array to an object with a layerDescriptions property that holds the array. For backwards compatibility, the object still has a length property and 0, ..., n properties with the previous array values. - -# Moved errorProperty from the base class to the parser - -This was necessary for WCS support because there are no properties in common between versions 1.0.0 and 1.1.0 that were appropriate for checking. The only existing code that this affected was WFS parsing. +* https://github.com/openlayers/openlayers/pull/528 \ No newline at end of file From 76efa60888eabaa8e10ee03e52dee3dcbcd5c7c9 Mon Sep 17 00:00:00 2001 From: Karamell Date: Sun, 21 Apr 2013 11:04:06 +0200 Subject: [PATCH 128/148] added a labelOutlineOpacity attribute to SVG and Canvas Renderers. --- lib/OpenLayers/Feature/Vector.js | 3 ++- lib/OpenLayers/Renderer/Canvas.js | 1 + lib/OpenLayers/Renderer/SVG.js | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index 8b53112898..a6c8c70ad0 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -422,7 +422,8 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * labelSelect - {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls. * Default is false. * labelOutlineColor - {String} The color of the label outline. Default is 'white'. Only supported by the canvas & SVG renderers. - * labelOutlineWidth - {Number} The width of the label outline. Default is 3, set to 0 or null to disable. Only supported by the canvas & SVG renderers. + * labelOutlineWidth - {Number} The width of the label outline. Default is 3, set to 0 or null to disable. Only supported by the SVG renderers. + * labelOutlineOpacity - {Number} The opacity (0-1) of the label outline. Default is fontOpacity. Only supported by the canvas & SVG renderers. * fontColor - {String} The font color for the label, to be provided like CSS. * fontOpacity - {Number} Opacity (0-1) for the label * fontFamily - {String} The font family for the label, to be provided like in CSS. diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js index c18a435874..61a327c8ce 100644 --- a/lib/OpenLayers/Renderer/Canvas.js +++ b/lib/OpenLayers/Renderer/Canvas.js @@ -712,6 +712,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { for (var i = 0; i < numRows; i++) { if (style.labelOutlineWidth) { this.canvas.save(); + this.canvas.globalAlpha = style.labelOutlineOpacity || style.fontOpacity || 1.0; this.canvas.strokeStyle = style.labelOutlineColor; this.canvas.lineWidth = style.labelOutlineWidth; this.canvas.strokeText(labelRows[i], pt[0], pt[1] + (lineHeight*i) + 1); diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index c3dd05713a..263aac0be0 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -655,6 +655,9 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, { outlineStyle.fontColor = outlineStyle.labelOutlineColor; outlineStyle.fontStrokeColor = outlineStyle.labelOutlineColor; outlineStyle.fontStrokeWidth = style.labelOutlineWidth; + if (style.labelOutlineOpacity) { + outlineStyle.fontOpacity = style.labelOutlineOpacity; + } delete outlineStyle.labelOutlineWidth; this.drawText(featureId, outlineStyle, location); } From 444d9a06ae572b8d2af074447e3d0ce59ef81cd2 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 22 Apr 2013 23:11:57 +0200 Subject: [PATCH 129/148] build: Added "uglify-js" as optional compressor --- build/build.py | 17 ++++++++++++++++- tools/uglify_js.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tools/uglify_js.py diff --git a/build/build.py b/build/build.py index da539a29ab..fd0f6e9bb1 100755 --- a/build/build.py +++ b/build/build.py @@ -32,6 +32,13 @@ def build(config_file = None, output_file = None, options = None): except ImportError: print "No minimize" + try: + import uglify_js + uglify_js.check_available() + have_compressor.append("uglify-js") + except Exception, E: + print "No uglify-js (%s)" % E + use_compressor = None if options.compressor and options.compressor in have_compressor: use_compressor = options.compressor @@ -52,7 +59,7 @@ def build(config_file = None, output_file = None, options = None): print "Merging libraries." try: - if use_compressor == "closure": + if use_compressor == "closure" or use_compressor == 'uglify-js': sourceFiles = mergejs.getNames(sourceDirectory, configFilename) else: merged = mergejs.run(sourceDirectory, None, configFilename) @@ -107,6 +114,14 @@ def build(config_file = None, output_file = None, options = None): print "\nAbnormal termination due to compilation errors." sys.exit("ERROR: Closure Compilation failed! See compilation errors.") print "Closure Compilation has completed successfully." + elif use_compressor == "uglify-js": + minimized = uglify_js.compile(sourceFiles) + if minimized is None: + print "\nAbnormal termination due to compilation errors." + sys.exit("ERROR: Uglify JS compilation failed! See compilation errors.") + + print "Uglify JS compilation has completed successfully." + else: # fallback minimized = merged diff --git a/tools/uglify_js.py b/tools/uglify_js.py new file mode 100644 index 0000000000..50ef0984c5 --- /dev/null +++ b/tools/uglify_js.py @@ -0,0 +1,35 @@ +"""Utility to use the Uglify JS Compiler CLI from Python.""" + +import logging +import subprocess + + +def check_available(): + """ Returns whether the uglify-js tool is available. """ + subprocess.check_output(['which', 'uglifyjs']) + + +def compile(source_paths, flags=None): + """ + Prepares command-line call to uglify-js compiler. + + Args: + source_paths: Source paths to build, in order. + flags: A list of additional flags to pass on to uglify-js. + + Returns: + The compiled source, as a string, or None if compilation failed. + """ + + args = ['uglifyjs'] + args.extend(source_paths) + args.extend(['-c', '-m']) + if flags: + args += flags + + logging.info('Compiling with the following command: %s', ' '.join(args)) + + try: + return subprocess.check_output(args) + except subprocess.CalledProcessError: + return From aa2345693a9d1b99def96e77e098c254202b167d Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 23 Apr 2013 10:45:08 +0200 Subject: [PATCH 130/148] Addressing @bartvde's review comments --- lib/OpenLayers/Events.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index a239ae016e..6a4a129c11 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -1074,7 +1074,7 @@ OpenLayers.Events = OpenLayers.Class({ var cb = function(e) { var alreadyInArray = false; - for (var i = 0; i < touches.length; i++) { + for (var i=0, ii=touches.length; i Date: Tue, 23 Apr 2013 12:40:15 +0200 Subject: [PATCH 131/148] Use other edge and outside coordinates This avoids a failing test due to anti-aliasing artifacts in Safari. --- tests/Renderer/Canvas.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Renderer/Canvas.html b/tests/Renderer/Canvas.html index a1343bba11..f9a4c31183 100644 --- a/tests/Renderer/Canvas.html +++ b/tests/Renderer/Canvas.html @@ -321,9 +321,9 @@ var cases = [{ msg: "center of point", x: -100, y: 0, id: layer.features[0].id }, { - msg: "edge of point", x: -103, y: 3, id: layer.features[0].id + msg: "edge of point", x: -106, y: 0, id: layer.features[0].id }, { - msg: "outside point", x: -110, y: 3, id: null + msg: "outside point", x: -110, y: 0, id: null }, { msg: "center of line", x: 0, y: 0, id: layer.features[1].id }, { From 7cb99834e37fba9512919d5494cf52a17c9a12dc Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 13:02:29 +0200 Subject: [PATCH 132/148] fix opacity tests in IE10 (see #948) --- tests/Popup.html | 3 +-- tests/Popup/AnchoredBubble.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Popup.html b/tests/Popup.html index 766ac59e0d..d2a9685398 100644 --- a/tests/Popup.html +++ b/tests/Popup.html @@ -168,8 +168,7 @@ var bColor = popup.div.style.backgroundColor; var goodColor = ( (bColor == color) || (bColor == hexColor)); t.ok(goodColor, "good default popup.backgroundColor"); - - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity"); } else { t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity"); diff --git a/tests/Popup/AnchoredBubble.html b/tests/Popup/AnchoredBubble.html index bd2d8123b2..f03ff09d8d 100644 --- a/tests/Popup/AnchoredBubble.html +++ b/tests/Popup/AnchoredBubble.html @@ -32,7 +32,7 @@ popup.setOpacity(opacity); popup.draw(new OpenLayers.Pixel(x, y)); - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity"); } else { t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity"); @@ -43,7 +43,7 @@ t.ok(popup.groupDiv.parentNode.getElementsByTagName("span").length > 0, "popup.groupDiv.parentNode has SPAN children"); var ricoCornerDiv = popup.groupDiv.parentNode.getElementsByTagName("span")[0]; - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(ricoCornerDiv.style.opacity), opacity, "good default ricoCornerDiv.opacity"); } else { t.eq(ricoCornerDiv.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default ricoCornerDiv.opacity"); From 2613ccb5046c5562a244063d077891bbeeb6d010 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 13:17:53 +0200 Subject: [PATCH 133/148] fix WMSDescribeLayer format exception test case in IE9 and IE10 (see #948) --- tests/Format/WMSDescribeLayer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Format/WMSDescribeLayer.html b/tests/Format/WMSDescribeLayer.html index 939bfe1d8f..7a53269109 100644 --- a/tests/Format/WMSDescribeLayer.html +++ b/tests/Format/WMSDescribeLayer.html @@ -49,8 +49,8 @@ function test_read_exception(t) { t.plan(1); var text = '' + - '' + - ' ' + + '' + + ' ' + 'geonode:_map_107_annotations: no such layer on this server' + ''; var format = new OpenLayers.Format.WMSDescribeLayer(); From 415265db40ed6eef68aecdaadc4a6149500e319c Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 13:28:39 +0200 Subject: [PATCH 134/148] protect 2 Google test cases for validkey --- tests/Layer/Google.html | 139 +++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/tests/Layer/Google.html b/tests/Layer/Google.html index 3b9b2cb465..84f17c9bf8 100644 --- a/tests/Layer/Google.html +++ b/tests/Layer/Google.html @@ -237,53 +237,57 @@ } function test_setOpacity(t) { + if(validkey) { + t.plan(6); - t.plan(6); + var map = new OpenLayers.Map("map"); + var gmap = new OpenLayers.Layer.Google( + "Google Streets", // the default + {numZoomLevels: 20} + ); + var ghyb = new OpenLayers.Layer.Google( + "Google Hybrid", + {type: G_HYBRID_MAP, numZoomLevels: 20} + ); + var gsat = new OpenLayers.Layer.Google( + "Google Satellite", + {type: G_SATELLITE_MAP, numZoomLevels: 22} + ); + map.addLayers([gmap, ghyb, gsat]); + map.zoomToMaxExtent(); - var map = new OpenLayers.Map("map"); - var gmap = new OpenLayers.Layer.Google( - "Google Streets", // the default - {numZoomLevels: 20} - ); - var ghyb = new OpenLayers.Layer.Google( - "Google Hybrid", - {type: G_HYBRID_MAP, numZoomLevels: 20} - ); - var gsat = new OpenLayers.Layer.Google( - "Google Satellite", - {type: G_SATELLITE_MAP, numZoomLevels: 22} - ); - map.addLayers([gmap, ghyb, gsat]); - map.zoomToMaxExtent(); + var container = map.baseLayer.mapObject.getContainer(); + var opacityCheck = function(opacity) { + var style = container.style; + var current = style.opacity === "" ? 1 : parseFloat(style.opacity); + if (style.filter && !style.opacity) { + current = Number(style.filter.replace(/alpha\(opacity=(.+?)\)/, "$1")); + } + return (current === opacity); + }; - var container = map.baseLayer.mapObject.getContainer(); - var opacityCheck = function(opacity) { - var style = container.style; - var current = style.opacity === "" ? 1 : parseFloat(style.opacity); - if (style.filter && !style.opacity) { - current = Number(style.filter.replace(/alpha\(opacity=(.+?)\)/, "$1")); - } - return (current === opacity); - }; + gmap.setOpacity(0.5); + t.ok(opacityCheck(0.5), "container opacity set for visible layer"); - gmap.setOpacity(0.5); - t.ok(opacityCheck(0.5), "container opacity set for visible layer"); + ghyb.setOpacity(0.75); + t.ok(opacityCheck(0.5), "container opacity not changed if layer not visible"); + map.setBaseLayer(ghyb); + t.ok(opacityCheck(0.75), "container opacity changed to 0.75 when layer becomes visible"); - ghyb.setOpacity(0.75); - t.ok(opacityCheck(0.5), "container opacity not changed if layer not visible"); - map.setBaseLayer(ghyb); - t.ok(opacityCheck(0.75), "container opacity changed to 0.75 when layer becomes visible"); + map.setBaseLayer(gsat); + t.ok(opacityCheck(1), "container opacity set to 1 by default"); + gsat.setOpacity(0.25); + t.ok(opacityCheck(0.25), "container opacity changed to 0.25 for visible layer"); - map.setBaseLayer(gsat); - t.ok(opacityCheck(1), "container opacity set to 1 by default"); - gsat.setOpacity(0.25); - t.ok(opacityCheck(0.25), "container opacity changed to 0.25 for visible layer"); - - map.setBaseLayer(gmap); - t.ok(opacityCheck(0.5), "container opacity set to layer opacity"); - - map.destroy(); + map.setBaseLayer(gmap); + t.ok(opacityCheck(0.5), "container opacity set to layer opacity"); + map.destroy(); + } else { + t.plan(0); + t.debug_print("Google tests can't be run from " + + window.location.host); + } } function test_Layer_Google_setGMapVisibility(t) { @@ -321,34 +325,39 @@ } function test_sphericalMercator(t) { - - t.plan(4); - var map, layer; - map = new OpenLayers.Map("map"); - layer = new OpenLayers.Layer.Google(); - map.addLayer(layer); - t.ok(!layer.sphericalMercator, "sphericalMercator false by default"); - t.eq(map.getProjection(), "EPSG:4326", "4326 by default without sphericalMercator"); - map.destroy(); - - map = new OpenLayers.Map("map"); - layer = new OpenLayers.Layer.Google(null, { - sphericalMercator: true - }); - map.addLayer(layer); - t.eq(map.getProjection(), "EPSG:900913", "900913 by default with sphericalMercator"); - map.destroy(); + if (validkey) { + t.plan(4); + var map, layer; - map = new OpenLayers.Map("map"); - layer = new OpenLayers.Layer.Google(null, { - sphericalMercator: true, - projection: "EPSG:102113" - }); - map.addLayer(layer); - t.eq(map.getProjection(), "EPSG:102113", "custom code respected with sphericalMercator"); - map.destroy(); + map = new OpenLayers.Map("map"); + layer = new OpenLayers.Layer.Google(); + map.addLayer(layer); + t.ok(!layer.sphericalMercator, "sphericalMercator false by default"); + t.eq(map.getProjection(), "EPSG:4326", "4326 by default without sphericalMercator"); + map.destroy(); + map = new OpenLayers.Map("map"); + layer = new OpenLayers.Layer.Google(null, { + sphericalMercator: true + }); + map.addLayer(layer); + t.eq(map.getProjection(), "EPSG:900913", "900913 by default with sphericalMercator"); + map.destroy(); + + map = new OpenLayers.Map("map"); + layer = new OpenLayers.Layer.Google(null, { + sphericalMercator: true, + projection: "EPSG:102113" + }); + map.addLayer(layer); + t.eq(map.getProjection(), "EPSG:102113", "custom code respected with sphericalMercator"); + map.destroy(); + } else { + t.plan(0); + t.debug_print("Google tests can't be run from " + + window.location.host); + } } From 60a966714d17c89b658c7ede35f05d0e53811d24 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 23 Apr 2013 14:22:31 +0200 Subject: [PATCH 135/148] Hack for making page position calculations work Many browsers do very limited rendering/reflow on hidden IFrames. By making the test IFrame visible, we get everything rendered like a real page. This is a partial fix for #947. --- tests/Util.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Util.html b/tests/Util.html index 3972d68d84..528a932cce 100644 --- a/tests/Util.html +++ b/tests/Util.html @@ -111,6 +111,16 @@ function test_Util_pagePosition(t) { t.plan( 2 ); + + // making sure that the test iframe is visible + var origDisplay; + var parents = window.parent.document.getElementsByTagName('iframe'); + if (parents.length) { + origDisplay = parents[1].parentNode.style.display; + // span containing the test iframe is the invisible element + parents[1].parentNode.style.display = ""; + } + var pp = OpenLayers.Util.pagePosition(window); t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'"); @@ -118,6 +128,11 @@ var mapDiv = document.getElementById("map"); pp = OpenLayers.Util.pagePosition(mapDiv); t.eq( pp.toString(), "123,1234", "Page position should work after page has been scrolled"); + + // reset test iframe visibility + if (parents.length) { + parents[1].parentNode.style.display = origDisplay; + } } function test_Util_createDiv(t) { From d63055f28cdcf3998f4028a6897a7bbae633229f Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 15:25:06 +0200 Subject: [PATCH 136/148] remove trailing comma from PanZoomBar tests (see #950) --- tests/Control/PanZoomBar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Control/PanZoomBar.html b/tests/Control/PanZoomBar.html index 28327768f5..5ed2833ec1 100644 --- a/tests/Control/PanZoomBar.html +++ b/tests/Control/PanZoomBar.html @@ -129,7 +129,7 @@ var map = new OpenLayers.Map('map', { controls: [], fractionalZoom: true, - zoomMethod: null, + zoomMethod: null }); var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", { map: "/mapdata/vmap_wms.map", From 872502311fd46103a33240211d25b8eba00bdc17 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 15:36:52 +0200 Subject: [PATCH 137/148] remove trailing comma from cluster strategy tests (see #950) --- tests/Strategy/Cluster.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Strategy/Cluster.html b/tests/Strategy/Cluster.html index d5f7a9b285..3358ff9b3f 100644 --- a/tests/Strategy/Cluster.html +++ b/tests/Strategy/Cluster.html @@ -45,7 +45,7 @@ var map = new OpenLayers.Map('map', { resolutions: [4, 2, 1], maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40), - zoomMethod: null, + zoomMethod: null }); map.addLayer(layer); From acc497bf3c587ba548cb0d8c8a0bebdea28a082f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 24 Apr 2013 01:01:56 +0200 Subject: [PATCH 138/148] Making TouchNavigation tests work in Firefox --- tests/Control/TouchNavigation.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/Control/TouchNavigation.html b/tests/Control/TouchNavigation.html index 21241dd502..bffc2257cd 100644 --- a/tests/Control/TouchNavigation.html +++ b/tests/Control/TouchNavigation.html @@ -128,27 +128,28 @@ function test_zoomOut(t) { t.plan(1); - var map = new OpenLayers.Map(document.body); + var map = new OpenLayers.Map('map', {zoomMethod: null}); var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(0, 0), 5); + var origSetTimeout = window.setTimeout; + window.setTimeout = function(fn) { fn(); return 'id'; }; var control = new OpenLayers.Control.TouchNavigation(); map.addControl(control); var handler = control.handlers.click; handler.touchstart({xy: new OpenLayers.Pixel(1 ,1), touches: ["foo", "bar"]}); handler.touchend({}); - t.delay_call(1, function() { - t.eq(map.getZoom(), 4, "Did we zoom out?"); - // tear down - map.destroy(); - }); - + t.eq(map.getZoom(), 4, "Did we zoom out?"); + // tear down + map.destroy(); + window.setTimeout = origSetTimeout; } +
From 9f53506754900e35da35ed2065c0101a9799f2ae Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 24 Apr 2013 14:15:12 +0200 Subject: [PATCH 139/148] Tile bounds changed with #517 to remove white lines between tiles --- tests/deprecated/Layer/MapServer.html | 9 ++++----- tests/deprecated/Layer/WMS.html | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/deprecated/Layer/MapServer.html b/tests/deprecated/Layer/MapServer.html index 27ce63dd20..101646e933 100644 --- a/tests/deprecated/Layer/MapServer.html +++ b/tests/deprecated/Layer/MapServer.html @@ -31,11 +31,10 @@ map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(0,0), 5); var tile = layer.grid[0][0]; - tile.draw(true); // the tile queue defers the drawing - t.eq( tile.bounds.left, -22.5, "left side matches" ); - t.eq( tile.bounds.right, -11.25, "top side matches" ); - t.eq( tile.bounds.bottom.toFixed(6), '11.178402', "bottom side matches" ); - t.eq( tile.bounds.top.toFixed(6), '21.943046', "top side matches" ); + t.eq( tile.bounds.left, -22.5, "left side matches" ); + t.eq( tile.bounds.right, -11.25, "right side matches" ); + t.eq( tile.bounds.bottom.toFixed(6), '11.781325', "bottom side matches" ); + t.eq( tile.bounds.top.toFixed(6), '22.512557', "top side matches" ); map.destroy(); } else { t.plan(1); diff --git a/tests/deprecated/Layer/WMS.html b/tests/deprecated/Layer/WMS.html index 523d6eef12..4cbf6e2297 100644 --- a/tests/deprecated/Layer/WMS.html +++ b/tests/deprecated/Layer/WMS.html @@ -1,3 +1,4 @@ + @@ -31,11 +32,10 @@ map.addLayer(wmslayer); map.setCenter(new OpenLayers.LonLat(0,0), 5); var tile = wmslayer.grid[0][0]; - tile.draw(true); // the tile queue defers the drawing t.eq( tile.bounds.left, -22.5, "left side matches" ); t.eq( tile.bounds.right, -11.25, "right side matches" ); - t.eq( tile.bounds.bottom.toFixed(6), '11.178402', "bottom side matches" ); - t.eq( tile.bounds.top.toFixed(6), '21.943046', "top side matches" ); + t.eq( tile.bounds.bottom.toFixed(6), '11.781325', "bottom side matches" ); + t.eq( tile.bounds.top.toFixed(6), '22.512557', "top side matches" ); map.destroy(); } else { t.plan(1); From 11977f57a3de730ce904c17b63b048bdcda4f4ec Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 24 Apr 2013 14:31:33 +0200 Subject: [PATCH 140/148] Making pagePosition test work in IE8 --- tests/Util.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Util.html b/tests/Util.html index 528a932cce..a6cab66612 100644 --- a/tests/Util.html +++ b/tests/Util.html @@ -124,10 +124,11 @@ var pp = OpenLayers.Util.pagePosition(window); t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'"); - window.scrollTo(100, 1200); var mapDiv = document.getElementById("map"); + var beforeScrollPp = OpenLayers.Util.pagePosition(mapDiv); + window.scrollTo(100, 1200); pp = OpenLayers.Util.pagePosition(mapDiv); - t.eq( pp.toString(), "123,1234", "Page position should work after page has been scrolled"); + t.eq(pp, beforeScrollPp, "Page position should work after page has been scrolled"); // reset test iframe visibility if (parents.length) { From 2782fa47c893e861590b8c44cb08b1e4e6454e38 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 24 Apr 2013 15:41:04 +0200 Subject: [PATCH 141/148] URL comparison fails in IE8 The W3C standard says that setAttribute/getAttribute on any DOM element is a simple setter/getter thing. IE8 tries to be smarter and returns the full URL when calling getAttribute('src') on an image instead of the one that was set with setAttribute('src'). This change makes sure that urls are compared properly, also in IE8. --- lib/OpenLayers/Tile/Image.js | 3 ++- tests/TileManager.html | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 9923109087..4db5ff8440 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -7,6 +7,7 @@ /** * @requires OpenLayers/Tile.js * @requires OpenLayers/Animation.js + * @requires OpenLayers/Util.js */ /** @@ -317,7 +318,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { this.layer.div.appendChild(this.getTile()); this.events.triggerEvent(this._loadEvent); var img = this.getImage(); - if (this.url && img.getAttribute("src") == this.url) { + if (this.url && OpenLayers.Util.isEquivalentUrl(img.src, this.url)) { this._loadTimeout = window.setTimeout( OpenLayers.Function.bind(this.onImageLoad, this), 0 ); diff --git a/tests/TileManager.html b/tests/TileManager.html index 72a58b4922..1468c5b46b 100644 --- a/tests/TileManager.html +++ b/tests/TileManager.html @@ -64,17 +64,28 @@ gridSize = layer.div.childNodes.length; map.setCenter([17, 47]); }); + + function inCache(img) { + var search = img.src.split('?')[1]; + for (var s in tileManager.tileCache) { + if (s.split('?')[1] == search) { + return true; + } + } + return false; + } + t.delay_call(4, function() { t.eq(tileManager.tileCacheIndex.length, 12, "tiles cached"); t.ok(tileManager.tileCache[layer.grid[1][2].url] === layer.grid[1][2].imgDiv, "correct object cached"); - t.ok(!(firstInCache.getAttribute("src") in tileManager.tileCache), "old tile discarded"); - t.ok(sharedTile.getAttribute("src") in tileManager.tileCache, "shared tile still in cache"); + t.ok(!inCache(firstInCache), "old tile discarded"); + t.ok(inCache(sharedTile), "shared tile still in cache"); firstInCache = tileManager.tileCache[tileManager.tileCacheIndex[0]]; map.setCenter([16, 48]); }); t.delay_call(6, function() { - t.ok(!(firstInCache.getAttribute("src") in tileManager.tileCache), "old tile discarded"); - t.ok(sharedTile.getAttribute("src") in tileManager.tileCache, "shared tile still in cache"); + t.ok(!inCache(firstInCache), "old tile discarded"); + t.ok(inCache(sharedTile), "shared tile still in cache"); t.eq(layer.div.childNodes.length, gridSize, 'no unused images left in dom'); map.destroy(); }); From 43a8821ce683e6a37c816f4226c8a9787a2fb9df Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sun, 24 Jun 2012 20:16:08 +0200 Subject: [PATCH 142/148] Can test some manual tests as normal tests. --- tests/Test.AnotherWay.baseadditions.js | 14 ++ tests/Util.html | 17 +- ...endered-dimensions.html => Util_common.js} | 166 +++++++----------- tests/Util_w3c.html | 35 ++++ tests/list-tests.html | 5 +- tests/run-tests.html | 6 +- 6 files changed, 126 insertions(+), 117 deletions(-) rename tests/{manual/rendered-dimensions.html => Util_common.js} (60%) create mode 100644 tests/Util_w3c.html diff --git a/tests/Test.AnotherWay.baseadditions.js b/tests/Test.AnotherWay.baseadditions.js index 2354b34361..338bf825c7 100644 --- a/tests/Test.AnotherWay.baseadditions.js +++ b/tests/Test.AnotherWay.baseadditions.js @@ -30,6 +30,7 @@ Test.AnotherWay._run_one_onclick = function(){ // test page loading Test.AnotherWay.old_load_next_page = Test.AnotherWay._load_next_page; Test.AnotherWay._load_next_page = function(){ + document.getElementById("test_iframe_el").style.display = "none"; Test.AnotherWay.update_running_time(); Test.AnotherWay.old_load_next_page.apply(this, arguments); }; @@ -94,6 +95,19 @@ Test.AnotherWay._add_test_page_url = function(test_url, convention){ record_select.appendChild(option); }; +Test.AnotherWay.old_set_iframe_location = Test.AnotherWay._set_iframe_location; +Test.AnotherWay._set_iframe_location = function(iframe, loc, outside_path_correction){ + var optionPos = loc.indexOf( "?" ), + option; + if (optionPos != -1) { + option = loc.substring(optionPos+1); + loc = loc.substring(0, optionPos); + } + if (option === "visible") { + document.getElementById("test_iframe_el").style.display = ""; + } + return Test.AnotherWay.old_set_iframe_location.call(this, iframe, loc, outside_path_correction); +}; // new methods Test.AnotherWay.update_running_time = function() { diff --git a/tests/Util.html b/tests/Util.html index a6cab66612..48d5de7315 100644 --- a/tests/Util.html +++ b/tests/Util.html @@ -11,6 +11,9 @@ top: 1234px; left: 123px; } + .test_getRenderedDimensions p{ + padding: 20px; + } + - - - -
-
-
- - +function com_test_getRenderedDimensions(t) { + t.plan(17); + var content = (new Array(100)).join("foo "); + + // test with fixed width + var fw = OpenLayers.Util.getRenderedDimensions(content, {w: 20}); + t.eq(fw.w, 20, "got the fixed width"); + + // test with fixed height + var fh = OpenLayers.Util.getRenderedDimensions(content, {h: 15}); + t.eq(fh.h, 15, "got the fixed height"); + + var size = OpenLayers.Util.getRenderedDimensions("

Content

"); + var bigger = OpenLayers.Util.getRenderedDimensions("

Content

", null, {displayClass: 'test_getRenderedDimensions'}); + var overflow = OpenLayers.Util.getRenderedDimensions("

Content

"); + var width = OpenLayers.Util.getRenderedDimensions("

Content

", new OpenLayers.Size(250, null)); + var height = OpenLayers.Util.getRenderedDimensions("

Content

", new OpenLayers.Size(null, 40)); + t.ok((size.w + 40) == bigger.w && (size.h + 40) == bigger.h, "bigger Pass: " + size + ", " + bigger); + t.ok(size.w == overflow.w && size.h == overflow.h, "overflow Pass: " + size + ", " + overflow); + t.ok(width.w == 250 && width.h == size.h, "width Pass: " + size + ", " + width); + t.ok(height.h == 40 && height.w == size.w, "height Pass: " + size + ", " + height); + + content = (new Array(10)).join("foo foo foo
"); + var testName, + finalSize, + initialSize = OpenLayers.Util.getRenderedDimensions(content, null); + // containerElement option on absolute position with width and height + testName = "Absolute with w&h: "; + var optionAbsDiv ={ + containerElement: document.getElementById("absoluteDiv") + }; + finalSize = OpenLayers.Util.getRenderedDimensions(content, null, optionAbsDiv); + t.ok(initialSize.w > 0 && initialSize.h > 0, "Has initial size (requires visible test_iframe)"); + t.eq(finalSize.w, initialSize.w, + testName + "initial width " + initialSize.w + "px is maintained"); + t.eq(finalSize.h, initialSize.h, + testName + "initial height " + initialSize.h + "px is maintained"); + testName = "Absolute with w&h (set height): "; + finalSize = OpenLayers.Util.getRenderedDimensions(content, {h: 15}, optionAbsDiv); + t.eq(finalSize.h, 15, testName + "got the fixed height to 15px"); + t.eq(finalSize.w, initialSize.w, + testName + "initial width " + initialSize.w + "px is maintained"); + testName = "Absolute with w&h (set width): "; + finalSize = OpenLayers.Util.getRenderedDimensions(content, {w: 20}, optionAbsDiv); + t.eq(finalSize.w, 20, testName + "got the fixed width to 20px"); + // containerElement option on absolute position without width and height + testName = "Absolute without w&h: "; + var optionAbsDiv00 ={ + containerElement: document.getElementById("absoluteDiv00") + }; + finalSize = OpenLayers.Util.getRenderedDimensions(content, null, optionAbsDiv00); + t.eq(finalSize.w, initialSize.w, + testName + "initial width " + initialSize.w + "px is maintained"); + t.eq(finalSize.h, initialSize.h, + testName + "initial height " + initialSize.h + "px is maintained"); + testName = "Absolute without w&h (set height): "; + finalSize = OpenLayers.Util.getRenderedDimensions(content, {h: 15}, optionAbsDiv00); + t.eq(finalSize.h, 15, testName + "got the fixed height to 15px"); + t.eq(finalSize.w, initialSize.w, + testName + "initial width " + initialSize.w + "px is maintained"); + testName = "Absolute without w&h (set width): "; + finalSize = OpenLayers.Util.getRenderedDimensions(content, {w: 20}, optionAbsDiv00); + t.eq(finalSize.w, 20, testName + "got the fixed width to 20px"); +} diff --git a/tests/Util_w3c.html b/tests/Util_w3c.html new file mode 100644 index 0000000000..457341f82e --- /dev/null +++ b/tests/Util_w3c.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +
+ + diff --git a/tests/list-tests.html b/tests/list-tests.html index 3236c507d6..e9fad7cbd4 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -191,7 +191,7 @@
  • SingleFile1.html
  • SingleFile2.html
  • SingleFile3.html -
  • Popup.html
  • +
  • Popup.html?visible
  • Popup/Anchored.html
  • Popup/AnchoredBubble.html
  • Popup/FramedCloud.html
  • @@ -234,7 +234,8 @@
  • TileManager.html
  • Tween.html
  • Kinetic.html
  • -
  • Util.html
  • +
  • Util.html?visible
  • +
  • Util_w3c.html?visible
  • Util/vendorPrefix.html
  • WPSClient.html
  • WPSProcess.html
  • diff --git a/tests/run-tests.html b/tests/run-tests.html index b2e0556ac3..d1517e4c37 100644 --- a/tests/run-tests.html +++ b/tests/run-tests.html @@ -92,11 +92,13 @@
    + + + - -

    From 27ccd3cbaafde6180b6be1bfbf98d05456f603d7 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 24 Apr 2013 22:03:37 +0200 Subject: [PATCH 143/148] Completing mock for 2D transforms (see #950) --- tests/Map.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Map.html b/tests/Map.html index 0de10e7a56..4cffd0398f 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -2101,7 +2101,9 @@ function test_applyTransform(t) { t.plan(10); var origStylePrefix = OpenLayers.Util.vendorPrefix.style; - OpenLayers.Util.vendorPrefix.style = function(key) { return 'transform'; }; + OpenLayers.Util.vendorPrefix.style = + OpenLayers.Util.vendorPrefix.css = + function(key) { return 'transform'; }; var map = new OpenLayers.Map('map'); map.layerContainerDiv = {style: {}}; From 5a3c06aa7ecf3d8fd8d711cced563061298524f2 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 27 Mar 2012 10:37:48 +0200 Subject: [PATCH 144/148] Move OpenLayers.Popup.AnchoredBubble to deprecated.js --- apidoc_config/Menu.txt | 1 - doc_config/Menu.txt | 1 - lib/OpenLayers.js | 1 - lib/OpenLayers/Popup/AnchoredBubble.js | 196 ------------------ lib/deprecated.js | 185 ++++++++++++++++- notes/2.13.md | 13 +- .../Popup/AnchoredBubble.html | 7 +- tests/list-tests.html | 2 +- 8 files changed, 201 insertions(+), 205 deletions(-) delete mode 100644 lib/OpenLayers/Popup/AnchoredBubble.js rename tests/{ => deprecated}/Popup/AnchoredBubble.html (93%) diff --git a/apidoc_config/Menu.txt b/apidoc_config/Menu.txt index 425c7ebdcd..baf9502c65 100644 --- a/apidoc_config/Menu.txt +++ b/apidoc_config/Menu.txt @@ -379,7 +379,6 @@ Group: OpenLayers { File: Popup (no auto-title, OpenLayers/Popup.js) File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js) - File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js) File: Framed (no auto-title, OpenLayers/Popup/Framed.js) File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js) } # Group: Popup diff --git a/doc_config/Menu.txt b/doc_config/Menu.txt index 14845eac23..f389877761 100644 --- a/doc_config/Menu.txt +++ b/doc_config/Menu.txt @@ -379,7 +379,6 @@ Group: OpenLayers { File: Popup (no auto-title, OpenLayers/Popup.js) File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js) - File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js) File: Framed (no auto-title, OpenLayers/Popup/Framed.js) File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js) } # Group: Popup diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index e35dcfd1a3..31135c1c68 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -191,7 +191,6 @@ "OpenLayers/Layer/Zoomify.js", "OpenLayers/Layer/ArcGISCache.js", "OpenLayers/Popup/Anchored.js", - "OpenLayers/Popup/AnchoredBubble.js", "OpenLayers/Popup/Framed.js", "OpenLayers/Popup/FramedCloud.js", "OpenLayers/Feature.js", diff --git a/lib/OpenLayers/Popup/AnchoredBubble.js b/lib/OpenLayers/Popup/AnchoredBubble.js deleted file mode 100644 index c1c428b786..0000000000 --- a/lib/OpenLayers/Popup/AnchoredBubble.js +++ /dev/null @@ -1,196 +0,0 @@ -/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the 2-clause BSD license. - * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. */ - - -/** - * @requires OpenLayers/Popup/Anchored.js - * @requires OpenLayers/Console.js - * @requires Rico/Corner.js - */ - -/** - * Class: OpenLayers.Popup.AnchoredBubble - * This class is *deprecated*. Use {} and - * round corners using CSS3's border-radius property. - * - * Inherits from: - * - - */ -OpenLayers.Popup.AnchoredBubble = - OpenLayers.Class(OpenLayers.Popup.Anchored, { - - /** - * Property: rounded - * {Boolean} Has the popup been rounded yet? - */ - rounded: false, - - /** - * Constructor: OpenLayers.Popup.AnchoredBubble - * - * Parameters: - * id - {String} - * lonlat - {} - * contentSize - {} - * contentHTML - {String} - * anchor - {Object} Object to which we'll anchor the popup. Must expose - * a 'size' () and 'offset' () - * (Note that this is generally an ). - * closeBox - {Boolean} - * closeBoxCallback - {Function} Function to be called on closeBox click. - */ - initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox, - closeBoxCallback) { - - OpenLayers.Console.warn('AnchoredBubble is deprecated'); - - this.padding = new OpenLayers.Bounds( - 0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE, - 0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE - ); - OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments); - }, - - /** - * Method: draw - * - * Parameters: - * px - {} - * - * Returns: - * {DOMElement} Reference to a div that contains the drawn popup. - */ - draw: function(px) { - - OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments); - - this.setContentHTML(); - - //set the popup color and opacity - this.setBackgroundColor(); - this.setOpacity(); - - return this.div; - }, - - /** - * Method: updateRelativePosition - * The popup has been moved to a new relative location, in which case - * we will want to re-do the rico corners. - */ - updateRelativePosition: function() { - this.setRicoCorners(); - }, - - /** - * APIMethod: setSize - * - * Parameters: - * contentSize - {} the new size for the popup's - * contents div (in pixels). - */ - setSize:function(contentSize) { - OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); - - this.setRicoCorners(); - }, - - /** - * APIMethod: setBackgroundColor - * - * Parameters: - * color - {String} - */ - setBackgroundColor:function(color) { - if (color != undefined) { - this.backgroundColor = color; - } - - if (this.div != null) { - if (this.contentDiv != null) { - this.div.style.background = "transparent"; - OpenLayers.Rico.Corner.changeColor(this.groupDiv, - this.backgroundColor); - } - } - }, - - /** - * APIMethod: setOpacity - * - * Parameters: - * opacity - {float} - */ - setOpacity:function(opacity) { - OpenLayers.Popup.Anchored.prototype.setOpacity.call(this, opacity); - - if (this.div != null) { - if (this.groupDiv != null) { - OpenLayers.Rico.Corner.changeOpacity(this.groupDiv, - this.opacity); - } - } - }, - - /** - * Method: setBorder - * Always sets border to 0. Bubble Popups can not have a border. - * - * Parameters: - * border - {Integer} - */ - setBorder:function(border) { - this.border = 0; - }, - - /** - * Method: setRicoCorners - * Update RICO corners according to the popup's current relative postion. - */ - setRicoCorners:function() { - - var corners = this.getCornersToRound(this.relativePosition); - var options = {corners: corners, - color: this.backgroundColor, - bgColor: "transparent", - blend: false}; - - if (!this.rounded) { - OpenLayers.Rico.Corner.round(this.div, options); - this.rounded = true; - } else { - OpenLayers.Rico.Corner.reRound(this.groupDiv, options); - //set the popup color and opacity - this.setBackgroundColor(); - this.setOpacity(); - } - }, - - /** - * Method: getCornersToRound - * - * Returns: - * {String} The proper corners string ("tr tl bl br") for rico to round. - */ - getCornersToRound:function() { - - var corners = ['tl', 'tr', 'bl', 'br']; - - //we want to round all the corners _except_ the opposite one. - var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); - OpenLayers.Util.removeItem(corners, corner); - - return corners.join(" "); - }, - - CLASS_NAME: "OpenLayers.Popup.AnchoredBubble" -}); - -/** - * Constant: CORNER_SIZE - * {Integer} 5. Border space for the RICO corners. - */ -OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5; - diff --git a/lib/deprecated.js b/lib/deprecated.js index a389dc7b62..a492faa581 100644 --- a/lib/deprecated.js +++ b/lib/deprecated.js @@ -22,6 +22,8 @@ * @requires OpenLayers/Format/XML.js * @requires OpenLayers/Geometry.js * @requires OpenLayers/Renderer/Elements.js + * @requires OpenLayers/Popup/Anchored.js + * @requires Rico/Corner.js */ /** @@ -5656,4 +5658,185 @@ OpenLayers.Renderer.SVG2.LABEL_VFACTOR = { */ OpenLayers.Renderer.SVG2.preventDefault = function(e) { e.preventDefault && e.preventDefault(); -}; \ No newline at end of file +}; + +/** + * Class: OpenLayers.Popup.AnchoredBubble + * This class is *deprecated*. Use {} and + * round corners using CSS3's border-radius property. + * + * Inherits from: + * - + */ +OpenLayers.Popup.AnchoredBubble = OpenLayers.Class(OpenLayers.Popup.Anchored, { + + /** + * Property: rounded + * {Boolean} Has the popup been rounded yet? + */ + rounded: false, + + /** + * Constructor: OpenLayers.Popup.AnchoredBubble + * + * Parameters: + * id - {String} + * lonlat - {} + * contentSize - {} + * contentHTML - {String} + * anchor - {Object} Object to which we'll anchor the popup. Must expose + * a 'size' () and 'offset' () + * (Note that this is generally an ). + * closeBox - {Boolean} + * closeBoxCallback - {Function} Function to be called on closeBox click. + */ + initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox, + closeBoxCallback) { + + this.padding = new OpenLayers.Bounds( + 0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE, + 0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE + ); + OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments); + }, + + /** + * Method: draw + * + * Parameters: + * px - {} + * + * Returns: + * {DOMElement} Reference to a div that contains the drawn popup. + */ + draw: function(px) { + + OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments); + + this.setContentHTML(); + + //set the popup color and opacity + this.setBackgroundColor(); + this.setOpacity(); + + return this.div; + }, + + /** + * Method: updateRelativePosition + * The popup has been moved to a new relative location, in which case + * we will want to re-do the rico corners. + */ + updateRelativePosition: function() { + this.setRicoCorners(); + }, + + /** + * APIMethod: setSize + * + * Parameters: + * contentSize - {} the new size for the popup's + * contents div (in pixels). + */ + setSize:function(contentSize) { + OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); + + this.setRicoCorners(); + }, + + /** + * APIMethod: setBackgroundColor + * + * Parameters: + * color - {String} + */ + setBackgroundColor:function(color) { + if (color != undefined) { + this.backgroundColor = color; + } + + if (this.div != null) { + if (this.contentDiv != null) { + this.div.style.background = "transparent"; + OpenLayers.Rico.Corner.changeColor(this.groupDiv, + this.backgroundColor); + } + } + }, + + /** + * APIMethod: setOpacity + * + * Parameters: + * opacity - {float} + */ + setOpacity:function(opacity) { + OpenLayers.Popup.Anchored.prototype.setOpacity.call(this, opacity); + + if (this.div != null) { + if (this.groupDiv != null) { + OpenLayers.Rico.Corner.changeOpacity(this.groupDiv, + this.opacity); + } + } + }, + + /** + * Method: setBorder + * Always sets border to 0. Bubble Popups can not have a border. + * + * Parameters: + * border - {Integer} + */ + setBorder:function(border) { + this.border = 0; + }, + + /** + * Method: setRicoCorners + * Update RICO corners according to the popup's current relative postion. + */ + setRicoCorners:function() { + + var corners = this.getCornersToRound(this.relativePosition); + var options = {corners: corners, + color: this.backgroundColor, + bgColor: "transparent", + blend: false}; + + if (!this.rounded) { + OpenLayers.Rico.Corner.round(this.div, options); + this.rounded = true; + } else { + OpenLayers.Rico.Corner.reRound(this.groupDiv, options); + //set the popup color and opacity + this.setBackgroundColor(); + this.setOpacity(); + } + }, + + /** + * Method: getCornersToRound + * + * Returns: + * {String} The proper corners string ("tr tl bl br") for rico to round. + */ + getCornersToRound:function() { + + var corners = ['tl', 'tr', 'bl', 'br']; + + //we want to round all the corners _except_ the opposite one. + var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); + OpenLayers.Util.removeItem(corners, corner); + + return corners.join(" "); + }, + + CLASS_NAME: "OpenLayers.Popup.AnchoredBubble" +}); + +/** + * Constant: CORNER_SIZE + * {Integer} 5. Border space for the RICO corners. + */ +OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5; diff --git a/notes/2.13.md b/notes/2.13.md index d6eb93ef5e..6f5ee7ac86 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -132,4 +132,15 @@ run 'build.py -h' for more details Corresponding issue/pull requests: -* https://github.com/openlayers/openlayers/pull/528 \ No newline at end of file +* https://github.com/openlayers/openlayers/pull/528 + +## Deprecated Components +A number of properties, methods, and constructors have been marked as +deprecated for multiple releases in the 2.x series. +For the 2.13 release this deprecated functionality has been moved to a +separate deprecated.js file. If you use any of the constructors or +methods below, you will have to explicitly include the deprecated.js +file in your build (or add it in a separate ` + + diff --git a/tests/list-tests.html b/tests/list-tests.html index 3236c507d6..b8910c3626 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -193,7 +193,6 @@

  • SingleFile3.html
  • Popup.html
  • Popup/Anchored.html
  • -
  • Popup/AnchoredBubble.html
  • Popup/FramedCloud.html
  • Projection.html
  • Protocol.html
  • @@ -250,6 +249,7 @@
  • deprecated/Layer/WFS.html
  • deprecated/Layer/WMS.html
  • deprecated/Layer/WMS/Post.html
  • +
  • deprecated/Popup/AnchoredBubble.html
  • deprecated/Protocol/SQL.html
  • deprecated/Protocol/SQL/Gears.html
  • deprecated/Renderer/SVG2.html
  • From 5ed18a9708675dba4c183dc4ee0b1daabaeb05bc Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 2 Apr 2012 09:44:03 +0200 Subject: [PATCH 145/148] Remove deprecated roundedCorner option from LayerSwitcher control. --- lib/OpenLayers/Control/LayerSwitcher.js | 42 +++---------------------- notes/2.13.md | 6 ++++ 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index de17c88a10..668f5c349b 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -6,7 +6,6 @@ /** * @requires OpenLayers/Control.js * @requires OpenLayers/Lang.js - * @requires OpenLayers/Console.js * @requires OpenLayers/Util.js * @requires OpenLayers/Events/buttonclick.js */ @@ -24,30 +23,11 @@ * Inherits from: * - */ -OpenLayers.Control.LayerSwitcher = - OpenLayers.Class(OpenLayers.Control, { +OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, { - /** - * APIProperty: roundedCorner - * {Boolean} If true the Rico library is used for rounding the corners - * of the layer switcher div, defaults to false. *Deprecated*. Use - * CSS3's border-radius instead. If this option is set to true the - * Rico/Corner.js script must be loaded in the page, and therefore - * listed in the build profile. - * - */ - roundedCorner: false, - - /** - * APIProperty: roundedCornerColor - * {String} The color of the rounded corners, only applies if roundedCorner - * is true, defaults to "darkblue". - */ - roundedCornerColor: "darkblue", - - /** - * Property: layerStates - * {Array(Object)} Basically a copy of the "state" of the map's layers + /** + * Property: layerStates + * {Array(Object)} Basically a copy of the "state" of the map's layers * the last time the control was drawn. We have this in order to avoid * unnecessarily redrawing the control. */ @@ -120,10 +100,6 @@ OpenLayers.Control.LayerSwitcher = initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this, arguments); this.layerStates = []; - - if(this.roundedCorner) { - OpenLayers.Console.warn('roundedCorner option is deprecated'); - } }, /** @@ -514,16 +490,6 @@ OpenLayers.Control.LayerSwitcher = this.div.appendChild(this.layersDiv); - if(this.roundedCorner) { - OpenLayers.Rico.Corner.round(this.div, { - corners: "tl bl", - bgColor: "transparent", - color: this.roundedCornerColor, - blend: false - }); - OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75); - } - // maximize button div var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png'); this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv( diff --git a/notes/2.13.md b/notes/2.13.md index 6f5ee7ac86..0ee661a642 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -144,3 +144,9 @@ file in your build (or add it in a separate ` +