From ece872b81a177475642a04059a748397cbfe3757 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Mon, 5 Mar 2012 22:23:57 +0100 Subject: [PATCH 01/98] Remove our aliasing of OpenLayers.Util.getElement to window.$. --- lib/OpenLayers/Util.js | 7 ------- tests/Util.html | 5 ----- 2 files changed, 12 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 880e3435ab..9dff44d19f 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -74,13 +74,6 @@ OpenLayers.Util.isArray = function(a) { return (Object.prototype.toString.call(a) === '[object Array]'); }; -/** - * Maintain existing definition of $. - */ -if(typeof window.$ === "undefined") { - window.$ = OpenLayers.Util.getElement; -} - /** * Function: removeItem * Remove an object from an array. Iterates through the array diff --git a/tests/Util.html b/tests/Util.html index 2357b54e2c..73ea006625 100644 --- a/tests/Util.html +++ b/tests/Util.html @@ -77,11 +77,6 @@ t.eq(OpenLayers.Util.isArray(testArray), true, "isArray works"); } - function test_$(t) { - t.plan(1); - t.ok($ === custom$, "OpenLayers doesn't clobber existing definition of $."); - } - function test_Util_getImagesLocation (t) { t.plan( 1 ); t.ok( OpenLayers.Util.getImagesLocation(), "../img/", From de2eeaab0b39ef761ab5857b90b08dd7e4ce2531 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Mon, 5 Mar 2012 22:26:11 +0100 Subject: [PATCH 02/98] Fix up a test that used our $(). --- tests/Map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Map.html b/tests/Map.html index ee8b8e7fb2..1daa43a46e 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -748,7 +748,7 @@ function test_Map_double_addLayer(t) { t.plan(2); - map = new OpenLayers.Map($('map')); + map = new OpenLayers.Map('map'); layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} From 5c2c39c9dd6c53f856d6453842da9fb2f70d62fd Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Mon, 5 Mar 2012 22:27:43 +0100 Subject: [PATCH 03/98] Fix the examples that used our '$' method. --- examples/editing-methods.js | 2 ++ examples/game-accel-ball.html | 1 + examples/geolocation.js | 2 +- examples/getfeatureinfo-control.html | 2 +- examples/select-feature.html | 3 +++ examples/snap-split.html | 2 ++ examples/snapping.html | 2 ++ examples/strategy-cluster-extended.js | 2 ++ examples/strategy-cluster-threshold.html | 1 + examples/strategy-cluster.html | 2 ++ examples/tilecache.html | 2 +- examples/using-proj4js.js | 2 ++ 12 files changed, 20 insertions(+), 3 deletions(-) diff --git a/examples/editing-methods.js b/examples/editing-methods.js index 6c139a276d..9ed961eaf9 100644 --- a/examples/editing-methods.js +++ b/examples/editing-methods.js @@ -19,6 +19,8 @@ var draw = new OpenLayers.Control.DrawFeature( map.addControl(draw); draw.activate(); +$ = OpenLayers.Util.getElement; + // handle clicks on method links $("insertXY").onclick = function() { var values = parseInput( diff --git a/examples/game-accel-ball.html b/examples/game-accel-ball.html index 40bb02d791..a622768bd2 100644 --- a/examples/game-accel-ball.html +++ b/examples/game-accel-ball.html @@ -33,6 +33,7 @@ vlayer.drawFeature(feature); } function init() { + var $ = OpenLayers.Util.getElement; map = new OpenLayers.Map( 'map', { 'maxExtent': new OpenLayers.Bounds(0, 0, $("map").clientWidth, $("map").clientHeight), diff --git a/examples/geolocation.js b/examples/geolocation.js index 1afc12d997..acde5faae5 100644 --- a/examples/geolocation.js +++ b/examples/geolocation.js @@ -92,7 +92,7 @@ geolocate.events.register("locationupdated",geolocate,function(e) { geolocate.events.register("locationfailed",this,function() { OpenLayers.Console.log('Location detection failed'); }); - +var $ = OpenLayers.Util.getElement; $('locate').onclick = function() { vector.removeAllFeatures(); geolocate.deactivate(); diff --git a/examples/getfeatureinfo-control.html b/examples/getfeatureinfo-control.html index cb0bec10e4..2dcdf3c58d 100644 --- a/examples/getfeatureinfo-control.html +++ b/examples/getfeatureinfo-control.html @@ -48,7 +48,7 @@ - \ No newline at end of file + From e773ec32d137bddf99b3b3db8c7ded88cce7e7fa Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Fri, 30 Mar 2012 23:33:10 +0200 Subject: [PATCH 07/98] incorporate @ahocevar's suggestion --- lib/OpenLayers/Format/WFSDescribeFeatureType.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Format/WFSDescribeFeatureType.js b/lib/OpenLayers/Format/WFSDescribeFeatureType.js index ed50f6d696..a946da060c 100644 --- a/lib/OpenLayers/Format/WFSDescribeFeatureType.js +++ b/lib/OpenLayers/Format/WFSDescribeFeatureType.js @@ -188,11 +188,12 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class( data = data.documentElement; } var schema = {}; - this.readNode(data, schema); - if (schema.version === undefined) { + if (data.nodeName.split(":").pop() === 'ExceptionReport') { // an exception must have occurred, so parse it var parser = new OpenLayers.Format.OGCExceptionReport(); schema.error = parser.read(data); + } else { + this.readNode(data, schema); } return schema; }, From b672a58c353dba6343b4cb9fde9f9d3ed77fb148 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Fri, 13 Apr 2012 10:16:24 +0100 Subject: [PATCH 08/98] Fix Map so zoomChanged when zoom is constructor option --- lib/OpenLayers/Map.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index bde8169ede..f1bbab3892 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -662,6 +662,7 @@ OpenLayers.Map = OpenLayers.Class({ * be properly set below. */ delete this.center; + delete this.zoom; this.addLayers(options.layers); // set center (and optionally zoom) if (options.center && !this.getCenter()) { From de97975144fdfa210fdab4676151114e45a4faeb Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Wed, 25 Apr 2012 09:28:43 +0200 Subject: [PATCH 09/98] Readd the window.$ mapping in the deprecated.js file --- lib/deprecated.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/deprecated.js b/lib/deprecated.js index 0cc3c1b6aa..a389dc7b62 100644 --- a/lib/deprecated.js +++ b/lib/deprecated.js @@ -164,6 +164,17 @@ OpenLayers.Util.getArgs = function(url) { return OpenLayers.Util.getParameters(url); }; +/** + * Maintain existing definition of $. + * + * The use of our $-method is deprecated and the mapping of + * OpenLayers.Util.getElement will eventually be removed. Do not depend on + * window.$ being defined by OpenLayers. + */ +if(typeof window.$ === "undefined") { + window.$ = OpenLayers.Util.getElement; +} + /** * Namespace: OpenLayers.Ajax */ From a0d0180e031b5e496d34ae965c2ac45838844ee7 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Wed, 25 Apr 2012 09:29:52 +0200 Subject: [PATCH 10/98] Readd tests for the now deprecated window.$ --- tests/deprecated/Util.html | 20 ++++++++++++++++++++ tests/list-tests.html | 1 + 2 files changed, 21 insertions(+) create mode 100644 tests/deprecated/Util.html diff --git a/tests/deprecated/Util.html b/tests/deprecated/Util.html new file mode 100644 index 0000000000..e65340b9e1 --- /dev/null +++ b/tests/deprecated/Util.html @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/list-tests.html b/tests/list-tests.html index 283bc69eb8..14ccf78ed0 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -231,6 +231,7 @@
  • Kinetic.html
  • Util.html
  • deprecated/Ajax.html
  • +
  • deprecated/Util.html
  • deprecated/BaseTypes/Class.html
  • deprecated/BaseTypes/Element.html
  • deprecated/Control/MouseToolbar.html
  • From 9bbc1d43180d0cd94d1e2daeb8b386f7b3486b2e Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Wed, 25 Apr 2012 09:31:22 +0200 Subject: [PATCH 11/98] Update notes for 2.13 about deprecation of window.$ --- notes/2.13.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/notes/2.13.md b/notes/2.13.md index c8d0938d6c..e5a429912b 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -7,3 +7,21 @@ Previously, objects generated by the library were given id properties with value Corresponding issues/pull requests: * https://github.com/openlayers/openlayers/pull/416 + +# Behavior Changes from Past Releases + +## 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 +defined. Previous versions of OpenLayers would define '$' to be an alias for +OpenLayers.Util.getElement. If you application requires window.$ to be defined +in such a way you can either + +* include deprecated.js in your custom build or as additional ressource in your + HTML-file +* or you do the aliasing in your application code yourself: + window.$ = OpenLayers.Util.getElement; + +Corresponding issue/pull requests: + +* https://github.com/openlayers/openlayers/pull/423 \ No newline at end of file From 042ad8d7115687cc286b90985f55785d39b0072b Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Wed, 25 Apr 2012 09:37:37 +0200 Subject: [PATCH 12/98] Minors in the notes file. --- notes/2.13.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notes/2.13.md b/notes/2.13.md index e5a429912b..12fabec635 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -14,12 +14,13 @@ Corresponding issues/pull requests: We do no longer create a global variable '$' when such a symbol isn't already defined. Previous versions of OpenLayers would define '$' to be an alias for -OpenLayers.Util.getElement. If you application requires window.$ to be defined +OpenLayers.Util.getElement. If your application requires window.$ to be defined in such a way you can either * include deprecated.js in your custom build or as additional ressource in your HTML-file * or you do the aliasing in your application code yourself: + window.$ = OpenLayers.Util.getElement; Corresponding issue/pull requests: From 2624ea089ec66d7f16aef5e8a6e58e9b600c2a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 16 May 2012 21:10:08 +0200 Subject: [PATCH 13/98] set VERSION_NUMBER to 2.12-rc4 --- lib/OpenLayers.js | 2 +- lib/OpenLayers/SingleFile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index 24c7d0e8b5..b38c036bf6 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -414,4 +414,4 @@ /** * Constant: VERSION_NUMBER */ -OpenLayers.VERSION_NUMBER="Release 2.12-rc3"; +OpenLayers.VERSION_NUMBER="Release 2.12-rc4"; diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index 53060cc956..d3f7179301 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -7,7 +7,7 @@ var OpenLayers = { /** * Constant: VERSION_NUMBER */ - VERSION_NUMBER: "Release 2.12-rc3", + VERSION_NUMBER: "Release 2.12-rc4", /** * Constant: singleFile From f435a98a2aa003b33b47f21e8f410875377364ad Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Thu, 17 May 2012 16:48:43 +0100 Subject: [PATCH 14/98] Fix Google terms/poweredby/popup --- lib/OpenLayers/Layer/Google/v3.js | 44 +++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/lib/OpenLayers/Layer/Google/v3.js b/lib/OpenLayers/Layer/Google/v3.js index 57b024dd74..777f6e7d67 100644 --- a/lib/OpenLayers/Layer/Google/v3.js +++ b/lib/OpenLayers/Layer/Google/v3.js @@ -137,27 +137,31 @@ OpenLayers.Layer.Google.v3 = { var cache = OpenLayers.Layer.Google.cache[this.map.id]; var container = this.map.viewPortDiv; - // move the Map Data popup to the container, if any - while (div.lastChild.style.display == "none") { - container.appendChild(div.lastChild); - } - // move the ToS and branding stuff up to the container div - var termsOfUse = div.lastChild; - container.appendChild(termsOfUse); - termsOfUse.style.zIndex = "1100"; - termsOfUse.style.bottom = ""; - termsOfUse.className = "olLayerGoogleCopyright olLayerGoogleV3"; - termsOfUse.style.display = ""; - cache.termsOfUse = termsOfUse; - - var poweredBy = div.lastChild; - container.appendChild(poweredBy); - poweredBy.style.zIndex = "1100"; - poweredBy.style.bottom = ""; - poweredBy.className = "olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint"; - poweredBy.style.display = ""; - cache.poweredBy = poweredBy; + // depends on value of zIndex, which is not robust + for (var i=div.children.length-1; i>=0; --i) { + if (div.children[i].style.zIndex == 1000001) { + var termsOfUse = div.children[i]; + container.appendChild(termsOfUse); + termsOfUse.style.zIndex = "1100"; + termsOfUse.style.bottom = ""; + termsOfUse.className = "olLayerGoogleCopyright olLayerGoogleV3"; + termsOfUse.style.display = ""; + cache.termsOfUse = termsOfUse; + } + if (div.children[i].style.zIndex == 1000000) { + var poweredBy = div.children[i]; + container.appendChild(poweredBy); + poweredBy.style.zIndex = "1100"; + poweredBy.style.bottom = ""; + poweredBy.className = "olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint"; + poweredBy.style.display = ""; + cache.poweredBy = poweredBy; + } + if (div.children[i].style.zIndex == 10000002) { + container.appendChild(div.children[i]); + } + } this.setGMapVisibility(this.visibility); From a612302a117365284d9da43d7aaabdceb24b6119 Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 17 May 2012 11:06:21 -0600 Subject: [PATCH 15/98] Demonstrating the use of MapQuest tiles in OL. --- examples/mapquest.html | 28 ++++++++++++++++++++++++++++ examples/mapquest.js | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 examples/mapquest.html create mode 100644 examples/mapquest.js diff --git a/examples/mapquest.html b/examples/mapquest.html new file mode 100644 index 0000000000..0fc02ec9e6 --- /dev/null +++ b/examples/mapquest.html @@ -0,0 +1,28 @@ + + + + + + + OpenLayers MapQuest Demo + + + + +

    OpenLayers with MapQuest Tiles

    +
    + This example demonstrates the use of MapQuest tiles with OpenLayers. +
    +
    + MapQuest, OSM, XYZ +
    +
    +
    +

    + See the mapquest.js source for + detail on using MapQuest tiles in OpenLayers. +

    +
    + + + \ No newline at end of file diff --git a/examples/mapquest.js b/examples/mapquest.js new file mode 100644 index 0000000000..708cfdc4ad --- /dev/null +++ b/examples/mapquest.js @@ -0,0 +1,36 @@ +var map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913", + layers: [ + 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" + ], + { + attribution: "Tiles Courtesy of MapQuest ", + transitionEffect: "resize" + } + ), + 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" + ], + { + attribution: "Tiles Courtesy of MapQuest ", + transitionEffect: "resize" + } + ) + ], + center: [0, 0], + zoom: 1 +}); + +map.addControl(new OpenLayers.Control.LayerSwitcher()); \ No newline at end of file From 120cc0680daad4617d815e70ae207d988085343f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 18 May 2012 12:38:34 +0200 Subject: [PATCH 16/98] Using display:block instead of position:absolute. This fixes a regression that can be seen e.g. when using the FeatureRenderer in GeoExt, causing an incorrect alignment of the renderer. --- lib/OpenLayers/Renderer/SVG.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index ecaac9e27f..fece8890cd 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -447,7 +447,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, { */ createRenderRoot: function() { var svg = this.nodeFactory(this.container.id + "_svgRoot", "svg"); - svg.style.position = "absolute"; + svg.style.display = "block"; return svg; }, From 2bcd904df6effffb493fe4c187029076edb09f42 Mon Sep 17 00:00:00 2001 From: fredj Date: Fri, 23 Sep 2011 17:57:27 +0200 Subject: [PATCH 17/98] Remove Handler.MouseWheel mozilla workaround. This workaround was created because of a mozilla bug [1] with clientX, clientY on wheel events (DOMMouseScroll). [1] https://bugzilla.mozilla.org/show_bug.cgi?id=352179 --- lib/OpenLayers/Handler/MouseWheel.js | 40 +--------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index e75ce0a415..c35bf48864 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -21,14 +21,6 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { */ wheelListener: null, - /** - * Property: mousePosition - * {} mousePosition is necessary because - * evt.clientX/Y is buggy in Moz on wheel events, so we cache and use the - * value from the last mousemove. - */ - mousePosition: null, - /** * Property: interval * {Integer} In order to increase server performance, an interval (in @@ -208,23 +200,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { this.delta = 0; if (delta) { - // add the mouse position to the event because mozilla has - // a bug with clientX and clientY (see - // https://bugzilla.mozilla.org/show_bug.cgi?id=352179) - // getLonLatFromViewPortPx(e) returns wrong values - if (this.mousePosition) { - e.xy = this.mousePosition; - } - if (!e.xy) { - // If the mouse hasn't moved over the map yet, then - // we don't have a mouse position (in FF), so we just - // act as if the mouse was at the center of the map. - // Note that we can tell we are in the map -- and - // this.map is ensured to be true above. - e.xy = this.map.getPixelFromLonLat( - this.map.getCenter() - ); - } + e.xy = this.map.events.getMousePosition(e); if (delta < 0) { this.callback("down", [e, this.cumulative ? delta : -1]); } else { @@ -233,20 +209,6 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { } }, - /** - * Method: mousemove - * Update the stored mousePosition on every move. - * - * Parameters: - * evt - {Event} The browser event - * - * Returns: - * {Boolean} Allow event propagation - */ - mousemove: function (evt) { - this.mousePosition = evt.xy; - }, - /** * Method: activate */ From 95164d8cc0593a94ffeb10e50d1b5f2ed34d55ee Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sun, 20 May 2012 13:39:50 +0100 Subject: [PATCH 18/98] Document issues with Google v3 layers --- lib/OpenLayers/Layer/EventPane.js | 9 ++++++++- lib/OpenLayers/Layer/Google.js | 9 +++++++++ lib/OpenLayers/Layer/Google/v3.js | 30 ++++++++++++++++++++++++------ notes/2.12.md | 14 ++++++++++++++ 4 files changed, 55 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Layer/EventPane.js b/lib/OpenLayers/Layer/EventPane.js index 258f302426..8542b9d765 100644 --- a/lib/OpenLayers/Layer/EventPane.js +++ b/lib/OpenLayers/Layer/EventPane.js @@ -11,7 +11,14 @@ /** * Class: OpenLayers.Layer.EventPane - * Base class for 3rd party layers. Create a new event pane layer with the + * Base class for 3rd party layers, providing a DOM element which isolates + * the 3rd-party layer from mouse events. + * Originally used by Yahoo, Virtual Earth and Google layers, but now + * only used by Google. + * + * Automatically instantiated by the Google constructor, and not usually instantiated directly. + * + * Create a new event pane layer with the * constructor. * * Inherits from: diff --git a/lib/OpenLayers/Layer/Google.js b/lib/OpenLayers/Layer/Google.js index 075e616a56..c744b11271 100644 --- a/lib/OpenLayers/Layer/Google.js +++ b/lib/OpenLayers/Layer/Google.js @@ -14,6 +14,11 @@ /** * Class: OpenLayers.Layer.Google * + * Provides a wrapper for Google's Maps API + * Normally the Terms of Use for this API do not allow wrapping, but Google + * have provided written consent to OpenLayers for this - see email in + * http://osgeo-org.1560.n6.nabble.com/Google-Maps-API-Terms-of-Use-changes-tp4910013p4911981.html + * * Inherits from: * - * - @@ -462,6 +467,10 @@ OpenLayers.Layer.Google.cache = {}; * Constant: OpenLayers.Layer.Google.v2 * * Mixin providing functionality specific to the Google Maps API v2. + * + * This API has been deprecated by Google. + * Developers are encouraged to migrate to v3 of the API; support for this + * is provided by */ OpenLayers.Layer.Google.v2 = { diff --git a/lib/OpenLayers/Layer/Google/v3.js b/lib/OpenLayers/Layer/Google/v3.js index 777f6e7d67..8c832debab 100644 --- a/lib/OpenLayers/Layer/Google/v3.js +++ b/lib/OpenLayers/Layer/Google/v3.js @@ -11,15 +11,33 @@ /** * Constant: OpenLayers.Layer.Google.v3 * - * Mixin providing functionality specific to the Google Maps API v3 <= v3.6. - * Note that this layer configures the google.maps.map object with the - * "disableDefaultUI" option set to true. Using UI controls that the Google - * Maps API provides is not supported by the OpenLayers API. To use this layer, - * you must include the GMaps API (<= v3.6) in your html: + * Mixin providing functionality specific to the Google Maps API v3. + * + * To use this layer, you must include the GMaps v3 API in your html. + * Because OpenLayers needs to control mouse events, it isolates the GMaps mapObject + * (the DOM elements provided by Google) using the EventPane. + * However, because the Terms of Use require some of those elements, + * such as the links to Google's terms, to be clickable, these elements have + * to be moved up to OpenLayers' container div. There is however no easy way + * to identify these, and the logic (see the repositionMapElements function + * in the source) may need to be changed if Google changes them. + * Because of this, a given OpenLayers release can only guarantee support for the current 'frozen' Google release + * (see https://developers.google.com/maps/documentation/javascript/basics#Versioning + * for Google's current release cycle). + * + * For this reason, it's recommended that production code specifically loads + * the current frozen version, for example: * * (code) - * + * * (end) + * + * but that development code should use the latest 'nightly' version, so that any + * problems can be dealt with as soon as they arise, and before they affect the production, 'frozen', code. + * + * Note that this layer configures the google.maps.map object with the + * "disableDefaultUI" option set to true. Using UI controls that the Google + * Maps API provides is not supported by the OpenLayers API. */ OpenLayers.Layer.Google.v3 = { diff --git a/notes/2.12.md b/notes/2.12.md index 6a6bdb8fee..61c8b71060 100644 --- a/notes/2.12.md +++ b/notes/2.12.md @@ -219,6 +219,20 @@ Corresponding issues/pull requests: * https://github.com/openlayers/openlayers/pull/101 +## Google v3 Layer + +This release fixes a problem with the clickable elements supplied by Google. `OpenLayers.Layer.Google.v3` is now compatible with the current frozen version of Google's API (3.7) and also with the current release and nightly versions (3.8 and 3.9), but be aware that Google may change these elements in their release and nightly versions at any time, and an interim fix OpenLayers release may be needed. + +It's recommended that production servers always load the frozen version of Google's API, but it would help find potential problems if development pages used the latest nightly version. + +See the class description in the API docs for `OpenLayers.Layer.Google.v3` for more details. + +Good ideas on how to improve this unsatisfactory situation welcome! + +Corresponding issues/pull requests: + + * https://github.com/openlayers/openlayers/pull/472 + ## OSM and Bing Layers `Layer.OSM` is now defined in its own script file, namely `OpenLayers/Layer/OSM.js`. So people using `Layer.OSM` should now include `OpenLayers/Layer/OSM.js`, as opposed to `OpenLayers/Layer/XYZ.js`, in their OpenLayers builds. From 1193e17266cf352d1c44e713fe6df1853d3bd0a0 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Mon, 21 May 2012 10:06:27 +0100 Subject: [PATCH 19/98] Google v3 docs amendment --- lib/OpenLayers/Layer/EventPane.js | 3 +-- lib/OpenLayers/Layer/Google/v3.js | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Layer/EventPane.js b/lib/OpenLayers/Layer/EventPane.js index 8542b9d765..6df7312116 100644 --- a/lib/OpenLayers/Layer/EventPane.js +++ b/lib/OpenLayers/Layer/EventPane.js @@ -13,8 +13,7 @@ * Class: OpenLayers.Layer.EventPane * Base class for 3rd party layers, providing a DOM element which isolates * the 3rd-party layer from mouse events. - * Originally used by Yahoo, Virtual Earth and Google layers, but now - * only used by Google. + * Only used by Google layers. * * Automatically instantiated by the Google constructor, and not usually instantiated directly. * diff --git a/lib/OpenLayers/Layer/Google/v3.js b/lib/OpenLayers/Layer/Google/v3.js index 8c832debab..db98c8ee66 100644 --- a/lib/OpenLayers/Layer/Google/v3.js +++ b/lib/OpenLayers/Layer/Google/v3.js @@ -14,6 +14,7 @@ * Mixin providing functionality specific to the Google Maps API v3. * * To use this layer, you must include the GMaps v3 API in your html. + * * Because OpenLayers needs to control mouse events, it isolates the GMaps mapObject * (the DOM elements provided by Google) using the EventPane. * However, because the Terms of Use require some of those elements, @@ -21,9 +22,11 @@ * to be moved up to OpenLayers' container div. There is however no easy way * to identify these, and the logic (see the repositionMapElements function * in the source) may need to be changed if Google changes them. - * Because of this, a given OpenLayers release can only guarantee support for the current 'frozen' Google release - * (see https://developers.google.com/maps/documentation/javascript/basics#Versioning - * for Google's current release cycle). + * These elements are not part of the published API and can be changed at any time, + * so a given OpenLayers release can only guarantee support for the 'frozen' + * Google release at the time of the OpenLayers release. See + * https://developers.google.com/maps/documentation/javascript/basics#Versioning + * for Google's current release cycle. * * For this reason, it's recommended that production code specifically loads * the current frozen version, for example: @@ -35,6 +38,12 @@ * but that development code should use the latest 'nightly' version, so that any * problems can be dealt with as soon as they arise, and before they affect the production, 'frozen', code. * + * Note, however, that frozen versions are retired as part of Google's release + * cycle, and once this happens, you will get the next version, in the example above, 3.8 once 3.7 is retired. + * + * This version supports 3.7. + * + * * Note that this layer configures the google.maps.map object with the * "disableDefaultUI" option set to true. Using UI controls that the Google * Maps API provides is not supported by the OpenLayers API. From a997334816f8e2ca588cf9e600a8685287972ea3 Mon Sep 17 00:00:00 2001 From: Pierre GIRAUD Date: Mon, 21 May 2012 11:13:48 +0200 Subject: [PATCH 20/98] Adding support support for metaKey (Mac Cmd key) --- lib/OpenLayers/Handler.js | 15 +++++++++++---- tests/Handler.html | 16 ++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lib/OpenLayers/Handler.js b/lib/OpenLayers/Handler.js index ae4c3c0719..8efcaf866b 100644 --- a/lib/OpenLayers/Handler.js +++ b/lib/OpenLayers/Handler.js @@ -139,7 +139,8 @@ OpenLayers.Handler = OpenLayers.Class({ var keyModifiers = (evt.shiftKey ? OpenLayers.Handler.MOD_SHIFT : 0) | (evt.ctrlKey ? OpenLayers.Handler.MOD_CTRL : 0) | - (evt.altKey ? OpenLayers.Handler.MOD_ALT : 0); + (evt.altKey ? OpenLayers.Handler.MOD_ALT : 0) | + (evt.metaKey ? OpenLayers.Handler.MOD_META : 0); /* if it differs from the handler object's key mask, bail out of the event handler */ @@ -232,12 +233,12 @@ OpenLayers.Handler = OpenLayers.Class({ * to get more information about the event that the handler is * processing. * - * This allows modifier keys on the event to be checked (alt, shift, - * and ctrl cannot be checked with the keyboard handler). For a + * This allows modifier keys on the event to be checked (alt, shift, ctrl, + * and meta cannot be checked with the keyboard handler). For a * control to determine which modifier keys are associated with the * event that a handler is currently processing, it should access * (code)handler.evt.altKey || handler.evt.shiftKey || - * handler.evt.ctrlKey(end). + * handler.evt.ctrlKey || handler.evt.metaKey(end). * * Parameters: * evt - {Event} The browser event. @@ -285,4 +286,10 @@ OpenLayers.Handler.MOD_CTRL = 2; */ OpenLayers.Handler.MOD_ALT = 4; +/** + * Constant: OpenLayers.Handler.MOD_META + * If set as the , returns false if Cmd is down. + */ +OpenLayers.Handler.MOD_META = 8; + diff --git a/tests/Handler.html b/tests/Handler.html index a20ffbb657..eb266d7307 100644 --- a/tests/Handler.html +++ b/tests/Handler.html @@ -123,7 +123,7 @@ } function test_Handler_setEvent(t) { - t.plan(4); + t.plan(5); var map = new OpenLayers.Map('map'); var control = new OpenLayers.Control(); map.addControl(control); @@ -135,7 +135,8 @@ xy: new OpenLayers.Pixel(Math.random(), Math.random()), altKey: (Math.random() > 0.5), shiftKey: (Math.random() > 0.5), - ctrlKey: (Math.random() > 0.5) + ctrlKey: (Math.random() > 0.5), + metaKey: (Math.random() > 0.5) } map.events.triggerEvent("click", testEvent); t.ok(handler.evt.xy.x == testEvent.xy.x && @@ -147,6 +148,8 @@ "handler.evt.shiftKey correct"); t.eq(handler.evt.ctrlKey, testEvent.ctrlKey, "handler.evt.ctrlKey correct"); + t.eq(handler.evt.metaKey, testEvent.metaKey, + "handler.evt.metaKey correct"); } function test_Handler_destroy(t) { @@ -173,7 +176,7 @@ } function test_Handler_checkModifiers(t) { - t.plan(26); + t.plan(62); var handler = new OpenLayers.Handler({}); handler.keyMask = null; var proceed = handler.checkModifiers({}); @@ -192,7 +195,8 @@ MOD_NONE: null, MOD_SHIFT: "shiftKey", MOD_CTRL: "ctrlKey", - MOD_ALT: "altKey" + MOD_ALT: "altKey", + MOD_META: "metaKey" } var proceed, evt, value, c, k; for(c in constants) { @@ -220,8 +224,8 @@ * is OpenLayers.Handler.MOD_SHIFT, checkModifiers should return * true. */ - var constants = ["MOD_SHIFT", "MOD_CTRL", "MOD_ALT"]; - var keys = ["shiftKey", "ctrlKey", "altKey"]; + var constants = ["MOD_SHIFT", "MOD_CTRL", "MOD_ALT", "MOD_META"]; + var keys = ["shiftKey", "ctrlKey", "altKey", "metaKey"]; var proceed, evt, c1, c2, k1, k2; for(var i=0; i Date: Mon, 21 May 2012 15:08:31 +0200 Subject: [PATCH 21/98] Don't round wheel change zoom for maps with fractional zoom --- lib/OpenLayers/Control/Navigation.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index 11f1a05845..17d2bf0aaa 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -261,8 +261,11 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { * deltaZ - {Integer} */ wheelChange: function(evt, deltaZ) { + if (!this.map.fractionalZoom) { + deltaZ = Math.round(deltaZ); + } var currentZoom = this.map.getZoom(); - var newZoom = this.map.getZoom() + Math.round(deltaZ); + var newZoom = this.map.getZoom() + deltaZ; newZoom = Math.max(newZoom, 0); newZoom = Math.min(newZoom, this.map.getNumZoomLevels()); if (newZoom === currentZoom) { From 95bc51ce3d8d39d83ae3ee9fd5eadb5e5c3acf8f Mon Sep 17 00:00:00 2001 From: Gregers Gram Rygg Date: Mon, 21 May 2012 15:11:05 +0200 Subject: [PATCH 22/98] Make analog mouse wheel adjustments configurable and reduce sensitivity --- lib/OpenLayers/Handler/MouseWheel.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index e75ce0a415..0228c0b74c 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -54,6 +54,12 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * negative) */ cumulative: true, + + /** + * Property: analogWheelPrecision + * {Integer} Adjust to get analog scroll wheel to feel right + */ + analogWheelPrecision: 360, /** * Constructor: OpenLayers.Handler.MouseWheel @@ -170,7 +176,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { e = window.event; } if (e.wheelDelta) { - delta = e.wheelDelta/120; + delta = e.wheelDelta/this.analogWheelPrecision; if (window.opera && window.opera.version() < 9.2) { delta = -delta; } From 2cd979d34c5d57eca0ab55059ca5030e9d332e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 22 May 2012 10:07:18 +0200 Subject: [PATCH 23/98] use the nightly version of Google Maps API in the examples, and provide some information about Google Maps API versioning in the google-v3 example --- examples/all-overlays-google.html | 2 +- examples/google-v3-alloverlays.html | 2 +- examples/google-v3.html | 13 ++++++++++++- examples/osm-google.html | 2 +- examples/spherical-mercator.html | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/all-overlays-google.html b/examples/all-overlays-google.html index 9df8cff1d3..3b7790eea9 100644 --- a/examples/all-overlays-google.html +++ b/examples/all-overlays-google.html @@ -8,7 +8,7 @@ - + diff --git a/examples/google-v3-alloverlays.html b/examples/google-v3-alloverlays.html index d4b368b171..d940266d7a 100644 --- a/examples/google-v3-alloverlays.html +++ b/examples/google-v3-alloverlays.html @@ -8,7 +8,7 @@ - + diff --git a/examples/google-v3.html b/examples/google-v3.html index 8b4a348b9b..4365dafbf8 100644 --- a/examples/google-v3.html +++ b/examples/google-v3.html @@ -8,7 +8,7 @@ - + @@ -35,6 +35,17 @@ location, you must include the extra theme/default/google.css stylesheet.

    +

    + Note on Google Maps API versioning: + This example uses the "nightly" version of Google Maps + API. This is specified by using v=3 in the + the Google Maps API URL. Production applications should use the + "release" or "frozen" versions of Google Maps + API. See the OpenLayers.Layer.Google.v3 API + docs, and the + Versioning Section + of the Google Maps API docs, for more details. +

    diff --git a/examples/osm-google.html b/examples/osm-google.html index a09cba59dd..066dadc61e 100644 --- a/examples/osm-google.html +++ b/examples/osm-google.html @@ -8,7 +8,7 @@ - + diff --git a/examples/spherical-mercator.html b/examples/spherical-mercator.html index fc1bf681a5..b2835701d8 100644 --- a/examples/spherical-mercator.html +++ b/examples/spherical-mercator.html @@ -22,7 +22,7 @@ } - + From 57f4d42de0421a137fd2c046b7b45f7e1e8b741d Mon Sep 17 00:00:00 2001 From: Nacho Uve Date: Tue, 22 May 2012 13:36:08 +0200 Subject: [PATCH 24/98] Small spelling corrections in the documentation. --- lib/OpenLayers/Format/ArcXML.js | 2 +- lib/OpenLayers/Format/ArcXML/Features.js | 2 +- lib/OpenLayers/Format/Filter.js | 2 +- lib/OpenLayers/Format/GML.js | 2 +- lib/OpenLayers/Format/SLD.js | 2 +- lib/OpenLayers/Format/XLS.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/OpenLayers/Format/ArcXML.js b/lib/OpenLayers/Format/ArcXML.js index e0affcee03..038ed87c18 100644 --- a/lib/OpenLayers/Format/ArcXML.js +++ b/lib/OpenLayers/Format/ArcXML.js @@ -13,7 +13,7 @@ /** * Class: OpenLayers.Format.ArcXML - * Read/Wite ArcXML. Create a new instance with the + * Read/Write ArcXML. Create a new instance with the * constructor. * * Inherits from: diff --git a/lib/OpenLayers/Format/ArcXML/Features.js b/lib/OpenLayers/Format/ArcXML/Features.js index dc01a4a439..6c8945dbe2 100644 --- a/lib/OpenLayers/Format/ArcXML/Features.js +++ b/lib/OpenLayers/Format/ArcXML/Features.js @@ -9,7 +9,7 @@ /** * Class: OpenLayers.Format.ArcXML.Features - * Read/Wite ArcXML features. Create a new instance with the + * Read/Write ArcXML features. Create a new instance with the * constructor. * * Inherits from: diff --git a/lib/OpenLayers/Format/Filter.js b/lib/OpenLayers/Format/Filter.js index 664b29446c..c8dd36151d 100644 --- a/lib/OpenLayers/Format/Filter.js +++ b/lib/OpenLayers/Format/Filter.js @@ -12,7 +12,7 @@ /** * Class: OpenLayers.Format.Filter - * Read/Wite ogc:Filter. Create a new instance with the + * Read/Write ogc:Filter. Create a new instance with the * constructor. * * Inherits from: diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index eb39180947..073eae0a1c 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -16,7 +16,7 @@ /** * Class: OpenLayers.Format.GML - * Read/Wite GML. Create a new instance with the + * Read/Write GML. Create a new instance with the * constructor. Supports the GML simple features profile. * * Inherits from: diff --git a/lib/OpenLayers/Format/SLD.js b/lib/OpenLayers/Format/SLD.js index 274c5bb781..1bbce4766d 100644 --- a/lib/OpenLayers/Format/SLD.js +++ b/lib/OpenLayers/Format/SLD.js @@ -15,7 +15,7 @@ /** * Class: OpenLayers.Format.SLD - * Read/Wite SLD. Create a new instance with the + * Read/Write SLD. Create a new instance with the * constructor. * * Inherits from: diff --git a/lib/OpenLayers/Format/XLS.js b/lib/OpenLayers/Format/XLS.js index 118b26d565..d0347f8596 100644 --- a/lib/OpenLayers/Format/XLS.js +++ b/lib/OpenLayers/Format/XLS.js @@ -9,7 +9,7 @@ /** * Class: OpenLayers.Format.XLS - * Read/Wite XLS (OpenLS). Create a new instance with the + * Read/Write XLS (OpenLS). Create a new instance with the * constructor. Currently only implemented for Location Utility Services, more * specifically only for Geocoding. No support for Reverse Geocoding as yet. * From f377d0387f12b4a485a44ae411f339486f2ccc36 Mon Sep 17 00:00:00 2001 From: Gregers Gram Rygg Date: Tue, 22 May 2012 17:29:12 +0200 Subject: [PATCH 25/98] Adjusted delta in MouseWheel test --- tests/Handler/MouseWheel.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Handler/MouseWheel.html b/tests/Handler/MouseWheel.html index d41c2cd18c..1d2a6b7eb5 100644 --- a/tests/Handler/MouseWheel.html +++ b/tests/Handler/MouseWheel.html @@ -107,7 +107,7 @@ var activated = handler.activate(); - var delta = 120; + var delta = 360; if (window.opera && window.opera.version() < 9.2) delta = -delta; handler.onWheelEvent({'target':map.layers[0].div, wheelDelta: delta}); handler.onWheelEvent({'target':map.layers[0].div, wheelDelta: delta}); From 12931612eabb56ab76dd63c8c7cb5a9584bb38cc Mon Sep 17 00:00:00 2001 From: Gregers Gram Rygg Date: Tue, 22 May 2012 17:43:52 +0200 Subject: [PATCH 26/98] Don't affect digital mouse wheels (a.k.a. step-scroll) --- lib/OpenLayers/Handler/MouseWheel.js | 7 ++++++- tests/Handler/MouseWheel.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index 0228c0b74c..7cfc40cfce 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -176,7 +176,12 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { e = window.event; } if (e.wheelDelta) { - delta = e.wheelDelta/this.analogWheelPrecision; + delta = e.wheelDelta; + if (delta % 120 === 0) { + delta = delta / 120; + } else { + delta = delta / this.analogWheelPrecision; + } if (window.opera && window.opera.version() < 9.2) { delta = -delta; } diff --git a/tests/Handler/MouseWheel.html b/tests/Handler/MouseWheel.html index 1d2a6b7eb5..d41c2cd18c 100644 --- a/tests/Handler/MouseWheel.html +++ b/tests/Handler/MouseWheel.html @@ -107,7 +107,7 @@ var activated = handler.activate(); - var delta = 360; + var delta = 120; if (window.opera && window.opera.version() < 9.2) delta = -delta; handler.onWheelEvent({'target':map.layers[0].div, wheelDelta: delta}); handler.onWheelEvent({'target':map.layers[0].div, wheelDelta: delta}); From 97983db7853b7e7eb8abc44523a9764946a18a8c Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 22 May 2012 22:28:51 -0600 Subject: [PATCH 27/98] Adding dependencies where they are used. --- lib/OpenLayers/Format/WFST/v1.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/OpenLayers/Format/WFST/v1.js b/lib/OpenLayers/Format/WFST/v1.js index ee9b6145c3..7aac83b397 100644 --- a/lib/OpenLayers/Format/WFST/v1.js +++ b/lib/OpenLayers/Format/WFST/v1.js @@ -6,6 +6,8 @@ /** * @requires OpenLayers/Format/XML.js * @requires OpenLayers/Format/WFST.js + * @requires OpenLayers/Filter/Spatial.js + * @requires OpenLayers/Filter/FeatureId.js */ /** From 05162a7f9d361e175c5d52500fa04bd3fd122119 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 24 May 2012 14:00:25 +0200 Subject: [PATCH 28/98] Use map.getLonLatFromPixel instead of map.getLonLatFromViewPortPx The former is the API method. --- examples/click.html | 4 ++-- examples/marker-shadow.html | 2 +- examples/ordering.html | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/click.html b/examples/click.html index 094ff2922f..5b6a0253fa 100644 --- a/examples/click.html +++ b/examples/click.html @@ -34,7 +34,7 @@ }, trigger: function(e) { - var lonlat = map.getLonLatFromViewPortPx(e.xy); + var lonlat = map.getLonLatFromPixel(e.xy); alert("You clicked near " + lonlat.lat + " N, " + + lonlat.lon + " E"); } @@ -75,7 +75,7 @@

    This example shows the use of the click handler and - getLonLatFromViewPortPx functions to trigger events on mouse click. + getLonLatFromPixel functions to trigger events on mouse click.

    diff --git a/examples/marker-shadow.html b/examples/marker-shadow.html index 70482555de..a244653a12 100644 --- a/examples/marker-shadow.html +++ b/examples/marker-shadow.html @@ -99,7 +99,7 @@ var pixel = new OpenLayers.Pixel(center.x + x, center.y + y); - var lonLat = map.getLonLatFromViewPortPx(pixel); + var lonLat = map.getLonLatFromPixel(pixel); features.push( new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat) diff --git a/examples/ordering.html b/examples/ordering.html index f6fd1f461c..cb15d8eed5 100644 --- a/examples/ordering.html +++ b/examples/ordering.html @@ -73,7 +73,7 @@ // from bottom to top so as to quickly signal whether or not y-ordering is working. while (bottom.y > top.y) { bottom.y -= POINT_DISTANCE; - var lonLat = map.getLonLatFromViewPortPx(bottom); + var lonLat = map.getLonLatFromPixel(bottom); orderingFeatures.push( new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat) @@ -89,7 +89,7 @@ var indexFeatures = []; var useFirst = true; while (left.x <= right.x) { - var lonLat = map.getLonLatFromViewPortPx(left); + var lonLat = map.getLonLatFromPixel(left); var point = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat) ); @@ -147,8 +147,8 @@ // and succomb to y-ordering. var orderingFeatures = []; while (bottom.y > top.y && left.x < right.x) { - var bottomLonLat = map.getLonLatFromViewPortPx(bottom); - var leftLonLat = map.getLonLatFromViewPortPx(left); + var bottomLonLat = map.getLonLatFromPixel(bottom); + var leftLonLat = map.getLonLatFromPixel(left); orderingFeatures.push( new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(leftLonLat.lon, bottomLonLat.lat), From d289aa327ea17299d393fbf6d31243632ce0ebc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 24 May 2012 22:55:43 +0200 Subject: [PATCH 29/98] Grid.removeExcessTiles removes more tiles than it should, refs #481 --- lib/OpenLayers/Layer/Grid.js | 7 ++-- tests/Layer/Grid.html | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index ab83779334..b1d45eebd8 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1302,19 +1302,20 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * columns - {Integer} Maximum number of columns we want our grid to have. */ removeExcessTiles: function(rows, columns) { + var i, l; // remove extra rows while (this.grid.length > rows) { var row = this.grid.pop(); - for (var i=0, l=row.length; i columns) { - for (var i=0, l=this.grid.length; i columns) { var row = this.grid[i]; var tile = row.pop(); this.destroyTile(tile); diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index bb632d1ea5..981ccb4e83 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1523,6 +1523,70 @@ map.destroy(); } + + function test_removeExcessTiles(t) { + t.plan(15); + + /* + * Set up + */ + + var map = new OpenLayers.Map('map'); + var layer = new OpenLayers.Layer.Grid('name', '/url', + {}, {isBaseLayer: true}); + map.addLayer(layer); + + function newTile(id) { + var t = new OpenLayers.Tile(layer, + new OpenLayers.Pixel(1, 1), + new OpenLayers.Bounds(1, 1, 1, 1)); + t._id = id; + return t; + } + + layer.grid = [ + [newTile(1), newTile(2), newTile(3)], + [newTile(4), newTile(5)], + [newTile(6), newTile(7), newTile(8)] + ]; + + // create a clone to be able to test whether + // tiles have been destroyed or not + var grid = [ + layer.grid[0].slice(), + layer.grid[1].slice(), + layer.grid[2].slice() + ]; + + /* + * Test + */ + + layer.removeExcessTiles(2, 2); + + t.eq(layer.grid.length, 2, 'grid has two rows'); + t.eq(layer.grid[0].length, 2, 'row #1 has two columns'); + t.eq(layer.grid[0][0]._id, 1, 'row #1 col #1 includes expected tile'); + t.eq(layer.grid[0][1]._id, 2, 'row #1 col #2 includes expected tile'); + t.eq(layer.grid[1].length, 2, 'row #2 has two columns'); + t.eq(layer.grid[1][0]._id, 4, 'row #2 col #1 includes expected tile'); + t.eq(layer.grid[1][1]._id, 5, 'row #2 col #2 includes expected tile'); + + t.ok(grid[0][0].events != null, 'tile 0,0 not destroyed'); + t.ok(grid[0][1].events != null, 'tile 0,1 not destroyed'); + t.ok(grid[0][2].events == null, 'tile 0,2 destroyed'); + t.ok(grid[1][0].events != null, 'tile 1,0 not destroyed'); + t.ok(grid[1][1].events != null, 'tile 1,1 not destroyed'); + t.ok(grid[2][0].events == null, 'tile 2,0 destroyed'); + t.ok(grid[2][1].events == null, 'tile 2,1 destroyed'); + t.ok(grid[2][2].events == null, 'tile 2,2 destroyed'); + + /* + * Tear down + */ + + map.destroy(); + } From f7e0edca128c7246a4681a7649c0cb5e69e9c313 Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 24 May 2012 16:34:15 -0600 Subject: [PATCH 30/98] Fewer uses of rsync. --- tools/update_dev_dir.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh index 4b1016c0b5..a7f06a0d8b 100755 --- a/tools/update_dev_dir.sh +++ b/tools/update_dev_dir.sh @@ -102,11 +102,4 @@ if [ ! o$SVNREV = $OLD_SVNREV ]; then svn up /osgeo/openlayers/repos/old_svn_repo/ # Record the revision echo -n $SVNREV > /tmp/ol_svn_rev - - # update the hosted sandboxes - rsync -r --delete --exclude=.svn --delete-excluded /osgeo/openlayers/repos/old_svn_repo/sandbox /osgeo/openlayers/sites/dev.openlayers.org/ - - # update the hosted addins - rsync -r --delete --exclude=.svn --delete-excluded /osgeo/openlayers/repos/old_svn_repo/addins /osgeo/openlayers/sites/dev.openlayers.org/ - fi From f5e49fa82ee29af0f683b9f39fa6a3fb9177c643 Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 24 May 2012 16:40:56 -0600 Subject: [PATCH 31/98] One fewer use of rsync. --- tools/update_dev_dir.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh index a7f06a0d8b..824a1fda5b 100755 --- a/tools/update_dev_dir.sh +++ b/tools/update_dev_dir.sh @@ -81,12 +81,10 @@ if [ ! o$REMOTE_HEAD = o$OLD_REMOTE_HEAD ]; then git clean -f git pull origin master - mkdir -p /tmp/ol/docs/build/html /tmp/ol/docs/build/doctrees - sphinx-build -b html -d /tmp/ol/docs/build/doctrees . /tmp/ol/docs/build/html + mkdir -p /osgeo/openlayers/sites/docs.openlayers.org /tmp/ol/docs/build/doctrees + sphinx-build -b html -d /tmp/ol/docs/build/doctrees . /osgeo/openlayers/sites/docs.openlayers.org - rsync -r --delete /tmp/ol/docs/build/html/ /osgeo/openlayers/sites/docs.openlayers.org - -fi +fi ## UPDATES FROM THE OLD SVN REPO From 11084334653f1520c62aafc8cfe5896f133e929f Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 24 May 2012 16:42:54 -0600 Subject: [PATCH 32/98] Clarifying names. --- tools/update_dev_dir.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh index 824a1fda5b..5bca2e69f2 100755 --- a/tools/update_dev_dir.sh +++ b/tools/update_dev_dir.sh @@ -3,10 +3,10 @@ # check to see if the hosted examples or API docs need an update cd /osgeo/openlayers/repos/openlayers REMOTE_HEAD=`git ls-remote https://github.com/openlayers/openlayers/ | grep HEAD | awk '{print $1}'` -OLD_REMOTE_HEAD=`git rev-parse HEAD` +LOCAL_HEAD=`git rev-parse HEAD` # if there's something different in the remote, update and build -if [ ! o$REMOTE_HEAD = o$OLD_REMOTE_HEAD ]; then +if [ ! o$REMOTE_HEAD = o$LOCAL_HEAD ]; then git checkout master git clean -f @@ -54,10 +54,10 @@ fi # check to see if the website needs an update cd /osgeo/openlayers/repos/website REMOTE_HEAD=`git ls-remote https://github.com/openlayers/website/ | grep HEAD | awk '{print $1}'` -OLD_REMOTE_HEAD=`git rev-parse HEAD` +LOCAL_HEAD=`git rev-parse HEAD` # if there's something different in the remote, update the clone -if [ ! o$REMOTE_HEAD = o$OLD_REMOTE_HEAD ]; then +if [ ! o$REMOTE_HEAD = o$LOCAL_HEAD ]; then git checkout master git clean -f @@ -72,10 +72,10 @@ fi # check to see if prose docs need an update cd /osgeo/openlayers/repos/docs REMOTE_HEAD=`git ls-remote https://github.com/openlayers/docs/ | grep HEAD | awk '{print $1}'` -OLD_REMOTE_HEAD=`git rev-parse HEAD` +LOCAL_HEAD=`git rev-parse HEAD` # if there's something different in the remote, update the clone -if [ ! o$REMOTE_HEAD = o$OLD_REMOTE_HEAD ]; then +if [ ! o$REMOTE_HEAD = o$LOCAL_HEAD ]; then git checkout master git clean -f From 5879a71f9ca29b88cc963826e747faaf869fccb3 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 25 May 2012 13:31:43 +0200 Subject: [PATCH 33/98] Don't use fade effect on labels. --- examples/mobile-wmts-vienna.css | 2 +- examples/mobile-wmts-vienna.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index 741cd6d37b..b728003a31 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -9,7 +9,7 @@ html, body, #map { #title, #tags, #shortdesc { display: none; } -.olTileImage { +.olLayerGrid .olTileImage { -webkit-transition: opacity 0.2s linear; -moz-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear; diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index 4257f7429b..8c118d6f6e 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -164,7 +164,7 @@ var map; )); labels = format.createLayer(caps, OpenLayers.Util.applyDefaults( {layer:"beschriftung", requestEncoding:"REST", isBaseLayer: false}, - defaults + OpenLayers.Util.extend({className: "nofade"}, defaults) )); map.addLayers([fmzk, aerial, labels]); zoomToInitialExtent(); @@ -202,7 +202,8 @@ var map; layer: "beschriftung", style: "normal", transitionEffect: null, - isBaseLayer: false + isBaseLayer: false, + className: "nofade" }, defaults)); map.addLayers([fmzk, aerial, labels]); From df44a79e1b0c47d2310433a1b9a4217fc9c03693 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 25 May 2012 14:54:06 +0200 Subject: [PATCH 34/98] URL switching for all REST encoded WMTS layers. --- lib/OpenLayers/Layer/WMTS.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Layer/WMTS.js b/lib/OpenLayers/Layer/WMTS.js index bf4cc5a38f..ad3822db63 100644 --- a/lib/OpenLayers/Layer/WMTS.js +++ b/lib/OpenLayers/Layer/WMTS.js @@ -417,10 +417,19 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { var matrixId = this.matrix.identifier; var dimensions = this.dimensions, params; + if (OpenLayers.Util.isArray(this.url)) { + url = this.selectUrl([ + this.version, this.style, this.matrixSet, + this.matrix.identifier, info.row, info.col + ].join(","), this.url); + } else { + url = this.url; + } + if (this.requestEncoding.toUpperCase() === "REST") { params = this.params; - if (typeof this.url === "string" && this.url.indexOf("{") !== -1) { - var template = this.url.replace(/\{/g, "${"); + if (url.indexOf("{") !== -1) { + var template = url.replace(/\{/g, "${"); var context = { // spec does not make clear if capital S or not style: this.style, Style: this.style, @@ -454,11 +463,6 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { path = path + this.matrixSet + "/" + this.matrix.identifier + "/" + info.row + "/" + info.col + "." + this.formatSuffix; - if (OpenLayers.Util.isArray(this.url)) { - url = this.selectUrl(path, this.url); - } else { - url = this.url; - } if (!url.match(/\/$/)) { url = url + "/"; } From f5c43d6506127ca80e8f860631527a3cad0df599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 25 May 2012 14:55:14 +0200 Subject: [PATCH 35/98] set VERSION_NUMBER to Release 2.12-rc5 --- lib/OpenLayers.js | 2 +- lib/OpenLayers/SingleFile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index b38c036bf6..d00fc976cb 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -414,4 +414,4 @@ /** * Constant: VERSION_NUMBER */ -OpenLayers.VERSION_NUMBER="Release 2.12-rc4"; +OpenLayers.VERSION_NUMBER="Release 2.12-rc5"; diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index d3f7179301..53fa0ceb8d 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -7,7 +7,7 @@ var OpenLayers = { /** * Constant: VERSION_NUMBER */ - VERSION_NUMBER: "Release 2.12-rc4", + VERSION_NUMBER: "Release 2.12-rc5", /** * Constant: singleFile From 440b9fb6d32002a113308fa123826d5cc8e817fc Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 25 May 2012 17:29:21 +0200 Subject: [PATCH 36/98] Using updated URLs. --- examples/mobile-wmts-vienna.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index 8c118d6f6e..ede3e67b53 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -184,21 +184,21 @@ var map; attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' }; fmzk = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://www.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", layer: "fmzk", style: "pastell", transitionEffect: "resize" }, defaults)); aerial = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://www.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", layer: "lb", style: "farbe", transitionEffect: "resize" }, defaults)); labels = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ - url: "http://www.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", layer: "beschriftung", style: "normal", transitionEffect: null, From 88fd8038c8dc5c41ddcfe6ceeb32d350bbd0f541 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 25 May 2012 18:37:12 +0200 Subject: [PATCH 37/98] Simplifying configuration. --- examples/mobile-wmts-vienna.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index ede3e67b53..91d3a7105d 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -163,8 +163,8 @@ var map; {layer:"lb", requestEncoding:"REST", transitionEffect:"resize"}, defaults )); labels = format.createLayer(caps, OpenLayers.Util.applyDefaults( - {layer:"beschriftung", requestEncoding:"REST", isBaseLayer: false}, - OpenLayers.Util.extend({className: "nofade"}, defaults) + {layer:"beschriftung", requestEncoding:"REST", className:"nofade", isBaseLayer: false}, + defaults )); map.addLayers([fmzk, aerial, labels]); zoomToInitialExtent(); From ff1f99a03f766258780139f988ef9e4e18c1d37b Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 25 May 2012 18:47:57 +0200 Subject: [PATCH 38/98] Don't reuse tile images unless we have a new url to load. Without this change, some browsers don't cache the images. See #454 for a discussion about this issue. --- lib/OpenLayers/Tile/Image.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 50c2548202..abfdf24f39 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -339,9 +339,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { */ setImgSrc: function(url) { var img = this.imgDiv; - img.style.visibility = 'hidden'; - img.style.opacity = 0; if (url) { + img.style.visibility = 'hidden'; + img.style.opacity = 0; // don't set crossOrigin if the url is a data URL if (this.crossOriginKeyword) { if (url.substr(0, 5) !== 'data:') { @@ -351,6 +351,13 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { } } img.src = url; + } else { + // Remove reference to the image, and leave it to the browser's + // caching and garbage collection. + this.imgDiv = null; + if (img.parentNode) { + img.parentNode.removeChild(img); + } } }, From 9a7b4bd06e60a0675171ee1b75cb5d3cbf9ac1cf Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sat, 26 May 2012 16:30:10 +0100 Subject: [PATCH 39/98] Format/KML: correct parseStyles docs --- lib/OpenLayers/Format/KML.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index 8553fd1910..b90fd20740 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -311,8 +311,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: parseStyles - * Looks for From 976554fc825b3b56f2d0d79b05b29a9794cb4a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 30 May 2012 09:00:42 +0200 Subject: [PATCH 64/98] make SelectControl.unselectAll safer, use @ahocevar's implementation --- lib/OpenLayers/Control/SelectFeature.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Control/SelectFeature.js b/lib/OpenLayers/Control/SelectFeature.js index 9d2064bfd7..198cef9b1b 100644 --- a/lib/OpenLayers/Control/SelectFeature.js +++ b/lib/OpenLayers/Control/SelectFeature.js @@ -300,18 +300,17 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, { */ unselectAll: function(options) { // we'll want an option to supress notification here - var layers = this.layers || [this.layer]; - var layer, feature; - for(var l=0; l=0; --i) { - feature = layer.selectedFeatures[i]; - // feature can be undefined here if an unselectfeature - // listeners has unselected or removed other features - if(feature) { - if(!options || options.except != feature) { - this.unselect(feature); - } + numExcept = 0; + while(layer.selectedFeatures.length > numExcept) { + feature = layer.selectedFeatures[numExcept]; + if(!options || options.except != feature) { + this.unselect(feature); + } else { + ++numExcept; } } } From e3d1d3ea625e380c895090766c6745610b94e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 30 May 2012 09:01:15 +0200 Subject: [PATCH 65/98] more tests for SelectControl.unselectAll --- tests/Control/SelectFeature.html | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/Control/SelectFeature.html b/tests/Control/SelectFeature.html index fbf47989f4..150ab07c5c 100644 --- a/tests/Control/SelectFeature.html +++ b/tests/Control/SelectFeature.html @@ -560,31 +560,43 @@ } function test_unselectAll(t) { - t.plan(1); + t.plan(2); var layer = new OpenLayers.Layer.Vector(); var control = new OpenLayers.Control.SelectFeature(layer); var feature1 = new OpenLayers.Feature.Vector(); + feature1.id = 1; var feature2 = new OpenLayers.Feature.Vector(); + feature2.id = 2; var feature3 = new OpenLayers.Feature.Vector(); + feature3.id = 3; + var feature4 = new OpenLayers.Feature.Vector(); + feature4.id = 4; - layer.addFeatures([feature1, feature2, feature3]); + layer.addFeatures([feature1, feature2, feature3, feature4]); control.select(feature1); control.select(feature2); control.select(feature3); + control.select(feature4); layer.events.on({ featureunselected: function(e) { - layer.removeFeatures([feature2]); + // we change the selectedFeatures array while + // unselectAll is iterating over that array. + if(feature2.layer) { + layer.removeFeatures([feature2]); + } } }); - control.unselectAll(); - t.eq(layer.selectedFeatures.length, 0, - 'unselectAll unselects all features'); + control.unselectAll({except: feature3}); + t.eq(layer.selectedFeatures.length, 1, + 'unselectAll unselected all but one'); + t.eq(layer.selectedFeatures[0].id, 3, + 'the remaining selected features is the one expected'); } From a29009be91dcb44c5423aa80695f6197707eb48a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 2 Jun 2012 01:43:31 +0200 Subject: [PATCH 66/98] Revert "URL switching for all REST encoded WMTS layers." This was accidentally committed to master. This reverts commit df44a79e1b0c47d2310433a1b9a4217fc9c03693. --- lib/OpenLayers/Layer/WMTS.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Layer/WMTS.js b/lib/OpenLayers/Layer/WMTS.js index ad3822db63..bf4cc5a38f 100644 --- a/lib/OpenLayers/Layer/WMTS.js +++ b/lib/OpenLayers/Layer/WMTS.js @@ -417,19 +417,10 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { var matrixId = this.matrix.identifier; var dimensions = this.dimensions, params; - if (OpenLayers.Util.isArray(this.url)) { - url = this.selectUrl([ - this.version, this.style, this.matrixSet, - this.matrix.identifier, info.row, info.col - ].join(","), this.url); - } else { - url = this.url; - } - if (this.requestEncoding.toUpperCase() === "REST") { params = this.params; - if (url.indexOf("{") !== -1) { - var template = url.replace(/\{/g, "${"); + if (typeof this.url === "string" && this.url.indexOf("{") !== -1) { + var template = this.url.replace(/\{/g, "${"); var context = { // spec does not make clear if capital S or not style: this.style, Style: this.style, @@ -463,6 +454,11 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { path = path + this.matrixSet + "/" + this.matrix.identifier + "/" + info.row + "/" + info.col + "." + this.formatSuffix; + if (OpenLayers.Util.isArray(this.url)) { + url = this.selectUrl(path, this.url); + } else { + url = this.url; + } if (!url.match(/\/$/)) { url = url + "/"; } From df64798bbb49c46b6f466846efb5b5149d0aa92e Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 2 Jun 2012 14:41:44 +0200 Subject: [PATCH 67/98] Updating tests after #487. --- tests/Tile/Image.html | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/Tile/Image.html b/tests/Tile/Image.html index dbe79a7d4b..ecb37a93a3 100644 --- a/tests/Tile/Image.html +++ b/tests/Tile/Image.html @@ -114,7 +114,7 @@ } function test_Tile_Image_draw (t) { - t.plan(8); + t.plan(7); var map = new OpenLayers.Map('map'); @@ -139,16 +139,10 @@ //this should trigger a "loadstart" event tile.draw(); - var img = tile.imgDiv; - if (!isMozilla) t.ok( true, "skipping element test outside of Mozilla"); else t.ok( tile.imgDiv instanceof HTMLElement, "tile.draw creates an image"); - if (!isMozilla) - t.ok( true, "skipping element test outside of Mozilla"); - else - t.ok( img instanceof HTMLImageElement, "tile.draw creates an image"); var tParams = { SERVICE: "WMS", VERSION: "1.1.1", REQUEST: "GetMap", STYLES: "", @@ -159,7 +153,7 @@ var expected = new Image(); expected.src = "../../img/blank.gif?" + OpenLayers.Util.getParameterString(tParams) t.delay_call(0.1, function() { - t.eq( img.src, expected.src, "tile.draw creates an image"); + t.eq( tile.imgDiv.src, expected.src, "tile.draw creates an image"); }); t.eq( tile.imgDiv.style.width, "5%", "Image width is correct" ); t.eq( tile.imgDiv.style.height, "6%", "Image height is correct" ); @@ -266,14 +260,14 @@ tile = new OpenLayers.Tile.Image(layer, position, new OpenLayers.Bounds(-90,-85,-90,85), url, size); tile.draw(); tile.moveTo(new OpenLayers.Bounds(-185,-90,-180,-80), new OpenLayers.Pixel(-180,-85), true); - t.delay_call( 1, function() { t.eq(tile.imgDiv.style.visibility, "hidden", "Tile image is invisible.") } ); + t.delay_call( 1, function() { t.ok(!tile.imgDiv, "Reference to tile image removed.") } ); var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "../../img/blank.gif", {layers: 'basic'}, {'alpha':true}); map.addLayer(layer); tile = new OpenLayers.Tile.Image(layer, position, new OpenLayers.Bounds(-90,-85,-90,85), url, size); tile.draw(); tile.moveTo(new OpenLayers.Bounds(-185,-90,-180,-80), new OpenLayers.Pixel(-180,-85), true) - t.delay_call( 1, function() { t.eq(tile.imgDiv.style.visibility, "hidden", "Alpha tile image is invisible.") } ); + t.delay_call( 1, function() { t.ok(!tile.imgDiv, "Reference to alpha tile image removed.") } ); } From 8b2bab9d515c4a041ed92a6127cd26a7a1670d4d Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 2 Jun 2012 22:18:49 +0200 Subject: [PATCH 68/98] Improvements for Android: no buggy tile transitions, no flicker when tapping. --- examples/mobile-wmts-vienna.css | 3 +++ examples/mobile-wmts-vienna.js | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index b728003a31..ac3d1cb5e6 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -5,6 +5,9 @@ html, body, #map { } #map { cursor: move; + background-color: #CCCCCC; + /* no highlighting of the map area when tapping the map on touch devices */ + -webkit-tap-highlight-color: transparent; } #title, #tags, #shortdesc { display: none; diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index 91d3a7105d..04cd9b4148 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -130,6 +130,17 @@ var map; // Vector layer for the location cross and circle var vector = new OpenLayers.Layer.Vector("Vector Layer"); + // Defaults for the WMTS layers + var defaults = { + requestEncoding: "REST", + matrixSet: "google3857", + attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' + }; + // No fade transitions on Android 4, because they are buggy + if (/Android 4\.0.*Safari\/.*/.test(navigator.userAgent)) { + defaults.className = "nofade"; + } + // The WMTS layers we're going to add var fmzk, aerial, labels; @@ -149,11 +160,6 @@ var map; url: "http://maps.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml", success: function(request) { var format = new OpenLayers.Format.WMTSCapabilities(); - var defaults = { - requestEncoding: "REST", - matrixSet: "google3857", - attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' - }; var doc = request.responseText, caps = format.read(doc); fmzk = format.createLayer(caps, OpenLayers.Util.applyDefaults( @@ -177,12 +183,7 @@ var map; // and create layers" block above. /* var extent = new OpenLayers.Bounds(1799448.394855, 6124949.74777, 1848250.442089, 6162571.828177); - var defaults = { - requestEncoding: "REST", - matrixSet: "google3857", - tileFullExtent: extent, - attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' - }; + 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", layer: "fmzk", From 54a51904e956696016c8604c3bc2be8ef45be306 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sun, 3 Jun 2012 16:54:20 +0200 Subject: [PATCH 69/98] Adjustment on "Util.getRenderedDimensions" when "containerElement" is absolutely positioned. --- lib/OpenLayers/Util.js | 57 +++++++++++++++++---------- tests/manual/rendered-dimensions.html | 54 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 20 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 491448c9c9..8e326a3b30 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1526,6 +1526,33 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { var containerElement = (options && options.containerElement) ? options.containerElement : document.body; + + // Opera and IE7 can't handle a node with position:aboslute if it inherits + // position:absolute from a parent. + var parentHasPositionAbsolute = false; + var superContainer = null; + var parent = containerElement; + while (parent && parent.tagName.toLowerCase()!="body") { + var parentPosition = OpenLayers.Element.getStyle(parent, "position"); + if(parentPosition == "absolute") { + parentHasPositionAbsolute = true; + break; + } else if (parentPosition && parentPosition != "static") { + break; + } + parent = parent.parentNode; + } + if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 || + containerElement.clientWidth === 0) ){ + superContainer = document.createElement("div"); + superContainer.style.visibility = "hidden"; + superContainer.style.position = "absolute"; + superContainer.style.overflow = "visible"; + superContainer.style.width = document.body.clientWidth + "px"; + superContainer.style.height = document.body.clientHeight + "px"; + superContainer.appendChild(container); + } + container.style.position = "absolute"; //fix a dimension, if specified. if (size) { @@ -1560,25 +1587,10 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { container.appendChild(content); // append container to body for rendering - containerElement.appendChild(container); - - // Opera and IE7 can't handle a node with position:aboslute if it inherits - // position:absolute from a parent. - var parentHasPositionAbsolute = false; - var parent = container.parentNode; - while (parent && parent.tagName.toLowerCase()!="body") { - var parentPosition = OpenLayers.Element.getStyle(parent, "position"); - if(parentPosition == "absolute") { - parentHasPositionAbsolute = true; - break; - } else if (parentPosition && parentPosition != "static") { - break; - } - parent = parent.parentNode; - } - - if(!parentHasPositionAbsolute) { - container.style.position = "absolute"; + if (superContainer) { + containerElement.appendChild(superContainer); + } else { + containerElement.appendChild(container); } // calculate scroll width of content and add corners and shadow width @@ -1595,7 +1607,12 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { // remove elements container.removeChild(content); - containerElement.removeChild(container); + if (superContainer) { + superContainer.removeChild(container); + containerElement.removeChild(superContainer); + } else { + containerElement.removeChild(container); + } return new OpenLayers.Size(w, h); }; diff --git a/tests/manual/rendered-dimensions.html b/tests/manual/rendered-dimensions.html index 41b0fcf4d4..72f0eecc1d 100644 --- a/tests/manual/rendered-dimensions.html +++ b/tests/manual/rendered-dimensions.html @@ -39,10 +39,64 @@ function run() { else { out.innerHTML += "
    height Fail: " + size + ", " + height; } + + // To use the same syntax as in "\tests" + t = {eq: function(a, b, msg) { + if (a == b) { + out.innerHTML += "
    ok " + msg; + } + else { + out.innerHTML += "
    Fail (" + a + " not eq " + b + "): " + msg + ""; + } + } + } + var text = (new Array(10)).join("foo foo foo
    "), + content = "
    " + text + "
    "; + 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.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"); }
    +
    +
    From b7e2222d463fea1c1b237479974ab1c7409065a8 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sun, 3 Jun 2012 22:45:28 +0200 Subject: [PATCH 70/98] missing semicolons on tests --- tests/manual/rendered-dimensions.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/manual/rendered-dimensions.html b/tests/manual/rendered-dimensions.html index 72f0eecc1d..36ab370905 100644 --- a/tests/manual/rendered-dimensions.html +++ b/tests/manual/rendered-dimensions.html @@ -49,7 +49,7 @@ function run() { out.innerHTML += "
    Fail (" + a + " not eq " + b + "): " + msg + ""; } } - } + }; var text = (new Array(10)).join("foo foo foo
    "), content = "
    " + text + "
    "; var testName, @@ -59,7 +59,7 @@ function run() { testName = "Absolute with w&h: "; var optionAbsDiv ={ containerElement: document.getElementById("absoluteDiv") - } + }; finalSize = OpenLayers.Util.getRenderedDimensions(content, null, optionAbsDiv); t.eq(finalSize.w, initialSize.w, testName + "initial width " + initialSize.w + "px is maintained"); @@ -77,7 +77,7 @@ function run() { 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"); From 2b9ea5007b8fcc209421ffdfd5bc1564e2bdec47 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sun, 3 Jun 2012 23:54:11 +0200 Subject: [PATCH 71/98] Use "superContainer" to operate well in Android, . --- lib/OpenLayers/Util.js | 3 +-- tests/manual/rendered-dimensions.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 8e326a3b30..e88ce435e2 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1542,8 +1542,7 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { } parent = parent.parentNode; } - if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 || - containerElement.clientWidth === 0) ){ + if(parentHasPositionAbsolute){ superContainer = document.createElement("div"); superContainer.style.visibility = "hidden"; superContainer.style.position = "absolute"; diff --git a/tests/manual/rendered-dimensions.html b/tests/manual/rendered-dimensions.html index 36ab370905..71025afef8 100644 --- a/tests/manual/rendered-dimensions.html +++ b/tests/manual/rendered-dimensions.html @@ -41,7 +41,7 @@ function run() { } // To use the same syntax as in "\tests" - t = {eq: function(a, b, msg) { + var t = {eq: function(a, b, msg) { if (a == b) { out.innerHTML += "
    ok " + msg; } From 4f3252bfe851082bb2547643a1ea32d3c51b15a2 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Mon, 4 Jun 2012 18:49:43 +0200 Subject: [PATCH 72/98] Revert "Use "superContainer" to operate well in Android, ." This reverts commit 2b9ea5007b8fcc209421ffdfd5bc1564e2bdec47. --- lib/OpenLayers/Util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index e88ce435e2..8e326a3b30 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1542,7 +1542,8 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { } parent = parent.parentNode; } - if(parentHasPositionAbsolute){ + if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 || + containerElement.clientWidth === 0) ){ superContainer = document.createElement("div"); superContainer.style.visibility = "hidden"; superContainer.style.position = "absolute"; From acb489ad79e0e100a69c77b97579bee469526299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 4 Jun 2012 22:02:36 +0200 Subject: [PATCH 73/98] set VERSION_NUMBER to 2.12-rc6 --- lib/OpenLayers.js | 2 +- lib/OpenLayers/SingleFile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index d00fc976cb..e2922161e7 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -414,4 +414,4 @@ /** * Constant: VERSION_NUMBER */ -OpenLayers.VERSION_NUMBER="Release 2.12-rc5"; +OpenLayers.VERSION_NUMBER="Release 2.12-rc6"; diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index 53fa0ceb8d..797fc34394 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -7,7 +7,7 @@ var OpenLayers = { /** * Constant: VERSION_NUMBER */ - VERSION_NUMBER: "Release 2.12-rc5", + VERSION_NUMBER: "Release 2.12-rc6", /** * Constant: singleFile From cbba98279b86e1a05a122f4ab1aeb6d5cc670cea Mon Sep 17 00:00:00 2001 From: Andrew Vardeman Date: Mon, 4 Jun 2012 15:47:43 -0500 Subject: [PATCH 74/98] unsubscribe from events on the proper layer --- lib/OpenLayers/Control/Split.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Control/Split.js b/lib/OpenLayers/Control/Split.js index c382eae3a9..3cc790d182 100644 --- a/lib/OpenLayers/Control/Split.js +++ b/lib/OpenLayers/Control/Split.js @@ -240,7 +240,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { var deactivated = OpenLayers.Control.prototype.deactivate.call(this); if(deactivated) { if(this.source && this.source.events) { - this.layer.events.un({ + this.source.events.un({ sketchcomplete: this.onSketchComplete, afterfeaturemodified: this.afterFeatureModified, scope: this From f64912c09d08d3aae3ce319e3c17ff4e35cfe7c4 Mon Sep 17 00:00:00 2001 From: Andrew Vardeman Date: Mon, 4 Jun 2012 17:25:54 -0500 Subject: [PATCH 75/98] use two different layers for Split tool's layer and the source layer so as to properly check for event unregistration --- tests/Control/Split.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/Control/Split.html b/tests/Control/Split.html index 86af76c56d..e3a6eacecf 100644 --- a/tests/Control/Split.html +++ b/tests/Control/Split.html @@ -104,13 +104,18 @@ t.plan(7); - var layer = new OpenLayers.Layer.Vector("foo", { + var layer1 = new OpenLayers.Layer.Vector("foo", { maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10), isBaseLayer: true }); - var control = new OpenLayers.Control.Split({layer: layer}); + var layer2 = new OpenLayers.Layer.Vector("bar", { + maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10), + isBaseLayer: false + }); + var control = new OpenLayers.Control.Split({layer: layer1}); var map = new OpenLayers.Map("map"); - map.addLayer(layer); + map.addLayer(layer1); + map.addLayer(layer2); map.zoomToMaxExtent(); map.addControl(control); @@ -124,17 +129,17 @@ t.eq(control.handler.active, false, "sketch handler deactivated"); // set a source layer - control.setSource(layer); + control.setSource(layer2); // activate and check that listeners are registered control.activate(); - t.ok(layer.events.listeners.sketchcomplete, "sketchcomplete listener registered"); - t.ok(layer.events.listeners.afterfeaturemodified, "afterfeaturemodified listener registered"); + t.ok(layer2.events.listeners.sketchcomplete, "sketchcomplete listener registered"); + t.ok(layer2.events.listeners.afterfeaturemodified, "afterfeaturemodified listener registered"); // deactivate and confirm no draw related events control.deactivate(); - t.eq(layer.events.listeners.sketchcomplete.length, 0, "no sketchcomplete listeners"); - t.eq(layer.events.listeners.afterfeaturemodified.length, 0, "no afterfeaturemodified listeners"); + t.eq(layer2.events.listeners.sketchcomplete.length, 0, "no sketchcomplete listeners"); + t.eq(layer2.events.listeners.afterfeaturemodified.length, 0, "no afterfeaturemodified listeners"); map.destroy(); } From 052be822882ef527dedb82d7d3cc19adc76d6371 Mon Sep 17 00:00:00 2001 From: Antoine Abt Date: Wed, 6 Jun 2012 12:17:24 +0300 Subject: [PATCH 76/98] Doc fixes for Event.triggerEvent - no functional change. --- lib/OpenLayers/Events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index fb4cde8aef..ddf375444a 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -822,7 +822,7 @@ OpenLayers.Events = OpenLayers.Class({ * * Parameters: * type - {String} - * evt - {Event} + * evt - {Event || Object} will be passed to the listeners. * * Returns: * {Boolean} The last listener return. If a listener returns false, the From 788d5a645ac6198380144683ad8fb98f610fb7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 7 Jun 2012 09:21:44 +0200 Subject: [PATCH 77/98] move the style.mobile.css file from examples to theme/default --- examples/mobile-drawing.html | 2 +- examples/mobile-jq.html | 2 +- examples/mobile-layers.html | 2 +- examples/mobile-navigation.html | 2 +- examples/mobile-sencha.html | 2 +- examples/mobile.html | 2 +- notes/2.12.md | 10 ++++++++++ {examples => theme/default}/style.mobile.css | 0 8 files changed, 16 insertions(+), 6 deletions(-) rename {examples => theme/default}/style.mobile.css (100%) diff --git a/examples/mobile-drawing.html b/examples/mobile-drawing.html index 6a91152b89..0cb9c529f1 100644 --- a/examples/mobile-drawing.html +++ b/examples/mobile-drawing.html @@ -5,7 +5,7 @@ - + diff --git a/examples/mobile-jq.html b/examples/mobile-jq.html index 470fd39d5d..5e16caaa68 100644 --- a/examples/mobile-jq.html +++ b/examples/mobile-jq.html @@ -8,7 +8,7 @@ - + diff --git a/examples/mobile-layers.html b/examples/mobile-layers.html index dcb27645f9..d25867477a 100644 --- a/examples/mobile-layers.html +++ b/examples/mobile-layers.html @@ -5,7 +5,7 @@ - +