replacing tabs with spaces. no functional diffs here.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-03-29 00:38:47 +00:00
parent d46f884201
commit 136a37bf2f
14 changed files with 106 additions and 106 deletions
+9 -9
View File
@@ -124,24 +124,24 @@
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<h1 id="title">WMC Example</h1> <h1 id="title">WMC Example</h1>
<div id="tags"> <d v id="tags">
</div> </ iv>
<p id="shortdesc"> <p id="shortdesc">
Shows parsing of Web Map Context documents. Shows parsing of Web Map Context documents.
</p> </ >
<div id="map"></div> <d v id="map"></div>
<button onclick="writeWMC();">write</button> <button onclick="writeWMC();">write</button>
<button onclick="readWMC();">read as new map</button> <button onclick="readWMC();">read as new map</button>
<button onclick="readWMC(true);">read and merge</button> <button onclick="readWMC(true);">read and merge</button>
<textarea id="wmc">paste WMC doc here</textarea> <textarea id="wmc">paste WMC doc here</textarea>
<div id="docs"> <d v id="docs">
This is an example of parsing WMC documents. <br /> This is an example of parsing WMC documents. <br />
The format class has a layerOptions property, which can be used The format class has a layerOptions property, which can be used
to control the default options of the layer when it is created to control the default options of the layer when it is created
by the parser. by the parser.
</div> </ iv>
</body> </body>
</html> </html>
+11 -11
View File
@@ -27,20 +27,20 @@
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<h1 id="title">WMS Example</h1> <h1 id="title">WMS Example</h1>
<div id="tags"> <div id="tags">
</div> </div>
<p id="shortdesc"> <p id="shortdesc">
Shows the basic use of openlayers using a WMS layer Shows the basic use of openlayers using a WMS layer
</p> </p>
<div id="map"></div> <div id="map"></div>
<div id="docs"> <div id="docs">
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 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. please use this example and pass the option singleTile as true.
</div> </div>
</body> </body>
</html> </html>
+1 -1
View File
@@ -429,7 +429,7 @@ OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, {
*/ */
getStatus: function() { getStatus: function() {
try { try {
return this.transport.status || 0; return this.transport.status || 0;
} catch (e) { } catch (e) {
return 0; return 0;
} }
+3 -3
View File
@@ -147,9 +147,9 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
node = this.drawGeometryNode(node, geometry); node = this.drawGeometryNode(node, geometry);
// append the node to root (but only if it's new) // append the node to root (but only if it's new)
if (node.parentNode != this.root) { if (node.parentNode != this.root) {
this.root.appendChild(node); this.root.appendChild(node);
} }
this.postDraw(node); this.postDraw(node);
} else { } else {
node = OpenLayers.Util.getElement(geometry.id); node = OpenLayers.Util.getElement(geometry.id);
+1 -1
View File
@@ -311,7 +311,7 @@ OpenLayers.Easing.Quad = {
*/ */
easeInOut: function(t, b, c, d) { easeInOut: function(t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b; 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" CLASS_NAME: "OpenLayers.Easing.Quad"
+1 -1
View File
@@ -917,7 +917,7 @@ OpenLayers.INCHES_PER_UNIT = {
}; };
OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches; OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches;
OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd; 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 * Constant: DOTS_PER_INCH
+5 -5
View File
@@ -43,7 +43,7 @@
var control = new OpenLayers.Control.ScaleLine(); var control = new OpenLayers.Control.ScaleLine();
t.ok(control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" ); t.ok(control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" );
var map = new OpenLayers.Map('map'); 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'}); 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.addLayer(layer);
map.zoomTo(0); map.zoomTo(0);
@@ -55,8 +55,8 @@
map.destroy(); map.destroy();
} }
function test_calcMeters (t) { function test_calcMeters (t) {
t.plan(5); t.plan(5);
// this example is taken from the projected-map.html OpenLayers example // this example is taken from the projected-map.html OpenLayers example
var lat = 900863; var lat = 900863;
var lon = 235829; var lon = 235829;
@@ -78,9 +78,9 @@
units: "m" // Only neccesary for working with scales. units: "m" // Only neccesary for working with scales.
} ); } );
map.addLayer(basemap); map.addLayer(basemap);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); 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(); var control = new OpenLayers.Control.ScaleLine();
t.ok( control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" ); t.ok( control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" );
map.addControl(control); map.addControl(control);
+14 -14
View File
@@ -80,22 +80,22 @@
'<entry><id>http://featureserver.org/featureserver.cgi/scribble/794.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/794.atom"/><title>Feature 5</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 5&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:line>28.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</georss:line></entry>' '<entry><id>http://featureserver.org/featureserver.cgi/scribble/794.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/794.atom"/><title>Feature 5</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 5&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:line>28.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</georss:line></entry>'
]; ];
var output= ['<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/562.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">-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</georss:polygon></item></rss>', var output= ['<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/562.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">-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</georss:polygon></item></rss>',
'<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: 00ccff&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/796.atom</link><georss:point xmlns:georss="http://www.georss.org/georss">75.5859375 15.46875</georss:point></item></rss>', '<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: 00ccff&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/796.atom</link><georss:point xmlns:georss="http://www.georss.org/georss">75.5859375 15.46875</georss:point></item></rss>',
'<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 5</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 5&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/794.atom</link><georss:line xmlns:georss="http://www.georss.org/georss">28.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</georss:line></item></rss>' '<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 5</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 5&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/794.atom</link><georss:line xmlns:georss="http://www.georss.org/georss">28.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</georss:line></item></rss>'
]; ];
var shell_start_gml = '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss"> <title>scribble</title><id>http://featureserver.org/featureserver.cgi/scribble?format=atom</id><author><name>FeatureServer</name></author>'; var shell_start_gml = '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss"> <title>scribble</title><id>http://featureserver.org/featureserver.cgi/scribble?format=atom</id><author><name>FeatureServer</name></author>';
var shell_end_gml = '</feed>'; var shell_end_gml = '</feed>';
var input_gml = ['<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Point><gml:pos>0 10</gml:pos></gml:Point></georss:where></entry>', var input_gml = ['<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Point><gml:pos>0 10</gml:pos></gml:Point></georss:where></entry>',
'<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>110,-50 110,-10 155,-10 155,-50 110,-50</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></georss:where></entry>', '<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>110,-50 110,-10 155,-10 155,-50 110,-50</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></georss:where></entry>',
'<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:LineString><gml:coordinates>0,10 10,20</gml:coordinates></gml:LineString></georss:where></entry>', '<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:LineString><gml:coordinates>0,10 10,20</gml:coordinates></gml:LineString></georss:where></entry>',
'<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Envelope><gml:lowerCorner>0 1</gml:lowerCorner><gml:upperCorner>20 21</gml:upperCorner></gml:Envelope></georss:where></entry>' '<entry><id>http://featureserver.org/featureserver.cgi/scribble/111.atom</id><link href="http://featureserver.org/featureserver.cgi/scribble/111.atom"/><title>Feature 2</title><content type="html">&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</content><georss:where><gml:Envelope><gml:lowerCorner>0 1</gml:lowerCorner><gml:upperCorner>20 21</gml:upperCorner></gml:Envelope></georss:where></entry>'
]; ];
var output_gml = ['<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:point xmlns:georss="http://www.georss.org/georss">0 10</georss:point></item></rss>', var output_gml = ['<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:point xmlns:georss="http://www.georss.org/georss">0 10</georss:point></item></rss>',
'<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">110 -50 110 -10 155 -10 155 -50 110 -50</georss:polygon></item></rss>', '<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">110 -50 110 -10 155 -10 155 -50 110 -50</georss:polygon></item></rss>',
'<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:line xmlns:georss="http://www.georss.org/georss">0 10 10 20</georss:line></item></rss>', '<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:line xmlns:georss="http://www.georss.org/georss">0 10 10 20</georss:line></item></rss>',
'<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">0 1 0 21 20 21 20 1 0 1</georss:polygon></item></rss>' '<rss xmlns="http://backend.userland.com/rss2"><item><title>Feature 2</title><description>&lt;b&gt;strokeColor&lt;/b&gt;: red&lt;br /&gt;&lt;b&gt;title&lt;/b&gt;: Feature 2&lt;br /&gt;&lt;b&gt;author&lt;/b&gt;: Your Name Here</description><link>http://featureserver.org/featureserver.cgi/scribble/111.atom</link><georss:polygon xmlns:georss="http://www.georss.org/georss">0 1 0 21 20 21 20 1 0 1</georss:polygon></item></rss>'
]; ];
</script> </script>
</head> </head>
+53 -53
View File
@@ -16,64 +16,64 @@
} }
function test_Layer_WFS_destroy(t) { function test_Layer_WFS_destroy(t) {
t.plan(13); t.plan(13);
var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy; var tVectorDestroy = OpenLayers.Layer.Vector.prototype.destroy;
OpenLayers.Layer.Vector.prototype.destroy = function() { OpenLayers.Layer.Vector.prototype.destroy = function() {
g_VectorDestroyed = true; g_VectorDestroyed = true;
} }
var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy; var tMarkersDestroy = OpenLayers.Layer.Markers.prototype.destroy;
OpenLayers.Layer.Markers.prototype.destroy = function() { OpenLayers.Layer.Markers.prototype.destroy = function() {
g_MarkersDestroyed = true; g_MarkersDestroyed = true;
} }
var layer = { var layer = {
'vectorMode': true, 'vectorMode': true,
'tile': { 'tile': {
'destroy': function() { 'destroy': function() {
t.ok(true, "wfs layer's tile is destroyed"); t.ok(true, "wfs layer's tile is destroyed");
} }
}, },
'ratio': {}, 'ratio': {},
'featureClass': {}, 'featureClass': {},
'format': {}, 'format': {},
'formatObject': { 'formatObject': {
'destroy': function() { 'destroy': function() {
t.ok(true, "wfs layer's format object is destroyed"); t.ok(true, "wfs layer's format object is destroyed");
} }
}, },
'formatOptions': {}, 'formatOptions': {},
'encodeBBOX': {}, 'encodeBBOX': {},
'extractAttributes': {} 'extractAttributes': {}
}; };
//this call should set off two tests (destroys for tile and format object) //this call should set off two tests (destroys for tile and format object)
g_VectorDestroyed = null; g_VectorDestroyed = null;
g_MarkersDestroyed = null; g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); 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.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.vectorMode, null, "'vectorMode' property nullified");
t.eq(layer.tile, null, "'tile' property nullified"); t.eq(layer.tile, null, "'tile' property nullified");
t.eq(layer.ratio, null, "'ratio' property nullified"); t.eq(layer.ratio, null, "'ratio' property nullified");
t.eq(layer.featureClass, null, "'featureClass' property nullified"); t.eq(layer.featureClass, null, "'featureClass' property nullified");
t.eq(layer.format, null, "'format' property nullified"); t.eq(layer.format, null, "'format' property nullified");
t.eq(layer.formatObject, null, "'formatObject' property nullified"); t.eq(layer.formatObject, null, "'formatObject' property nullified");
t.eq(layer.formatOptions, null, "'formatOptions' property nullified"); t.eq(layer.formatOptions, null, "'formatOptions' property nullified");
t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified"); t.eq(layer.encodeBBOX, null, "'encodeBBOX' property nullified");
t.eq(layer.extractAttributes, null, "'extractAttributes' 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) //this call will *not* set off two tests (tile and format object are null)
g_VectorDestroyed = null; g_VectorDestroyed = null;
g_MarkersDestroyed = null; g_MarkersDestroyed = null;
OpenLayers.Layer.WFS.prototype.destroy.apply(layer, []); 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"); 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.Vector.prototype.destroy = tVectorDestroy;
OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy; OpenLayers.Layer.Markers.prototype.destroy = tMarkersDestroy;
} }
function test_Layer_WFS_mapresizevector(t) { function test_Layer_WFS_mapresizevector(t) {
+1 -1
View File
@@ -19,7 +19,7 @@
var rule = new OpenLayers.Rule.FeatureId(); var rule = new OpenLayers.Rule.FeatureId();
rule.destroy(); 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) { function test_FeatureId_evaluate(t) {
+1 -1
View File
@@ -19,7 +19,7 @@
var rule = new OpenLayers.Rule.Logical(); var rule = new OpenLayers.Rule.Logical();
rule.destroy(); 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) { function test_Logical_evaluate(t) {
+4 -4
View File
@@ -1,6 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Tween Example</title> <title>Tween Example</title>
<style type="text/css"> <style type="text/css">
#viewport { #viewport {
width: 500px; width: 500px;
@@ -60,8 +60,8 @@
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="title">Tween Example</div> <div id="title">Tween Example</div>
<div id="tags"></div> <div id="tags"></div>
<div id="shortdesc">Show transition effects</div> <div id="shortdesc">Show transition effects</div>
<select name="transition" id="transition" onchange="changeTween()"> <select name="transition" id="transition" onchange="changeTween()">
<option value="Linear">Linear</option> <option value="Linear">Linear</option>
<option value="Expo">Expo</option> <option value="Expo">Expo</option>
@@ -76,7 +76,7 @@
<div id="block"></div> <div id="block"></div>
</div> </div>
<div id="docs"> <div id="docs">
This is an example of transition effects. This is an example of transition effects.
</div> </div>
</body> </body>
</html> </html>
+1 -1
View File
@@ -19,7 +19,7 @@
var rule = new OpenLayers.Rule(); var rule = new OpenLayers.Rule();
rule.destroy(); rule.destroy();
t.eq(rule.symbolizer, null, "symbolizer hash nulled properly"); t.eq(rule.symbolizer, null, "symbolizer hash nulled properly");
} }
</script> </script>
+1 -1
View File
@@ -104,7 +104,7 @@ div.olControlMousePosition {
float:right; float:right;
color:gray; color:gray;
font-size:1.2em; font-size:1.2em;
margin-right:6px; margin-right:6px;
font-family:sans-serif; font-family:sans-serif;
} }
.olLayerGeoRSSTitle { .olLayerGeoRSSTitle {