diff --git a/examples/wmc.html b/examples/wmc.html index 95ebaf720e..bda570f8e2 100644 --- a/examples/wmc.html +++ b/examples/wmc.html @@ -124,24 +124,24 @@ -

WMC Example

+

WMC Example

-
-
-

- Shows parsing of Web Map Context documents. -

-
+ + +

+ Shows parsing of Web Map Context documents. + + -

+ This is an example of parsing WMC documents.
The format class has a layerOptions property, which can be used to control the default options of the layer when it is created by the parser. -
+ diff --git a/examples/wms.html b/examples/wms.html index 0a6f95836d..c4c4ebc269 100644 --- a/examples/wms.html +++ b/examples/wms.html @@ -27,20 +27,20 @@ -

WMS Example

+

WMS Example

-
-
-

- Shows the basic use of openlayers using a WMS layer -

+
+
+

+ Shows the basic use of openlayers using a WMS layer +

-
+
-
- This is an example of how to add an WMS layer to the OpenLayers window. The images are tiled in this instance if you wanted to not use a tiled WMS - please use this example and pass the option ‘singleTile’ as true. -
+
+ This is an example of how to add an WMS layer to the OpenLayers window. The images are tiled in this instance if you wanted to not use a tiled WMS + please use this example and pass the option ‘singleTile’ as true. +
diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js index 191d510160..8c044a302b 100644 --- a/lib/OpenLayers/Ajax.js +++ b/lib/OpenLayers/Ajax.js @@ -429,7 +429,7 @@ OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, { */ getStatus: function() { try { - return this.transport.status || 0; + return this.transport.status || 0; } catch (e) { return 0; } diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index fbcd7e6524..e78c6fb943 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -147,9 +147,9 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { node = this.drawGeometryNode(node, geometry); // append the node to root (but only if it's new) - if (node.parentNode != this.root) { - this.root.appendChild(node); - } + if (node.parentNode != this.root) { + this.root.appendChild(node); + } this.postDraw(node); } else { node = OpenLayers.Util.getElement(geometry.id); diff --git a/lib/OpenLayers/Tween.js b/lib/OpenLayers/Tween.js index fca8cbb981..51268ec5e7 100644 --- a/lib/OpenLayers/Tween.js +++ b/lib/OpenLayers/Tween.js @@ -311,7 +311,7 @@ OpenLayers.Easing.Quad = { */ easeInOut: function(t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; - return -c/2 * ((--t)*(t-2) - 1) + b; + return -c/2 * ((--t)*(t-2) - 1) + b; }, CLASS_NAME: "OpenLayers.Easing.Quad" diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index b38e45e700..e59063cdfe 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -917,7 +917,7 @@ OpenLayers.INCHES_PER_UNIT = { }; OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches; OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd; -OpenLayers.INCHES_PER_UNIT["nmi"] = 1852 * OpenLayers.INCHES_PER_UNIT.m; +OpenLayers.INCHES_PER_UNIT["nmi"] = 1852 * OpenLayers.INCHES_PER_UNIT.m; /** * Constant: DOTS_PER_INCH diff --git a/tests/Control/test_ScaleLine.html b/tests/Control/test_ScaleLine.html index 2ddfffd762..019d9f7a23 100644 --- a/tests/Control/test_ScaleLine.html +++ b/tests/Control/test_ScaleLine.html @@ -43,7 +43,7 @@ var control = new OpenLayers.Control.ScaleLine(); t.ok(control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" ); var map = new OpenLayers.Map('map'); - map.units = "mi"; + map.units = "mi"; var 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); @@ -55,8 +55,8 @@ map.destroy(); } - function test_calcMeters (t) { - t.plan(5); + function test_calcMeters (t) { + t.plan(5); // this example is taken from the projected-map.html OpenLayers example var lat = 900863; var lon = 235829; @@ -78,9 +78,9 @@ units: "m" // Only neccesary for working with scales. } ); - map.addLayer(basemap); + map.addLayer(basemap); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); - map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.addControl(new OpenLayers.Control.LayerSwitcher()); var control = new OpenLayers.Control.ScaleLine(); t.ok( control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" ); map.addControl(control); diff --git a/tests/Format/test_GeoRSS.html b/tests/Format/test_GeoRSS.html index f914e4e9d2..f023ba53a9 100644 --- a/tests/Format/test_GeoRSS.html +++ b/tests/Format/test_GeoRSS.html @@ -80,22 +80,22 @@ 'http://featureserver.org/featureserver.cgi/scribble/794.atomFeature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Here28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125' ]; var output= ['Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/562.atom-5.9765625 -131.484375 -58.0078125 -112.5 -50.2734375 -32.34375 52.3828125 -114.609375 -35.5078125 -167.34375 -57.3046875 -146.953125 -34.1015625 -139.921875 -5.9765625 -131.484375', - 'Feature 2<b>strokeColor</b>: 00ccff<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/796.atom75.5859375 15.46875', - 'Feature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/794.atom28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125' - ]; + 'Feature 2<b>strokeColor</b>: 00ccff<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/796.atom75.5859375 15.46875', + 'Feature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/794.atom28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125' + ]; var shell_start_gml = ' scribblehttp://featureserver.org/featureserver.cgi/scribble?format=atomFeatureServer'; - var shell_end_gml = ''; - var input_gml = ['http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 10', - 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here110,-50 110,-10 155,-10 155,-50 110,-50', - 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0,10 10,20', - 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 120 21' - ]; - var output_gml = ['Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10', - 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom110 -50 110 -10 155 -10 155 -50 110 -50', - 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10 10 20', - 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 1 0 21 20 21 20 1 0 1' - ]; + var shell_end_gml = ''; + var input_gml = ['http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 10', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here110,-50 110,-10 155,-10 155,-50 110,-50', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0,10 10,20', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 120 21' + ]; + var output_gml = ['Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom110 -50 110 -10 155 -10 155 -50 110 -50', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10 10 20', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 1 0 21 20 21 20 1 0 1' + ]; diff --git a/tests/Layer/test_WFS.html b/tests/Layer/test_WFS.html index e87f2e1eb5..300e9bdb4d 100644 --- a/tests/Layer/test_WFS.html +++ b/tests/Layer/test_WFS.html @@ -16,64 +16,64 @@ } function test_Layer_WFS_destroy(t) { - t.plan(13); - - var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy; - OpenLayers.Layer.Vector.prototype.destroy = function() { - g_VectorDestroyed = true; - } + t.plan(13); + + var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy; + OpenLayers.Layer.Vector.prototype.destroy = function() { + g_VectorDestroyed = true; + } - var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy; - OpenLayers.Layer.Markers.prototype.destroy = function() { - g_MarkersDestroyed = true; - } + var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy; + OpenLayers.Layer.Markers.prototype.destroy = function() { + g_MarkersDestroyed = true; + } - var layer = { - 'vectorMode': true, - 'tile': { - 'destroy': function() { - t.ok(true, "wfs layer's tile is destroyed"); - } - }, - 'ratio': {}, - 'featureClass': {}, - 'format': {}, - 'formatObject': { - 'destroy': function() { - t.ok(true, "wfs layer's format object is destroyed"); - } - }, - 'formatOptions': {}, - 'encodeBBOX': {}, - 'extractAttributes': {} - }; - - //this call should set off two tests (destroys for tile and format object) - g_VectorDestroyed = null; - g_MarkersDestroyed = null; - OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); + var layer = { + 'vectorMode': true, + 'tile': { + 'destroy': function() { + t.ok(true, "wfs layer's tile is destroyed"); + } + }, + 'ratio': {}, + 'featureClass': {}, + 'format': {}, + 'formatObject': { + 'destroy': function() { + t.ok(true, "wfs layer's format object is destroyed"); + } + }, + 'formatOptions': {}, + 'encodeBBOX': {}, + 'extractAttributes': {} + }; + + //this call should set off two tests (destroys for tile and format object) + g_VectorDestroyed = null; + g_MarkersDestroyed = null; + OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); - t.ok(g_VectorDestroyed && !g_MarkersDestroyed, "when vector mode is set to true, the default vector layer's destroy() method is called"); - t.eq(layer.vectorMode, null, "'vectorMode' property nullified"); - t.eq(layer.tile, null, "'tile' property nullified"); - t.eq(layer.ratio, null, "'ratio' property nullified"); - t.eq(layer.featureClass, null, "'featureClass' property nullified"); - t.eq(layer.format, null, "'format' property nullified"); - t.eq(layer.formatObject, null, "'formatObject' property nullified"); - t.eq(layer.formatOptions, null, "'formatOptions' property nullified"); - t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified"); - t.eq(layer.extractAttributes, null, "'extractAttributes' property nullified"); + t.ok(g_VectorDestroyed && !g_MarkersDestroyed, "when vector mode is set to true, the default vector layer's destroy() method is called"); + t.eq(layer.vectorMode, null, "'vectorMode' property nullified"); + t.eq(layer.tile, null, "'tile' property nullified"); + t.eq(layer.ratio, null, "'ratio' property nullified"); + t.eq(layer.featureClass, null, "'featureClass' property nullified"); + t.eq(layer.format, null, "'format' property nullified"); + t.eq(layer.formatObject, null, "'formatObject' property nullified"); + t.eq(layer.formatOptions, null, "'formatOptions' property nullified"); + t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified"); + t.eq(layer.extractAttributes, null, "'extractAttributes' property nullified"); - layer.vectorMode = false; + layer.vectorMode = false; - //this call will *not* set off two tests (tile and format object are null) - g_VectorDestroyed = null; - g_MarkersDestroyed = null; - OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); - t.ok(!g_VectorDestroyed && g_MarkersDestroyed, "when vector mode is set to false, the default markers layer's destroy() method is called"); - - OpenLayers.Layer.Vector.prototype.destroy = tVectorDestroy; - OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy; + //this call will *not* set off two tests (tile and format object are null) + g_VectorDestroyed = null; + g_MarkersDestroyed = null; + OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); + t.ok(!g_VectorDestroyed && g_MarkersDestroyed, "when vector mode is set to false, the default markers layer's destroy() method is called"); + + OpenLayers.Layer.Vector.prototype.destroy = tVectorDestroy; + OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy; } function test_Layer_WFS_mapresizevector(t) { diff --git a/tests/Rule/test_FeatureId.html b/tests/Rule/test_FeatureId.html index b5f554c8a7..730941c5c5 100644 --- a/tests/Rule/test_FeatureId.html +++ b/tests/Rule/test_FeatureId.html @@ -19,7 +19,7 @@ var rule = new OpenLayers.Rule.FeatureId(); rule.destroy(); - t.eq(rule.symbolizer, null, "symbolizer hash nulled properly"); + t.eq(rule.symbolizer, null, "symbolizer hash nulled properly"); } function test_FeatureId_evaluate(t) { diff --git a/tests/Rule/test_Logical.html b/tests/Rule/test_Logical.html index a7a47b4b6c..5b34f1015b 100644 --- a/tests/Rule/test_Logical.html +++ b/tests/Rule/test_Logical.html @@ -19,7 +19,7 @@ var rule = new OpenLayers.Rule.Logical(); rule.destroy(); - t.eq(rule.rules, null, "rules array nulled properly"); + t.eq(rule.rules, null, "rules array nulled properly"); } function test_Logical_evaluate(t) { diff --git a/tests/manual/tween.html b/tests/manual/tween.html index af677aa331..88606cb168 100644 --- a/tests/manual/tween.html +++ b/tests/manual/tween.html @@ -1,6 +1,6 @@ - Tween Example + Tween Example