[OpenLayers-Commits] r3178 - in tags/openlayers: . release-2.4-rc4 release-2.4-rc4/doc release-2.4-rc4/examples release-2.4-rc4/lib release-2.4-rc4/lib/OpenLayers release-2.4-rc4/lib/OpenLayers/Control release-2.4-rc4/lib/OpenLayers/Feature release-2.4-rc4/lib/OpenLayers/Format release-2.4-rc4/lib/OpenLayers/Geometry release-2.4-rc4/lib/OpenLayers/Handler release-2.4-rc4/lib/OpenLayers/Layer release-2.4-rc4/lib/OpenLayers/Layer/WMS release-2.4-rc4/lib/OpenLayers/Marker release-2.4-rc4/lib/OpenLayers/Popup release-2.4-rc4/lib/OpenLayers/Renderer release-2.4-rc4/lib/OpenLayers/Tile release-2.4-rc4/tests release-2.4-rc4/tests/Format release-2.4-rc4/tests/Layer release-2.4-rc4/tests/Tile

commits at openlayers.org commits at openlayers.org
Thu May 24 10:55:51 EDT 2007


Author: crschmidt
Date: 2007-05-24 10:55:48 -0400 (Thu, 24 May 2007)
New Revision: 3178

Added:
   tags/openlayers/release-2.4-rc4/
   tags/openlayers/release-2.4-rc4/doc/authors.txt
   tags/openlayers/release-2.4-rc4/examples/georss-serialize.html
   tags/openlayers/release-2.4-rc4/examples/popups.html
   tags/openlayers/release-2.4-rc4/examples/vector-features.html
   tags/openlayers/release-2.4-rc4/examples/wkt.html
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/OverviewMap.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Feature.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/GeoRSS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/WKT.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Image.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Vector.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/WMS/Untiled.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Map.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Popup.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Popup/AnchoredBubble.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Renderer/SVG.js
   tags/openlayers/release-2.4-rc4/readme.txt
   tags/openlayers/release-2.4-rc4/tests/Format/test_GeoRSS.html
   tags/openlayers/release-2.4-rc4/tests/Format/test_WKT.html
   tags/openlayers/release-2.4-rc4/tests/Layer/test_Grid.html
   tags/openlayers/release-2.4-rc4/tests/Tile/test_Image.html
   tags/openlayers/release-2.4-rc4/tests/list-tests.html
   tags/openlayers/release-2.4-rc4/tests/test_Map.html
   tags/openlayers/release-2.4-rc4/tests/test_Popup.html
Removed:
   tags/openlayers/release-2.4-rc4/doc/authors.txt
   tags/openlayers/release-2.4-rc4/examples/georss-serialize.html
   tags/openlayers/release-2.4-rc4/examples/popups.html
   tags/openlayers/release-2.4-rc4/examples/vector-features.html
   tags/openlayers/release-2.4-rc4/examples/wkt.html
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/OverviewMap.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Feature.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/GeoRSS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/WKT.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Image.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Vector.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/WMS/Untiled.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Map.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Popup.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Popup/AnchoredBubble.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Renderer/SVG.js
   tags/openlayers/release-2.4-rc4/readme.txt
   tags/openlayers/release-2.4-rc4/repository-license.txt
   tags/openlayers/release-2.4-rc4/tests/Format/test_WKT.html
   tags/openlayers/release-2.4-rc4/tests/Layer/test_Grid.html
   tags/openlayers/release-2.4-rc4/tests/Tile/test_Image.html
   tags/openlayers/release-2.4-rc4/tests/list-tests.html
   tags/openlayers/release-2.4-rc4/tests/test_Map.html
   tags/openlayers/release-2.4-rc4/tests/test_Popup.html
Modified:
   tags/openlayers/release-2.4-rc4/lib/OpenLayers.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Ajax.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/ArgParser.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DragPan.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DrawFeature.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/EditingToolbar.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/KeyboardDefaults.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/LayerSwitcher.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseDefaults.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MousePosition.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseToolbar.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/NavToolbar.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Navigation.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/PanZoom.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/PanZoomBar.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Panel.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Permalink.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Scale.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/SelectFeature.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/ZoomBox.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/ZoomToMaxExtent.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Events.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Feature/Vector.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Feature/WFS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/GML.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/KML.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Format/WFS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Collection.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Curve.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/LineString.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/LinearRing.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/MultiLineString.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/MultiPoint.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/MultiPolygon.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Point.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Polygon.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Rectangle.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Geometry/Surface.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Box.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Drag.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Feature.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Keyboard.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/MouseWheel.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Path.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Point.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Handler/Polygon.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Icon.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Boxes.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Canvas.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/EventPane.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/FixedZoomLevels.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/GML.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/GeoRSS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Google.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Grid.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/HTTPRequest.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/KaMap.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/MapServer.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Markers.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/MultiMap.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/TMS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Text.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/VirtualEarth.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/WFS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/WMS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/WorldWind.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Layer/Yahoo.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Marker.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Marker/Box.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Popup/Anchored.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Renderer.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Renderer/Elements.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Renderer/VML.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/SingleFile.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Tile.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Tile/Image.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Tile/WFS.js
   tags/openlayers/release-2.4-rc4/lib/OpenLayers/Util.js
Log:
Tag RC4 release.


Copied: tags/openlayers/release-2.4-rc4 (from rev 3176, branches/openlayers/2.4)

Deleted: tags/openlayers/release-2.4-rc4/doc/authors.txt
===================================================================
--- branches/openlayers/2.4/doc/authors.txt	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/doc/authors.txt	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,24 +0,0 @@
-OpenLayers contributors:
-Howard Butler
-Bertil Chaupis                                                               
-Jeff Dege
-Schuyler Erle
-Christian López Espínola
-John Frank
-Sean Gilles
-Pierre Giraud                                                                
-Andreas Hocevar
-Philip Lindsay
-Corey Puffault
-Tim Schaub
-Christopher Schmidt
-Cameron Shorter                                                              
-Paul Spencer                                                                 
-James Stembridge
-Erik Uzureau
-Bill Woodall
-Steve Woodbridge
-
-
-OpenLayers is graciously supported by MetaCarta, Inc.
-<http://www.metacarta.com>.

Copied: tags/openlayers/release-2.4-rc4/doc/authors.txt (from rev 3177, branches/openlayers/2.4/doc/authors.txt)
===================================================================
--- tags/openlayers/release-2.4-rc4/doc/authors.txt	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/doc/authors.txt	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,25 @@
+OpenLayers contributors:
+Howard Butler
+Bertil Chaupis                                                               
+John Cole
+Jeff Dege
+Schuyler Erle
+Christian López Espínola
+John Frank
+Sean Gilles
+Pierre Giraud                                                                
+Andreas Hocevar
+Philip Lindsay
+Corey Puffault
+Tim Schaub
+Christopher Schmidt
+Cameron Shorter                                                              
+Paul Spencer                                                                 
+James Stembridge
+Erik Uzureau
+Bill Woodall
+Steve Woodbridge
+
+
+OpenLayers is graciously supported by MetaCarta, Inc.
+<http://www.metacarta.com>.

Deleted: tags/openlayers/release-2.4-rc4/examples/georss-serialize.html
===================================================================
--- branches/openlayers/2.4/examples/georss-serialize.html	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/examples/georss-serialize.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,50 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <style type="text/css">
-        #map {
-            width: 512px;
-            height: 350px;
-            border: 1px solid gray;
-        }
-    </style>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        <!--
-        var map, drawControl, g;
-        function serialize(feature) {
-            feature.attributes = {};
-            var name = prompt("Title for feature?");
-            feature.attributes['title'] = name;
-            s = new XMLSerializer();
-            var data = g.write(feature.layer.features);
-            $("gml").value = s.serializeToString(data);
-        }
-        function init(){
-            g = new OpenLayers.Format.GeoRSS();
-            map = new OpenLayers.Map('map');
-            
-            var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
-                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); 
-
-            var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
-            pointLayer.onFeatureInsert = serialize;
-
-            map.addLayers([wmsLayer, pointLayer]);
-            map.addControl(new OpenLayers.Control.EditingToolbar(pointLayer));
-            map.addControl(new OpenLayers.Control.MousePosition());
-            
-            
-            map.setCenter(new OpenLayers.LonLat(0, 0), 3);
-        }
-
-        // -->
-    </script>
-  </head>
-  <body onload="init()">
-    <h1>OpenLayers Draw Point Example</h1>
-    <div style="float:right">
-    <textarea id="gml" cols="80" rows="30"></textarea>
-    </div>
-    <div id="map"></div>
-  </body>
-</html>

Copied: tags/openlayers/release-2.4-rc4/examples/georss-serialize.html (from rev 3177, branches/openlayers/2.4/examples/georss-serialize.html)
===================================================================
--- tags/openlayers/release-2.4-rc4/examples/georss-serialize.html	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/examples/georss-serialize.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,50 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style type="text/css">
+        #map {
+            width: 45%;
+            height: 350px;
+            border: 1px solid gray;
+        }
+    </style>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        <!--
+        var map, drawControl, g;
+        function serialize(feature) {
+            feature.attributes = {};
+            var name = prompt("Title for feature?");
+            feature.attributes['title'] = name;
+            s = new XMLSerializer();
+            var data = g.write(feature.layer.features);
+            $("gml").value = s.serializeToString(data);
+        }
+        function init(){
+            g = new OpenLayers.Format.GeoRSS();
+            map = new OpenLayers.Map('map');
+            
+            var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); 
+
+            var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
+            pointLayer.onFeatureInsert = serialize;
+
+            map.addLayers([wmsLayer, pointLayer]);
+            map.addControl(new OpenLayers.Control.EditingToolbar(pointLayer));
+            map.addControl(new OpenLayers.Control.MousePosition());
+            
+            
+            map.setCenter(new OpenLayers.LonLat(0, 0), 3);
+        }
+
+        // -->
+    </script>
+  </head>
+  <body onload="init()">
+    <h1>OpenLayers Draw Point Example</h1>
+    <div style="float:right;width:50%">
+    <textarea id="gml" style="width:100%" rows="30"></textarea>
+    </div>
+    <div id="map"></div>
+  </body>
+</html>

Deleted: tags/openlayers/release-2.4-rc4/examples/popups.html
===================================================================
--- branches/openlayers/2.4/examples/popups.html	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/examples/popups.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,124 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <style type="text/css">
-        #map {
-            width: 512px;
-            height: 512px;
-            border: 1px solid black;
-        }
-    </style>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        <!--
-        var map, layer, popup;
-        var markers, feature, marker;
-        
-        function init(){
-            map = new OpenLayers.Map('map');
-            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
-                "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
-            map.addLayer(layer);
-
-            map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.zoomToMaxExtent();
-            
-        }
-
-        function changer() {
-            popup.setBackgroundColor("red");
-            popup.setSize(new OpenLayers.Size(100,600));
-//            popup.moveTo(new OpenLayers.Pixel(120,120));
-//            popup.setOpacity(.5);
-            popup.setBorder("2px solid");    
-            popup.setContentHTML("High Chickens");            
-        }
-
-        function add() {
-            popup = new OpenLayers.Popup("chicken", 
-                                         new OpenLayers.LonLat(5,40),
-                                         new OpenLayers.Size(200,200),
-                                         "example popup",
-                                         true);
-        
-            map.addPopup(popup);
-        }        
-
-        function addAnchor() {
-            popup = new OpenLayers.Popup.Anchored("chicken", 
-                                         new OpenLayers.LonLat(5,40),
-                                         new OpenLayers.Size(200,200),
-                                         "example popup");
-        
-            map.addPopup(popup);
-        }        
-        
-        function addMarker() {
-    
-            markers = new OpenLayers.Layer.Markers("zibo");
-            map.addLayer(markers);
-
-            feature = new OpenLayers.Feature(layer, 
-                                                 new OpenLayers.LonLat(0,0));
-
-
-            marker = feature.createMarker();
-            
-            markers.addMarker(marker);
-            marker.events.register("mousedown", marker, mousedown);
-                                                             
-        }
-        
-        function mousedown(evt) {
-            if (popup == null) {
-                popup = feature.createPopup();
-                popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
-                popup.setBackgroundColor("yellow");
-                popup.setOpacity(0.7);
-                markers.map.addPopup(popup);
-            } else {
-                markers.map.removePopup(popup);
-                popup.destroy();
-                popup = null;
-            }
-            Event.stop(evt);
-        }        
-
-        /**
-         * @param {Event} evt
-         */
-        function onPopupMouseDown(evt) {
-            markers.map.removePopup(popup);
-            popup.destroy();
-            popup = null;
-            Event.stop(evt);
-        }
-
-
-        function destroy() {
-            popup.destroy();
-        }
-
-        function remove() {
-            markers.removeMarker(marker);
-        }
-
-        function removelayer() {
-            layer.destroy();
-//            map.removeLayer(markers);
-        }
-
-
-        // -->
-    </script>
-  </head>
-  <body onload="init()">
-    <div id="map"></div>
-    <div style="background-color:purple" onclick="add()"> click to add Popup to map</div>
-    <div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
-    <div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
-    <div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
-    <div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
-    <div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
-    <div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div> 
-  </body>
-</html>

Copied: tags/openlayers/release-2.4-rc4/examples/popups.html (from rev 3177, branches/openlayers/2.4/examples/popups.html)
===================================================================
--- tags/openlayers/release-2.4-rc4/examples/popups.html	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/examples/popups.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,133 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style type="text/css">
+        #map {
+            width: 512px;
+            height: 512px;
+            border: 1px solid black;
+        }
+    </style>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        <!--
+        var map, layer, popup;
+        var markers, feature, marker;
+        
+        function init(){
+            map = new OpenLayers.Map('map');
+            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
+                "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
+            map.addLayer(layer);
+
+            map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.zoomToMaxExtent();
+            
+        }
+
+        function changer() {
+            popup.setBackgroundColor("red");
+            popup.setSize(new OpenLayers.Size(100,600));
+//            popup.moveTo(new OpenLayers.Pixel(120,120));
+//            popup.setOpacity(.5);
+            popup.setBorder("2px solid");    
+            popup.setContentHTML("High Chickens");            
+        }
+
+        function add() {
+            popup = new OpenLayers.Popup("chicken", 
+                                         new OpenLayers.LonLat(5,40),
+                                         new OpenLayers.Size(200,200),
+                                         "example popup",
+                                         true);
+        
+            map.addPopup(popup);
+        }        
+
+        function addAnchor() {
+            popup = new OpenLayers.Popup.Anchored("chicken", 
+                                         new OpenLayers.LonLat(5,40),
+                                         new OpenLayers.Size(200,200),
+                                         "example popup", true);
+        
+            map.addPopup(popup);
+        }        
+        
+        function addMarker() {
+    
+            markers = new OpenLayers.Layer.Markers("zibo");
+            map.addLayer(markers);
+
+            feature = new OpenLayers.Feature(layer, 
+                                                 new OpenLayers.LonLat(0,0));
+
+
+            marker = feature.createMarker();
+            
+            markers.addMarker(marker);
+            marker.events.register("mousedown", marker, mousedown);
+                                                             
+        }
+        
+        function mousedown(evt) {
+             // check to see if the popup was hidden by the close box
+             // if so, then destroy it before continuing
+            if (popup != null) {
+                if (!popup.visible()) {
+                    markers.map.removePopup(popup);
+                    popup.destroy();
+                    popup = null;
+                }
+            }
+            if (popup == null) {
+                popup = feature.createPopup(true);
+                popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
+                popup.setBackgroundColor("yellow");
+                popup.setOpacity(0.7);
+                markers.map.addPopup(popup);
+            } else {
+                markers.map.removePopup(popup);
+                popup.destroy();
+                popup = null;
+            }
+            Event.stop(evt);
+        }        
+
+        /**
+         * @param {Event} evt
+         */
+        function onPopupMouseDown(evt) {
+            markers.map.removePopup(popup);
+            popup.destroy();
+            popup = null;
+            Event.stop(evt);
+        }
+
+
+        function destroy() {
+            popup.destroy();
+        }
+
+        function remove() {
+            markers.removeMarker(marker);
+        }
+
+        function removelayer() {
+            layer.destroy();
+//            map.removeLayer(markers);
+        }
+
+
+        // -->
+    </script>
+  </head>
+  <body onload="init()">
+    <div id="map"></div>
+    <div style="background-color:purple" onclick="add()"> click to add Popup to map</div>
+    <div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
+    <div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
+    <div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
+    <div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
+    <div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
+    <div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div> 
+  </body>
+</html>

Deleted: tags/openlayers/release-2.4-rc4/examples/vector-features.html
===================================================================
--- branches/openlayers/2.4/examples/vector-features.html	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/examples/vector-features.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,63 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <style type="text/css">
-        #map {
-            width: 800px;
-            height: 475px;
-            border: 1px solid black;
-        }
-    </style>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        <!--
-        var map;
-
-        function init(){
-            map = new OpenLayers.Map( $('map') );
-            var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
-                    "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
-            map.addLayer(layer);
-            var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
-            
-            // create a point feature
-            var point = new OpenLayers.Geometry.Point(-111.04, 45.68);
-            var pointFeature = new OpenLayers.Feature.Vector(point);
-            
-            // create a line feature from a list of points
-            var pointList = [];
-            var newPoint = point;
-            for(var p=0; p<5; ++p) {
-                newPoint = new OpenLayers.Geometry.Point(newPoint.x + Math.random(1),
-                                                         newPoint.y + Math.random(1));
-                pointList.push(newPoint);
-            }
-            var lineFeature = new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.LineString(pointList));
-            
-            // create a polygon feature from a linear ring of points
-            var pointList = [];
-            for(var p=0; p<6; ++p) {
-                var a = p * (2 * Math.PI) / 7;
-                var r = Math.random(1) + 1;
-                var newPoint = new OpenLayers.Geometry.Point(point.x + (r * Math.cos(a)),
-                                                             point.y + (r * Math.sin(a)));
-                pointList.push(newPoint);
-            }
-            pointList.push(pointList[0]);
-            
-            var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
-            var polygonFeature = new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.Polygon([linearRing]));
-                
-            
-            map.addLayer(vectorLayer);
-            map.setCenter(new OpenLayers.LonLat(point.x, point.y), 5);
-            vectorLayer.addFeatures([pointFeature, lineFeature, polygonFeature]);
-        }
-        // -->
-    </script>
-  </head>
-  <body onload="init()">
-    <div id="map"></div>
-  </body>
-</html>

Copied: tags/openlayers/release-2.4-rc4/examples/vector-features.html (from rev 3177, branches/openlayers/2.4/examples/vector-features.html)
===================================================================
--- tags/openlayers/release-2.4-rc4/examples/vector-features.html	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/examples/vector-features.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,79 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style type="text/css">
+        #map {
+            width: 800px;
+            height: 475px;
+            border: 1px solid black;
+        }
+    </style>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        <!--
+        var map;
+
+        function init(){
+            map = new OpenLayers.Map( $('map') );
+            var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
+                    "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
+            map.addLayer(layer);
+            
+            var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
+            style_blue.strokeColor = "blue"; 
+            style_blue.fillColor = "blue"; 
+            var style_green = {
+                strokeColor: "#00FF00",
+                strokeOpacity: 1,
+                strokeWidth: 3,
+                pointRadius: 6,
+                pointerEvents: "visiblePainted"
+            };
+            
+            var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
+            
+            // create a point feature
+            var point = new OpenLayers.Geometry.Point(-111.04, 45.68);
+            var pointFeature = new OpenLayers.Feature.Vector(point,null,style_blue);
+            
+            // create a line feature from a list of points
+            var pointList = [];
+            var newPoint = point;
+            for(var p=0; p<5; ++p) {
+                newPoint = new OpenLayers.Geometry.Point(newPoint.x + Math.random(1),
+                                                         newPoint.y + Math.random(1));
+                pointList.push(newPoint);
+            }
+            var lineFeature = new OpenLayers.Feature.Vector(
+                new OpenLayers.Geometry.LineString(pointList),null,style_green);
+            
+            // create a polygon feature from a linear ring of points
+            var pointList = [];
+            for(var p=0; p<6; ++p) {
+                var a = p * (2 * Math.PI) / 7;
+                var r = Math.random(1) + 1;
+                var newPoint = new OpenLayers.Geometry.Point(point.x + (r * Math.cos(a)),
+                                                             point.y + (r * Math.sin(a)));
+                pointList.push(newPoint);
+            }
+            pointList.push(pointList[0]);
+            
+            var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
+            var polygonFeature = new OpenLayers.Feature.Vector(
+                new OpenLayers.Geometry.Polygon([linearRing]));
+                
+            
+            map.addLayer(vectorLayer);
+            map.setCenter(new OpenLayers.LonLat(point.x, point.y), 5);
+            vectorLayer.addFeatures([pointFeature, lineFeature, polygonFeature]);
+        }
+        // -->
+    </script>
+  </head>
+  <body onload="init()">
+    <div id="map"></div>
+    <p>This example shows drawing simple vector features -- point, line, polygon
+       in different styles, created 'manually', by constructing the entire style
+       object, via 'copy', extending the default style object, and by 
+       inheriting the default style from the layer.</p>
+  </body>
+</html>

Deleted: tags/openlayers/release-2.4-rc4/examples/wkt.html
===================================================================
--- branches/openlayers/2.4/examples/wkt.html	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/examples/wkt.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,153 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>WKT</title>
-    <style type="text/css">
-        #info {
-            position: absolute;
-            top: 70px;
-            left: 550px;
-            width: 350px;
-        }
-        #map {
-            width: 512px;
-            height: 350px;
-            border: 1px solid gray;
-        }
-        #controls {
-            width: 512px;
-        }
-        #wktInput {
-            float: right;
-        }
-        #controlToggle {
-            padding-left: 1em;
-        }
-        #controlToggle li {
-            list-style: none;
-        }
-    </style>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        <!--
-        var map, vectors, drawControls, wkt;
-        function init(){
-            map = new OpenLayers.Map('map');
-            var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
-                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); 
-
-            vectors = new OpenLayers.Layer.Vector("Vector Layer");
-
-            map.addLayers([wms, vectors]);
-            map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.addControl(new OpenLayers.Control.MousePosition());
-            
-            var options = {
-                hover: true,
-                onSelect: displayWKT
-            };
-
-            drawControls = {
-                point: new OpenLayers.Control.DrawFeature(vectors,
-                            OpenLayers.Handler.Point),
-                line: new OpenLayers.Control.DrawFeature(vectors,
-                            OpenLayers.Handler.Path),
-                polygon: new OpenLayers.Control.DrawFeature(vectors,
-                            OpenLayers.Handler.Polygon),
-                hover: new OpenLayers.Control.SelectFeature(vectors, options)
-            };
-            
-            for(var key in drawControls) {
-                map.addControl(drawControls[key]);
-            }
-            
-            wkt = new OpenLayers.Format.WKT();
-            
-            map.setCenter(new OpenLayers.LonLat(0, 0), 3);
-            document.getElementById('noneToggle').checked = true;
-        }
-
-        function toggleControl(element) {
-            for(key in drawControls) {
-                var control = drawControls[key];
-                if(element.value == key && element.checked) {
-                    control.activate();
-                } else {
-                    control.deactivate();
-                }
-            }
-        }
-        
-        function displayWKT(feature) {
-            var str = wkt.write(feature.geometry);
-            // not a good idea in general, just for this demo
-            str = str.replace(/,/g, ', ');
-            document.getElementById('info').innerHTML = str;
-        }
-
-        function parseWKT() {
-            var element = document.getElementById('wkt');
-            var collection = wkt.read(element.value);
-            var bounds;
-            if(collection) {
-                if(collection.constructor != Array) {
-                    collection = [collection];
-                }
-                var features = [];
-                for(var i=0; i<collection.length; ++i) {
-                    features.push(new OpenLayers.Feature.Vector(collection[i]));
-                    if (!bounds) {
-                        bounds = collection[i].getBounds();
-                    }
-                    bounds.extend(collection[i].getBounds());
-                    
-                }
-                vectors.addFeatures(features);
-                map.zoomToExtent(bounds);
-                var plural = (features.length > 1) ? 's' : '';
-                element.value = 'Feature' + plural + ' added'
-            } else {
-                element.value = 'Bad WKT';
-            }
-        }
-        // -->
-    </script>
-  </head>
-  <body onload="init()">
-    <h1>OpenLayers WKT Example</h1>
-    <div id="info"></div>
-    <div id="map"></div>
-    <div id="controls">
-        <p>See <a href="http://en.wikipedia.org/wiki/Well-known_text#Geometric_Objects">Wikipedia</a>
-        for a description and examples of WKT.</p>
-        <div id="wktInput">
-            <textarea id="wkt" rows="6" cols="30">paste WKT here...</textarea>
-            <br />
-            <input type="button" value="add feature" onclick="parseWKT();" />
-        </div>
-        <ul id="controlToggle">
-            <li>
-                <input type="radio" name="type" value="none" id="noneToggle"
-                       onclick="toggleControl(this);" checked="checked" />
-                <label for="noneToggle">navigate</label>
-            </li>
-            <li>
-                <input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
-                <label for="pointToggle">draw point</label>
-            </li>
-            <li>
-                <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
-                <label for="lineToggle">draw line</label>
-            </li>
-            <li>
-                <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
-                <label for="polygonToggle">draw polygon</label>
-            </li>
-            <li>
-                <input type="radio" name="type" value="hover" id="hoverToggle"
-                       onclick="toggleControl(this);" />
-                <label for="hoverToggle">view WKT for feature</label>
-            </li>
-        </ul>
-    </div>
-  </body>
-</html>

Copied: tags/openlayers/release-2.4-rc4/examples/wkt.html (from rev 3177, branches/openlayers/2.4/examples/wkt.html)
===================================================================
--- tags/openlayers/release-2.4-rc4/examples/wkt.html	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/examples/wkt.html	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,152 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>WKT</title>
+    <style type="text/css">
+        #info {
+            position: absolute;
+            top: 70px;
+            left: 550px;
+            width: 350px;
+        }
+        #map {
+            width: 512px;
+            height: 350px;
+            border: 1px solid gray;
+        }
+        #controls {
+            width: 512px;
+        }
+        #wktInput {
+            float: right;
+        }
+        #controlToggle {
+            padding-left: 1em;
+        }
+        #controlToggle li {
+            list-style: none;
+        }
+    </style>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        <!--
+        var map, vectors, drawControls, wkt;
+        function init(){
+            map = new OpenLayers.Map('map');
+            var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
+                "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); 
+
+            vectors = new OpenLayers.Layer.Vector("Vector Layer");
+
+            map.addLayers([wms, vectors]);
+            map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.addControl(new OpenLayers.Control.MousePosition());
+            
+            var options = {
+                hover: true,
+                onSelect: displayWKT
+            };
+
+            drawControls = {
+                point: new OpenLayers.Control.DrawFeature(vectors,
+                            OpenLayers.Handler.Point),
+                line: new OpenLayers.Control.DrawFeature(vectors,
+                            OpenLayers.Handler.Path),
+                polygon: new OpenLayers.Control.DrawFeature(vectors,
+                            OpenLayers.Handler.Polygon),
+                hover: new OpenLayers.Control.SelectFeature(vectors, options)
+            };
+            
+            for(var key in drawControls) {
+                map.addControl(drawControls[key]);
+            }
+            
+            wkt = new OpenLayers.Format.WKT();
+            
+            map.setCenter(new OpenLayers.LonLat(0, 0), 3);
+            document.getElementById('noneToggle').checked = true;
+        }
+
+        function toggleControl(element) {
+            for(key in drawControls) {
+                var control = drawControls[key];
+                if(element.value == key && element.checked) {
+                    control.activate();
+                } else {
+                    control.deactivate();
+                }
+            }
+        }
+        
+        function displayWKT(feature) {
+            var str = wkt.write(feature);
+            // not a good idea in general, just for this demo
+            str = str.replace(/,/g, ', ');
+            document.getElementById('info').innerHTML = str;
+        }
+
+        function parseWKT() {
+            var element = document.getElementById('wkt');
+            var features = wkt.read(element.value);
+            var bounds;
+            if(features) {
+                if(features.constructor != Array) {
+                    features = [features];
+                }
+                for(var i=0; i<features.length; ++i) {
+                    if (!bounds) {
+                        bounds = features[i].geometry.getBounds();
+                    } else {
+                        bounds.extend(features[i].geometry.getBounds());
+                    }
+                    
+                }
+                vectors.addFeatures(features);
+                map.zoomToExtent(bounds);
+                var plural = (features.length > 1) ? 's' : '';
+                element.value = 'Feature' + plural + ' added'
+            } else {
+                element.value = 'Bad WKT';
+            }
+        }
+        // -->
+    </script>
+  </head>
+  <body onload="init()">
+    <h1>OpenLayers WKT Example</h1>
+    <div id="info"></div>
+    <div id="map"></div>
+    <div id="controls">
+        <p>See <a href="http://en.wikipedia.org/wiki/Well-known_text#Geometric_Objects">Wikipedia</a>
+        for a description and examples of WKT.</p>
+        <div id="wktInput">
+            <textarea id="wkt" rows="6" cols="30">paste WKT here...</textarea>
+            <br />
+            <input type="button" value="add feature" onclick="parseWKT();" />
+        </div>
+        <ul id="controlToggle">
+            <li>
+                <input type="radio" name="type" value="none" id="noneToggle"
+                       onclick="toggleControl(this);" checked="checked" />
+                <label for="noneToggle">navigate</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
+                <label for="pointToggle">draw point</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
+                <label for="lineToggle">draw line</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
+                <label for="polygonToggle">draw polygon</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="hover" id="hoverToggle"
+                       onclick="toggleControl(this);" />
+                <label for="hoverToggle">view WKT for feature</label>
+            </li>
+        </ul>
+    </div>
+  </body>
+</html>

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Ajax.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Ajax.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Ajax.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Deleted: tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/BaseTypes.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,938 +0,0 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
- * for the full text of the license. */
-
-
-/* OpenLayers.Class metaclass */
-OpenLayers.Class = {
-    isPrototype: function () {}, // magic anonymous value
-
-    create: function() {
-        return function() {
-            if (arguments && arguments[0] != OpenLayers.Class.isPrototype)
-                this.initialize.apply(this, arguments);
-        }
-    },
- 
-    inherit: function () {
-        var superClass = arguments[0];
-        var proto = new superClass(OpenLayers.Class.isPrototype);
-        for (var i = 1; i < arguments.length; i++) {
-            if (typeof arguments[i] == "function") {
-                var mixin = arguments[i];
-                arguments[i] = new mixin(OpenLayers.Class.isPrototype);
-            }
-            OpenLayers.Util.extend(proto, arguments[i]);
-
-            // This is a hack for IE see
-            // http://trac.openlayers.org/attachment/ticket/552
-            // 
-            // The problem is that ie doesnt recognize toString as a property
-            //  so the util.extend() doesnt copy it over. we do it manually.
-            // 
-            // to be revisited in 3.0
-            // 
-            if (arguments[i].hasOwnProperty('toString')) {
-                proto.toString = arguments[i].toString;
-            }
-        }
-        return proto;
-    }
-};
-
-/*
-    OpenLayers.Class.inherit( OpenLayers.Layer.Grid, OpenLayers.Layer.HTTPRequest, {
-        some stuff
-    });
-*/
-
-/*********************
- *                   *
- *      PIXEL        * 
- *                   * 
- *********************/
-
-/**
- * @class 
- * 
- * This class represents a screen coordinate, in x and y coordinates
- */
-OpenLayers.Pixel = OpenLayers.Class.create();
-OpenLayers.Pixel.prototype = {
-    
-    /** @type float */
-    x: 0.0,
-
-    /** @type float */
-    y: 0.0,
-    
-    /** 
-    * @constructor
-    *
-    * @param {float} x
-    * @param {float} y
-    */
-    initialize: function(x, y) {
-        this.x = parseFloat(x);
-        this.y = parseFloat(y);
-    },
-    
-    /**
-    * @return string representation of Pixel. ex: "x=200.4,y=242.2"
-    * @type str
-    */
-    toString:function() {
-        return ("x=" + this.x + ",y=" + this.y);
-    },
-
-    /**
-     * @type OpenLayers.Pixel
-     */
-    clone:function() {
-        return new OpenLayers.Pixel(this.x, this.y); 
-    },
-    
-    /** 
-    * @param {OpenLayers.Pixel} px
-    * 
-    * @return whether or not the point passed in as parameter is equal to this
-    *          note that if px passed in is null, returns false
-    * @type bool
-    */
-    equals:function(px) {
-        var equals = false;
-        if (px != null) {
-            equals = ((this.x == px.x && this.y == px.y) ||
-                      (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));
-        }
-        return equals;
-    },
-
-    /**
-    * @param {int} x
-    * @param {int} y
-    * 
-    * @return a new Pixel with this pixel's x&y augmented by the 
-    *         values passed in.
-    * @type OpenLayers.Pixel
-    */
-    add:function(x, y) {
-        return new OpenLayers.Pixel(this.x + x, this.y + y);
-    },
-
-    /**
-    * @param {OpenLayers.Pixel} px
-    * 
-    * @return a new Pixel with this pixel's x&y augmented by the 
-    *         x&y values of the pixel passed in.
-    * @type OpenLayers.Pixel
-    */
-    offset:function(px) {
-        var newPx = this.clone();
-        if (px) {
-            newPx = this.add(px.x, px.y);
-        }
-        return newPx;
-    },
-    
-    /** @final @type str */
-    CLASS_NAME: "OpenLayers.Pixel"
-};
-
-
-/*********************
- *                   *
- *      SIZE         * 
- *                   * 
- *********************/
-
-
-/**
-* @class 
-* 
-* This class represents a width and height pair
-*/
-OpenLayers.Size = OpenLayers.Class.create();
-OpenLayers.Size.prototype = {
-
-    /** @type float */
-    w: 0.0,
-    
-    /** @type float */
-    h: 0.0,
-
-
-    /** 
-    * @constructor
-    * 
-    * @param {float} w 
-    * @param {float} h 
-    */
-    initialize: function(w, h) {
-        this.w = parseFloat(w);
-        this.h = parseFloat(h);
-    },
-
-    /** 
-    * @return String representation of OpenLayers.Size object. 
-    *         (ex. <i>"w=55,h=66"</i>)
-    * @type String
-    */
-    toString:function() {
-        return ("w=" + this.w + ",h=" + this.h);
-    },
-
-    /** 
-     * @return New OpenLayers.Size object with the same w and h values
-     * @type OpenLayers.Size
-     */
-    clone:function() {
-        return new OpenLayers.Size(this.w, this.h);
-    },
-
-    /** 
-    * @param {OpenLayers.Size} sz
-    * @returns Boolean value indicating whether the passed-in OpenLayers.Size 
-    *          object has the same w and h components as this
-    *          note that if sz passed in is null, returns false
-    *
-    * @type bool
-    */
-    equals:function(sz) {
-        var equals = false;
-        if (sz != null) {
-            equals = ((this.w == sz.w && this.h == sz.h) ||
-                      (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));
-        }
-        return equals;
-    },
-    
-    /** @final @type String */
-    CLASS_NAME: "OpenLayers.Size"
-};
-
-/*********************
- *                   *
- *      LONLAT       * 
- *                   * 
- *********************/
-
-
-/**
-* @class 
-* 
-* This class represents a longitude and latitude pair
-*/
-OpenLayers.LonLat = OpenLayers.Class.create();
-OpenLayers.LonLat.prototype = {
-
-    /** @type float */
-    lon: 0.0,
-    
-    /** @type float */
-    lat: 0.0,
-
-    /**
-    * @constructor
-    * 
-    * @param {float} lon
-    * @param {float} lat
-    */
-    initialize: function(lon, lat) {
-        this.lon = parseFloat(lon);
-        this.lat = parseFloat(lat);
-    },
-    
-    /** 
-    * @return String representation of OpenLayers.LonLat object. 
-    *         (ex. <i>"lon=5,lat=42"</i>)
-    * @type String
-    */
-    toString:function() {
-        return ("lon=" + this.lon + ",lat=" + this.lat);
-    },
-
-    /** 
-    * @return Shortened String representation of OpenLayers.LonLat object. 
-    *         (ex. <i>"5, 42"</i>)
-    * @type String
-    */
-    toShortString:function() {
-        return (this.lon + ", " + this.lat);
-    },
-
-    /** 
-     * @return New OpenLayers.LonLat object with the same lon and lat values
-     * @type OpenLayers.LonLat
-     */
-    clone:function() {
-        return new OpenLayers.LonLat(this.lon, this.lat);
-    },
-
-    /** 
-    * @param {float} lon
-    * @param {float} lat
-    *
-    * @return A new OpenLayers.LonLat object with the lon and lat passed-in
-    *         added to this's. 
-    * @type OpenLayers.LonLat
-    */
-    add:function(lon, lat) {
-        return new OpenLayers.LonLat(this.lon + lon, this.lat + lat);
-    },
-
-    /** 
-    * @param {OpenLayers.LonLat} ll
-    * @returns Boolean value indicating whether the passed-in OpenLayers.LonLat
-    *          object has the same lon and lat components as this
-    *          note that if ll passed in is null, returns false
-    *
-    * @type bool
-    */
-    equals:function(ll) {
-        var equals = false;
-        if (ll != null) {
-            equals = ((this.lon == ll.lon && this.lat == ll.lat) ||
-                      (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
-        }
-        return equals;
-    },
-    
-    /** @final @type String */
-    CLASS_NAME: "OpenLayers.LonLat"
-};
-
-/** Alternative constructor that builds a new OpenLayers.LonLat from a 
-*    parameter string
-* 
-* @constructor
-* 
-* @param {String} str Comma-separated Lon,Lat coordinate string. 
-*                     (ex. <i>"5,40"</i>)
-*
-* @returns New OpenLayers.LonLat object built from the passed-in String.
-* @type OpenLayers.LonLat
-*/
-OpenLayers.LonLat.fromString = function(str) {
-    var pair = str.split(",");
-    return new OpenLayers.LonLat(parseFloat(pair[0]), 
-                                 parseFloat(pair[1]));
-};
-
-
-
-/*********************
- *                   *
- *      BOUNDS       * 
- *                   * 
- *********************/
-
-
-
-
-/**
-* @class 
-* 
-* This class represents a bounding box. 
-* Data stored as left, bottom, right, top floats
-*/
-OpenLayers.Bounds = OpenLayers.Class.create();
-OpenLayers.Bounds.prototype = {
-
-    /** @type float */
-    left: 0.0,
-
-    /** @type float */
-    bottom: 0.0,
-
-    /** @type float */
-    right: 0.0,
-
-    /** @type float */
-    top: 0.0,    
-
-    /**
-    * @constructor
-    *
-    * @param {float} left
-    * @param {float} bottom
-    * @param {float} right
-    * @param {float} top
-    *
-    */
-    initialize: function(left, bottom, right, top) {
-        this.left = parseFloat(left);
-        this.bottom = parseFloat(bottom);
-        this.right = parseFloat(right);
-        this.top = parseFloat(top);
-    },
-
-    /**
-     * @returns A fresh copy of the bounds
-     * @type OpenLayers.Bounds
-     */
-    clone:function() {
-        return new OpenLayers.Bounds(this.left, this.bottom, 
-                                     this.right, this.top);
-    },
-
-    /** 
-    * @param {OpenLayers.Bounds} bounds
-    * @returns Boolean value indicating whether the passed-in OpenLayers.Bounds
-    *          object has the same left, right, top, bottom components as this
-    *           note that if bounds passed in is null, returns false
-    *
-    * @type bool
-    */
-    equals:function(bounds) {
-        var equals = false;
-        if (bounds != null) {
-            equals = ((this.left == bounds.left) && 
-                      (this.right == bounds.right) &&
-                      (this.top == bounds.top) && 
-                      (this.bottom == bounds.bottom));
-        }
-        return equals;
-    },
-
-    /** 
-    * @return String representation of OpenLayers.Bounds object. 
-    *         (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
-    * @type String
-    */
-    toString:function() {
-        return ( "left-bottom=(" + this.left + "," + this.bottom + ")"
-                 + " right-top=(" + this.right + "," + this.top + ")" );
-    },
-
-    /** 
-     * @param {int} decimal How many significant digits in the bbox coords?
-     *                      Default is 6
-     * 
-     * @returns Simple String representation of OpenLayers.Bounds object.
-     *         (ex. <i>"5,42,10,45"</i>)
-     * @type String
-     */
-    toBBOX:function(decimal) {
-        if (decimal== null) {
-            decimal = 6; 
-        }
-        var mult = Math.pow(10, decimal);
-        var bbox = Math.round(this.left * mult) / mult + "," + 
-                   Math.round(this.bottom * mult) / mult + "," + 
-                   Math.round(this.right * mult) / mult + "," + 
-                   Math.round(this.top * mult) / mult;
-
-        return bbox;
-    },
-    
-    /**
-    * @returns The width of the bounds
-    * @type float
-    */
-    getWidth:function() {
-        return (this.right - this.left);
-    },
-
-    /**
-    * @returns The height of the bounds
-    * @type float
-    */
-    getHeight:function() {
-        return (this.top - this.bottom);
-    },
-
-    /**
-    * @returns An OpenLayers.Size which represents the size of the box
-    * @type OpenLayers.Size
-    */
-    getSize:function() {
-        return new OpenLayers.Size(this.getWidth(), this.getHeight());
-    },
-
-    /**
-    * @returns An OpenLayers.Pixel which represents the center of the bounds
-    * @type OpenLayers.Pixel
-    */
-    getCenterPixel:function() {
-        return new OpenLayers.Pixel( (this.left + this.right) / 2,
-                                     (this.bottom + this.top) / 2);
-    },
-
-    /**
-    * @returns An OpenLayers.LonLat which represents the center of the bounds
-    * @type OpenLayers.LonLat
-    */
-    getCenterLonLat:function() {
-        return new OpenLayers.LonLat( (this.left + this.right) / 2,
-                                      (this.bottom + this.top) / 2);
-    },
-
-    /**
-    * @param {float} x
-    * @param {float} y
-    *
-    * @returns A new OpenLayers.Bounds whose coordinates are the same as this, 
-    *          but shifted by the passed-in x and y values
-    * @type OpenLayers.Bounds
-    */
-    add:function(x, y) {
-        return new OpenLayers.Bounds(this.left + x, this.bottom + y,
-                                     this.right + x, this.top + y);
-    },
-    
-    /**
-     * Extend the bounds to include the point, lonlat, or bounds specified.
-     * 
-     * This function assumes that left<right and bottom<top.
-     * 
-     * @param {OpenLayers.Bounds|OpenLayers.LonLat|OpenLayers.Geometry.Point} object
-     */
-    extend:function(object) {
-        var bounds = null;
-        if (object) {
-            switch(object.CLASS_NAME) {
-                case "OpenLayers.LonLat":    
-                    bounds = new OpenLayers.Bounds(object.lon, object.lat,
-                                                    object.lon, object.lat);
-                    break;
-                case "OpenLayers.Geometry.Point":
-                    bounds = new OpenLayers.Bounds(object.x, object.y,
-                                                    object.x, object.y);
-                    break;
-                    
-                case "OpenLayers.Bounds":    
-                    bounds = object;
-                    break;
-            }
-    
-            if (bounds) {
-               this.left = (bounds.left < this.left) ? bounds.left 
-                                                     : this.left;
-               this.bottom = (bounds.bottom < this.bottom) ? bounds.bottom 
-                                                           : this.bottom;
-               this.right = (bounds.right > this.right) ? bounds.right 
-                                                        : this.right;
-               this.top = (bounds.top > this.top) ? bounds.top 
-                                                  : this.top;
-            }
-        }
-    },
-
-    /**
-     * @param {OpenLayers.LonLat} ll
-     * @param {Boolean} inclusive Whether or not to include the border. 
-     *                            Default is true
-     *
-     * @return Whether or not the passed-in lonlat is within this bounds
-     * @type Boolean
-     */
-    containsLonLat:function(ll, inclusive) {
-        return this.contains(ll.lon, ll.lat, inclusive);
-    },
-
-    /**
-     * @param {OpenLayers.Pixel} px
-     * @param {Boolean} inclusive Whether or not to include the border. 
-     *                            Default is true
-     *
-     * @return Whether or not the passed-in pixel is within this bounds
-     * @type Boolean
-     */
-    containsPixel:function(px, inclusive) {
-        return this.contains(px.x, px.y, inclusive);
-    },
-    
-    /**
-    * @param {float} x
-    * @param {float} y
-    * @param {Boolean} inclusive Whether or not to include the border. 
-    *                            Default is true
-    *
-    * @return Whether or not the passed-in coordinates are within this bounds
-    * @type Boolean
-    */
-    contains:function(x, y, inclusive) {
-    
-        //set default
-        if (inclusive == null) {
-            inclusive = true;
-        }
-        
-        var contains = false;
-        if (inclusive) {
-            contains = ((x >= this.left) && (x <= this.right) && 
-                        (y >= this.bottom) && (y <= this.top));
-        } else {
-            contains = ((x > this.left) && (x < this.right) && 
-                        (y > this.bottom) && (y < this.top));
-        }              
-        return contains;
-    },
-
-    /**
-     * @param {OpenLayers.Bounds} bounds
-     * @param {Boolean} inclusive Whether or not to include the border. 
-     *                            Default is true
-     *
-     * @return Whether or not the passed-in OpenLayers.Bounds object intersects
-     *         this bounds. Simple math just check if either contains the other, 
-     *         allowing for partial.
-     * @type Boolean
-     */
-    intersectsBounds:function(bounds, inclusive) {
-
-        if (inclusive == null) {
-            inclusive = true;
-        }
-        var inBottom = (bounds.bottom == this.bottom && bounds.top == this.top) ?
-                    true : (((bounds.bottom > this.bottom) && (bounds.bottom < this.top)) || 
-                           ((this.bottom > bounds.bottom) && (this.bottom < bounds.top))); 
-        var inTop = (bounds.bottom == this.bottom && bounds.top == this.top) ?
-                    true : (((bounds.top > this.bottom) && (bounds.top < this.top)) ||
-                           ((this.top > bounds.bottom) && (this.top < bounds.top))); 
-        var inRight = (bounds.right == this.right && bounds.left == this.left) ?
-                    true : (((bounds.right > this.left) && (bounds.right < this.right)) ||
-                           ((this.right > bounds.left) && (this.right < bounds.right))); 
-        var inLeft = (bounds.right == this.right && bounds.left == this.left) ?
-                    true : (((bounds.left > this.left) && (bounds.left < this.right)) || 
-                           ((this.left > bounds.left) && (this.left < bounds.right))); 
-
-        return (this.containsBounds(bounds, true, inclusive) ||
-                bounds.containsBounds(this, true, inclusive) ||
-                ((inTop || inBottom ) && (inLeft || inRight )));
-    },
-    
-    /**
-    * @param {OpenLayers.Bounds} bounds
-    * @param {Boolean} partial If true, only part of passed-in 
-    *                          OpenLayers.Bounds needs be within this bounds. 
-    *                          If false, the entire passed-in bounds must be
-    *                          within. Default is false
-    * @param {Boolean} inclusive Whether or not to include the border. 
-    *                            Default is true
-    *
-    * @return Whether or not the passed-in OpenLayers.Bounds object is 
-    *         contained within this bounds. 
-    * @type Boolean
-    */
-    containsBounds:function(bounds, partial, inclusive) {
-
-        //set defaults
-        if (partial == null) {
-            partial = false;
-        }
-        if (inclusive == null) {
-            inclusive = true;
-        }
-
-        var inLeft;
-        var inTop;
-        var inRight;
-        var inBottom;
-        
-        if (inclusive) {
-            inLeft = (bounds.left >= this.left) && (bounds.left <= this.right);
-            inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top);
-            inRight= (bounds.right >= this.left) && (bounds.right <= this.right);
-            inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top);
-        } else {
-            inLeft = (bounds.left > this.left) && (bounds.left < this.right);
-            inTop = (bounds.top > this.bottom) && (bounds.top < this.top);
-            inRight= (bounds.right > this.left) && (bounds.right < this.right);
-            inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top);
-        }
-        
-        return (partial) ? (inTop || inBottom ) && (inLeft || inRight ) 
-                         : (inTop && inLeft && inBottom && inRight);
-    },
-
-    /** 
-     * @param {OpenLayers.LonLat} lonlat
-     *
-     * @returns The quadrant ("br" "tr" "tl" "bl") of the bounds in which 
-     *           the coordinate lies.
-     * @type String
-     */
-    determineQuadrant: function(lonlat) {
-    
-        var quadrant = "";
-        var center = this.getCenterLonLat();
-        
-        quadrant += (lonlat.lat < center.lat) ? "b" : "t";
-        quadrant += (lonlat.lon < center.lon) ? "l" : "r";
-    
-        return quadrant; 
-    },
-
-    /** @final @type String */
-    CLASS_NAME: "OpenLayers.Bounds"
-};
-
-/** Alternative constructor that builds a new OpenLayers.Bounds from a 
-*    parameter string
-* 
-* @constructor
-* 
-* @param {String} str Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
-*
-* @returns New OpenLayers.Bounds object built from the passed-in String.
-* @type OpenLayers.Bounds
-*/
-OpenLayers.Bounds.fromString = function(str) {
-    var bounds = str.split(",");
-    return OpenLayers.Bounds.fromArray(bounds);
-};
-
-/** Alternative constructor that builds a new OpenLayers.Bounds
-*    from an array
-* 
-* @constructor
-* 
-* @param {Array} bbox Array of bounds values (ex. <i>[5,42,10,45]</i>)
-*
-* @returns New OpenLayers.Bounds object built from the passed-in Array.
-* @type OpenLayers.Bounds
-*/
-OpenLayers.Bounds.fromArray = function(bbox) {
-    return new OpenLayers.Bounds(parseFloat(bbox[0]),
-                                 parseFloat(bbox[1]),
-                                 parseFloat(bbox[2]),
-                                 parseFloat(bbox[3]));
-};
-
-/** Alternative constructor that builds a new OpenLayers.Bounds
-*    from an OpenLayers.Size
-* 
-* @constructor
-* 
-* @param {OpenLayers.Size} size
-*            
-* @returns New OpenLayers.Bounds object built with top and left set to 0 and
-*           bottom right taken from the passed-in OpenLayers.Size.
-* @type OpenLayers.Bounds
-*/
-OpenLayers.Bounds.fromSize = function(size) {
-    return new OpenLayers.Bounds(0,
-                                 size.h,
-                                 size.w,
-                                 0);
-};
-/**
- * @param {String} quadrant 
- * 
- * @returns The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if 
- *           you pass in "bl" it returns "tr", if you pass in "br" it 
- *           returns "tl", etc.
- * @type String
- */
-OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
-    var opp = "";
-    
-    opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
-    opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
-    
-    return opp;
-};
-
-
-/*********************
- *                   *
- *      ELEMENT      * 
- *                   * 
- *********************/
-
-OpenLayers.Element = {
-  visible: function(element) {
-    return OpenLayers.Util.getElement(element).style.display != 'none';
-  },
-
-  toggle: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = OpenLayers.Util.getElement(arguments[i]);
-      OpenLayers.Element[OpenLayers.Element.visible(element) ? 'hide' : 'show'](element);
-    }
-  },
-
-  hide: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = OpenLayers.Util.getElement(arguments[i]);
-      element.style.display = 'none';
-    }
-  },
-
-  show: function() {
-    for (var i = 0; i < arguments.length; i++) {
-      var element = OpenLayers.Util.getElement(arguments[i]);
-      element.style.display = '';
-    }
-  },
-
-  remove: function(element) {
-    element = OpenLayers.Util.getElement(element);
-    element.parentNode.removeChild(element);
-  },
-
-  getHeight: function(element) {
-    element = OpenLayers.Util.getElement(element);
-    return element.offsetHeight;
-  },
-
-  getDimensions: function(element) {
-    element = OpenLayers.Util.getElement(element);
-    if (OpenLayers.Element.getStyle(element, 'display') != 'none')
-      return {width: element.offsetWidth, height: element.offsetHeight};
-
-    // All *Width and *Height properties give 0 on elements with display none,
-    // so enable the element temporarily
-    var els = element.style;
-    var originalVisibility = els.visibility;
-    var originalPosition = els.position;
-    els.visibility = 'hidden';
-    els.position = 'absolute';
-    els.display = '';
-    var originalWidth = element.clientWidth;
-    var originalHeight = element.clientHeight;
-    els.display = 'none';
-    els.position = originalPosition;
-    els.visibility = originalVisibility;
-    return {width: originalWidth, height: originalHeight};
-  },
-
-  getStyle: function(element, style) {
-    element = OpenLayers.Util.getElement(element);
-    var value = element.style[style.camelize()];
-    if (!value) {
-      if (document.defaultView && document.defaultView.getComputedStyle) {
-        var css = document.defaultView.getComputedStyle(element, null);
-        value = css ? css.getPropertyValue(style) : null;
-      } else if (element.currentStyle) {
-        value = element.currentStyle[style.camelize()];
-      }
-    }
-
-    if (window.opera && OpenLayers.Util.indexOf(['left', 'top', 'right', 'bottom'],style) != -1)
-      if (OpenLayers.Element.getStyle(element, 'position') == 'static') value = 'auto';
-
-    return value == 'auto' ? null : value;
-  }
-
-};
-
-/*********************
- *                   *
- *      STRING       * 
- *                   * 
- *********************/
-
-/**
-* @param {String} sStart
-* 
-* @returns Whether or not this string starts with the string passed in.
-* @type Boolean
-*/
-String.prototype.startsWith = function(sStart) {
-    return (this.substr(0,sStart.length) == sStart);
-};
-
-/**
-* @param {String} str
-* 
-* @returns Whether or not this string contains with the string passed in.
-* @type Boolean
-*/
-String.prototype.contains = function(str) {
-    return (this.indexOf(str) != -1);
-};
-
-/**
-* @returns A trimmed version of the string - all leading and 
-*          trailing spaces removed
-* @type String
-*/
-String.prototype.trim = function() {
-    
-    var b = 0;
-    while(this.substr(b,1) == " ") {
-        b++;
-    }
-    
-    var e = this.length - 1;
-    while(this.substr(e,1) == " ") {
-        e--;
-    }
-    
-    return this.substring(b, e+1);
-};
-
-
-String.indexOf = function(object) {
- for (var i = 0; i < this.length; i++)
-     if (this[i] == object) return i;
- return -1;
-};
-
-String.prototype.camelize = function() {
-    var oStringList = this.split('-');
-    if (oStringList.length == 1) return oStringList[0];
-
-    var camelizedString = this.indexOf('-') == 0
-      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
-      : oStringList[0];
-
-    for (var i = 1, len = oStringList.length; i < len; i++) {
-      var s = oStringList[i];
-      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
-    }
-
-    return camelizedString;
-};
-
-
-/*********************
- *                   *
- *      NUMBER       * 
- *                   * 
- *********************/
-
-/** NOTE: Works only with integer values does *not* work with floats!
- * 
- * @param {int} sig
- * 
- * @returns The number, rounded to the specified number of significant digits.
- *          If null, 0, or negaive value passed in, returns 0
- * @type int
- */
-Number.prototype.limitSigDigs = function(sig) {
-    var number = (sig > 0) ? this.toString() : 0;
-    if (sig < number.length) {
-        var exp = number.length - sig;
-        number = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp);
-    }
-    return parseInt(number);
-}
-
-
-/*********************
- *                   *
- *      FUNCTION     * 
- *                   * 
- *********************/
-
-Function.prototype.bind = function() {
-  var __method = this, args = [], object = arguments[0];
-  for (var i = 1; i < arguments.length; i++)
-    args.push(arguments[i]);
-  return function(moreargs) {
-    for (var i = 0; i < arguments.length; i++)
-      args.push(arguments[i]);
-    return __method.apply(object, args);
-  }
-};
-
-Function.prototype.bindAsEventListener = function(object) {
-  var __method = this;
-  return function(event) {
-    return __method.call(object, event || window.event);
-  }
-};

Copied: tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js (from rev 3177, branches/openlayers/2.4/lib/OpenLayers/BaseTypes.js)
===================================================================
--- tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js	                        (rev 0)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/BaseTypes.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -0,0 +1,939 @@
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
+ * for the full text of the license. */
+
+
+/* OpenLayers.Class metaclass */
+OpenLayers.Class = {
+    isPrototype: function () {}, // magic anonymous value
+
+    create: function() {
+        return function() {
+            if (arguments && arguments[0] != OpenLayers.Class.isPrototype)
+                this.initialize.apply(this, arguments);
+        }
+    },
+ 
+    inherit: function () {
+        var superClass = arguments[0];
+        var proto = new superClass(OpenLayers.Class.isPrototype);
+        for (var i = 1; i < arguments.length; i++) {
+            if (typeof arguments[i] == "function") {
+                var mixin = arguments[i];
+                arguments[i] = new mixin(OpenLayers.Class.isPrototype);
+            }
+            OpenLayers.Util.extend(proto, arguments[i]);
+
+            // This is a hack for IE see
+            // http://trac.openlayers.org/attachment/ticket/552
+            // 
+            // The problem is that ie doesnt recognize toString as a property
+            //  so the util.extend() doesnt copy it over. we do it manually.
+            // 
+            // to be revisited in 3.0
+            //
+            if((arguments[i].hasOwnProperty && arguments[i].hasOwnProperty('toString')) ||
+               (!arguments[i].hasOwnProperty && arguments[i].toString)) {
+                proto.toString = arguments[i].toString;
+            }
+        }
+        return proto;
+    }
+};
+
+/*
+    OpenLayers.Class.inherit( OpenLayers.Layer.Grid, OpenLayers.Layer.HTTPRequest, {
+        some stuff
+    });
+*/
+
+/*********************
+ *                   *
+ *      PIXEL        * 
+ *                   * 
+ *********************/
+
+/**
+ * @class 
+ * 
+ * This class represents a screen coordinate, in x and y coordinates
+ */
+OpenLayers.Pixel = OpenLayers.Class.create();
+OpenLayers.Pixel.prototype = {
+    
+    /** @type float */
+    x: 0.0,
+
+    /** @type float */
+    y: 0.0,
+    
+    /** 
+    * @constructor
+    *
+    * @param {float} x
+    * @param {float} y
+    */
+    initialize: function(x, y) {
+        this.x = parseFloat(x);
+        this.y = parseFloat(y);
+    },
+    
+    /**
+    * @return string representation of Pixel. ex: "x=200.4,y=242.2"
+    * @type str
+    */
+    toString:function() {
+        return ("x=" + this.x + ",y=" + this.y);
+    },
+
+    /**
+     * @type OpenLayers.Pixel
+     */
+    clone:function() {
+        return new OpenLayers.Pixel(this.x, this.y); 
+    },
+    
+    /** 
+    * @param {OpenLayers.Pixel} px
+    * 
+    * @return whether or not the point passed in as parameter is equal to this
+    *          note that if px passed in is null, returns false
+    * @type bool
+    */
+    equals:function(px) {
+        var equals = false;
+        if (px != null) {
+            equals = ((this.x == px.x && this.y == px.y) ||
+                      (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));
+        }
+        return equals;
+    },
+
+    /**
+    * @param {int} x
+    * @param {int} y
+    * 
+    * @return a new Pixel with this pixel's x&y augmented by the 
+    *         values passed in.
+    * @type OpenLayers.Pixel
+    */
+    add:function(x, y) {
+        return new OpenLayers.Pixel(this.x + x, this.y + y);
+    },
+
+    /**
+    * @param {OpenLayers.Pixel} px
+    * 
+    * @return a new Pixel with this pixel's x&y augmented by the 
+    *         x&y values of the pixel passed in.
+    * @type OpenLayers.Pixel
+    */
+    offset:function(px) {
+        var newPx = this.clone();
+        if (px) {
+            newPx = this.add(px.x, px.y);
+        }
+        return newPx;
+    },
+    
+    /** @final @type str */
+    CLASS_NAME: "OpenLayers.Pixel"
+};
+
+
+/*********************
+ *                   *
+ *      SIZE         * 
+ *                   * 
+ *********************/
+
+
+/**
+* @class 
+* 
+* This class represents a width and height pair
+*/
+OpenLayers.Size = OpenLayers.Class.create();
+OpenLayers.Size.prototype = {
+
+    /** @type float */
+    w: 0.0,
+    
+    /** @type float */
+    h: 0.0,
+
+
+    /** 
+    * @constructor
+    * 
+    * @param {float} w 
+    * @param {float} h 
+    */
+    initialize: function(w, h) {
+        this.w = parseFloat(w);
+        this.h = parseFloat(h);
+    },
+
+    /** 
+    * @return String representation of OpenLayers.Size object. 
+    *         (ex. <i>"w=55,h=66"</i>)
+    * @type String
+    */
+    toString:function() {
+        return ("w=" + this.w + ",h=" + this.h);
+    },
+
+    /** 
+     * @return New OpenLayers.Size object with the same w and h values
+     * @type OpenLayers.Size
+     */
+    clone:function() {
+        return new OpenLayers.Size(this.w, this.h);
+    },
+
+    /** 
+    * @param {OpenLayers.Size} sz
+    * @returns Boolean value indicating whether the passed-in OpenLayers.Size 
+    *          object has the same w and h components as this
+    *          note that if sz passed in is null, returns false
+    *
+    * @type bool
+    */
+    equals:function(sz) {
+        var equals = false;
+        if (sz != null) {
+            equals = ((this.w == sz.w && this.h == sz.h) ||
+                      (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));
+        }
+        return equals;
+    },
+    
+    /** @final @type String */
+    CLASS_NAME: "OpenLayers.Size"
+};
+
+/*********************
+ *                   *
+ *      LONLAT       * 
+ *                   * 
+ *********************/
+
+
+/**
+* @class 
+* 
+* This class represents a longitude and latitude pair
+*/
+OpenLayers.LonLat = OpenLayers.Class.create();
+OpenLayers.LonLat.prototype = {
+
+    /** @type float */
+    lon: 0.0,
+    
+    /** @type float */
+    lat: 0.0,
+
+    /**
+    * @constructor
+    * 
+    * @param {float} lon
+    * @param {float} lat
+    */
+    initialize: function(lon, lat) {
+        this.lon = parseFloat(lon);
+        this.lat = parseFloat(lat);
+    },
+    
+    /** 
+    * @return String representation of OpenLayers.LonLat object. 
+    *         (ex. <i>"lon=5,lat=42"</i>)
+    * @type String
+    */
+    toString:function() {
+        return ("lon=" + this.lon + ",lat=" + this.lat);
+    },
+
+    /** 
+    * @return Shortened String representation of OpenLayers.LonLat object. 
+    *         (ex. <i>"5, 42"</i>)
+    * @type String
+    */
+    toShortString:function() {
+        return (this.lon + ", " + this.lat);
+    },
+
+    /** 
+     * @return New OpenLayers.LonLat object with the same lon and lat values
+     * @type OpenLayers.LonLat
+     */
+    clone:function() {
+        return new OpenLayers.LonLat(this.lon, this.lat);
+    },
+
+    /** 
+    * @param {float} lon
+    * @param {float} lat
+    *
+    * @return A new OpenLayers.LonLat object with the lon and lat passed-in
+    *         added to this's. 
+    * @type OpenLayers.LonLat
+    */
+    add:function(lon, lat) {
+        return new OpenLayers.LonLat(this.lon + lon, this.lat + lat);
+    },
+
+    /** 
+    * @param {OpenLayers.LonLat} ll
+    * @returns Boolean value indicating whether the passed-in OpenLayers.LonLat
+    *          object has the same lon and lat components as this
+    *          note that if ll passed in is null, returns false
+    *
+    * @type bool
+    */
+    equals:function(ll) {
+        var equals = false;
+        if (ll != null) {
+            equals = ((this.lon == ll.lon && this.lat == ll.lat) ||
+                      (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
+        }
+        return equals;
+    },
+    
+    /** @final @type String */
+    CLASS_NAME: "OpenLayers.LonLat"
+};
+
+/** Alternative constructor that builds a new OpenLayers.LonLat from a 
+*    parameter string
+* 
+* @constructor
+* 
+* @param {String} str Comma-separated Lon,Lat coordinate string. 
+*                     (ex. <i>"5,40"</i>)
+*
+* @returns New OpenLayers.LonLat object built from the passed-in String.
+* @type OpenLayers.LonLat
+*/
+OpenLayers.LonLat.fromString = function(str) {
+    var pair = str.split(",");
+    return new OpenLayers.LonLat(parseFloat(pair[0]), 
+                                 parseFloat(pair[1]));
+};
+
+
+
+/*********************
+ *                   *
+ *      BOUNDS       * 
+ *                   * 
+ *********************/
+
+
+
+
+/**
+* @class 
+* 
+* This class represents a bounding box. 
+* Data stored as left, bottom, right, top floats
+*/
+OpenLayers.Bounds = OpenLayers.Class.create();
+OpenLayers.Bounds.prototype = {
+
+    /** @type float */
+    left: 0.0,
+
+    /** @type float */
+    bottom: 0.0,
+
+    /** @type float */
+    right: 0.0,
+
+    /** @type float */
+    top: 0.0,    
+
+    /**
+    * @constructor
+    *
+    * @param {float} left
+    * @param {float} bottom
+    * @param {float} right
+    * @param {float} top
+    *
+    */
+    initialize: function(left, bottom, right, top) {
+        this.left = parseFloat(left);
+        this.bottom = parseFloat(bottom);
+        this.right = parseFloat(right);
+        this.top = parseFloat(top);
+    },
+
+    /**
+     * @returns A fresh copy of the bounds
+     * @type OpenLayers.Bounds
+     */
+    clone:function() {
+        return new OpenLayers.Bounds(this.left, this.bottom, 
+                                     this.right, this.top);
+    },
+
+    /** 
+    * @param {OpenLayers.Bounds} bounds
+    * @returns Boolean value indicating whether the passed-in OpenLayers.Bounds
+    *          object has the same left, right, top, bottom components as this
+    *           note that if bounds passed in is null, returns false
+    *
+    * @type bool
+    */
+    equals:function(bounds) {
+        var equals = false;
+        if (bounds != null) {
+            equals = ((this.left == bounds.left) && 
+                      (this.right == bounds.right) &&
+                      (this.top == bounds.top) && 
+                      (this.bottom == bounds.bottom));
+        }
+        return equals;
+    },
+
+    /** 
+    * @return String representation of OpenLayers.Bounds object. 
+    *         (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
+    * @type String
+    */
+    toString:function() {
+        return ( "left-bottom=(" + this.left + "," + this.bottom + ")"
+                 + " right-top=(" + this.right + "," + this.top + ")" );
+    },
+
+    /** 
+     * @param {int} decimal How many significant digits in the bbox coords?
+     *                      Default is 6
+     * 
+     * @returns Simple String representation of OpenLayers.Bounds object.
+     *         (ex. <i>"5,42,10,45"</i>)
+     * @type String
+     */
+    toBBOX:function(decimal) {
+        if (decimal== null) {
+            decimal = 6; 
+        }
+        var mult = Math.pow(10, decimal);
+        var bbox = Math.round(this.left * mult) / mult + "," + 
+                   Math.round(this.bottom * mult) / mult + "," + 
+                   Math.round(this.right * mult) / mult + "," + 
+                   Math.round(this.top * mult) / mult;
+
+        return bbox;
+    },
+    
+    /**
+    * @returns The width of the bounds
+    * @type float
+    */
+    getWidth:function() {
+        return (this.right - this.left);
+    },
+
+    /**
+    * @returns The height of the bounds
+    * @type float
+    */
+    getHeight:function() {
+        return (this.top - this.bottom);
+    },
+
+    /**
+    * @returns An OpenLayers.Size which represents the size of the box
+    * @type OpenLayers.Size
+    */
+    getSize:function() {
+        return new OpenLayers.Size(this.getWidth(), this.getHeight());
+    },
+
+    /**
+    * @returns An OpenLayers.Pixel which represents the center of the bounds
+    * @type OpenLayers.Pixel
+    */
+    getCenterPixel:function() {
+        return new OpenLayers.Pixel( (this.left + this.right) / 2,
+                                     (this.bottom + this.top) / 2);
+    },
+
+    /**
+    * @returns An OpenLayers.LonLat which represents the center of the bounds
+    * @type OpenLayers.LonLat
+    */
+    getCenterLonLat:function() {
+        return new OpenLayers.LonLat( (this.left + this.right) / 2,
+                                      (this.bottom + this.top) / 2);
+    },
+
+    /**
+    * @param {float} x
+    * @param {float} y
+    *
+    * @returns A new OpenLayers.Bounds whose coordinates are the same as this, 
+    *          but shifted by the passed-in x and y values
+    * @type OpenLayers.Bounds
+    */
+    add:function(x, y) {
+        return new OpenLayers.Bounds(this.left + x, this.bottom + y,
+                                     this.right + x, this.top + y);
+    },
+    
+    /**
+     * Extend the bounds to include the point, lonlat, or bounds specified.
+     * 
+     * This function assumes that left<right and bottom<top.
+     * 
+     * @param {OpenLayers.Bounds|OpenLayers.LonLat|OpenLayers.Geometry.Point} object
+     */
+    extend:function(object) {
+        var bounds = null;
+        if (object) {
+            switch(object.CLASS_NAME) {
+                case "OpenLayers.LonLat":    
+                    bounds = new OpenLayers.Bounds(object.lon, object.lat,
+                                                    object.lon, object.lat);
+                    break;
+                case "OpenLayers.Geometry.Point":
+                    bounds = new OpenLayers.Bounds(object.x, object.y,
+                                                    object.x, object.y);
+                    break;
+                    
+                case "OpenLayers.Bounds":    
+                    bounds = object;
+                    break;
+            }
+    
+            if (bounds) {
+               this.left = (bounds.left < this.left) ? bounds.left 
+                                                     : this.left;
+               this.bottom = (bounds.bottom < this.bottom) ? bounds.bottom 
+                                                           : this.bottom;
+               this.right = (bounds.right > this.right) ? bounds.right 
+                                                        : this.right;
+               this.top = (bounds.top > this.top) ? bounds.top 
+                                                  : this.top;
+            }
+        }
+    },
+
+    /**
+     * @param {OpenLayers.LonLat} ll
+     * @param {Boolean} inclusive Whether or not to include the border. 
+     *                            Default is true
+     *
+     * @return Whether or not the passed-in lonlat is within this bounds
+     * @type Boolean
+     */
+    containsLonLat:function(ll, inclusive) {
+        return this.contains(ll.lon, ll.lat, inclusive);
+    },
+
+    /**
+     * @param {OpenLayers.Pixel} px
+     * @param {Boolean} inclusive Whether or not to include the border. 
+     *                            Default is true
+     *
+     * @return Whether or not the passed-in pixel is within this bounds
+     * @type Boolean
+     */
+    containsPixel:function(px, inclusive) {
+        return this.contains(px.x, px.y, inclusive);
+    },
+    
+    /**
+    * @param {float} x
+    * @param {float} y
+    * @param {Boolean} inclusive Whether or not to include the border. 
+    *                            Default is true
+    *
+    * @return Whether or not the passed-in coordinates are within this bounds
+    * @type Boolean
+    */
+    contains:function(x, y, inclusive) {
+    
+        //set default
+        if (inclusive == null) {
+            inclusive = true;
+        }
+        
+        var contains = false;
+        if (inclusive) {
+            contains = ((x >= this.left) && (x <= this.right) && 
+                        (y >= this.bottom) && (y <= this.top));
+        } else {
+            contains = ((x > this.left) && (x < this.right) && 
+                        (y > this.bottom) && (y < this.top));
+        }              
+        return contains;
+    },
+
+    /**
+     * @param {OpenLayers.Bounds} bounds
+     * @param {Boolean} inclusive Whether or not to include the border. 
+     *                            Default is true
+     *
+     * @return Whether or not the passed-in OpenLayers.Bounds object intersects
+     *         this bounds. Simple math just check if either contains the other, 
+     *         allowing for partial.
+     * @type Boolean
+     */
+    intersectsBounds:function(bounds, inclusive) {
+
+        if (inclusive == null) {
+            inclusive = true;
+        }
+        var inBottom = (bounds.bottom == this.bottom && bounds.top == this.top) ?
+                    true : (((bounds.bottom > this.bottom) && (bounds.bottom < this.top)) || 
+                           ((this.bottom > bounds.bottom) && (this.bottom < bounds.top))); 
+        var inTop = (bounds.bottom == this.bottom && bounds.top == this.top) ?
+                    true : (((bounds.top > this.bottom) && (bounds.top < this.top)) ||
+                           ((this.top > bounds.bottom) && (this.top < bounds.top))); 
+        var inRight = (bounds.right == this.right && bounds.left == this.left) ?
+                    true : (((bounds.right > this.left) && (bounds.right < this.right)) ||
+                           ((this.right > bounds.left) && (this.right < bounds.right))); 
+        var inLeft = (bounds.right == this.right && bounds.left == this.left) ?
+                    true : (((bounds.left > this.left) && (bounds.left < this.right)) || 
+                           ((this.left > bounds.left) && (this.left < bounds.right))); 
+
+        return (this.containsBounds(bounds, true, inclusive) ||
+                bounds.containsBounds(this, true, inclusive) ||
+                ((inTop || inBottom ) && (inLeft || inRight )));
+    },
+    
+    /**
+    * @param {OpenLayers.Bounds} bounds
+    * @param {Boolean} partial If true, only part of passed-in 
+    *                          OpenLayers.Bounds needs be within this bounds. 
+    *                          If false, the entire passed-in bounds must be
+    *                          within. Default is false
+    * @param {Boolean} inclusive Whether or not to include the border. 
+    *                            Default is true
+    *
+    * @return Whether or not the passed-in OpenLayers.Bounds object is 
+    *         contained within this bounds. 
+    * @type Boolean
+    */
+    containsBounds:function(bounds, partial, inclusive) {
+
+        //set defaults
+        if (partial == null) {
+            partial = false;
+        }
+        if (inclusive == null) {
+            inclusive = true;
+        }
+
+        var inLeft;
+        var inTop;
+        var inRight;
+        var inBottom;
+        
+        if (inclusive) {
+            inLeft = (bounds.left >= this.left) && (bounds.left <= this.right);
+            inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top);
+            inRight= (bounds.right >= this.left) && (bounds.right <= this.right);
+            inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top);
+        } else {
+            inLeft = (bounds.left > this.left) && (bounds.left < this.right);
+            inTop = (bounds.top > this.bottom) && (bounds.top < this.top);
+            inRight= (bounds.right > this.left) && (bounds.right < this.right);
+            inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top);
+        }
+        
+        return (partial) ? (inTop || inBottom ) && (inLeft || inRight ) 
+                         : (inTop && inLeft && inBottom && inRight);
+    },
+
+    /** 
+     * @param {OpenLayers.LonLat} lonlat
+     *
+     * @returns The quadrant ("br" "tr" "tl" "bl") of the bounds in which 
+     *           the coordinate lies.
+     * @type String
+     */
+    determineQuadrant: function(lonlat) {
+    
+        var quadrant = "";
+        var center = this.getCenterLonLat();
+        
+        quadrant += (lonlat.lat < center.lat) ? "b" : "t";
+        quadrant += (lonlat.lon < center.lon) ? "l" : "r";
+    
+        return quadrant; 
+    },
+
+    /** @final @type String */
+    CLASS_NAME: "OpenLayers.Bounds"
+};
+
+/** Alternative constructor that builds a new OpenLayers.Bounds from a 
+*    parameter string
+* 
+* @constructor
+* 
+* @param {String} str Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
+*
+* @returns New OpenLayers.Bounds object built from the passed-in String.
+* @type OpenLayers.Bounds
+*/
+OpenLayers.Bounds.fromString = function(str) {
+    var bounds = str.split(",");
+    return OpenLayers.Bounds.fromArray(bounds);
+};
+
+/** Alternative constructor that builds a new OpenLayers.Bounds
+*    from an array
+* 
+* @constructor
+* 
+* @param {Array} bbox Array of bounds values (ex. <i>[5,42,10,45]</i>)
+*
+* @returns New OpenLayers.Bounds object built from the passed-in Array.
+* @type OpenLayers.Bounds
+*/
+OpenLayers.Bounds.fromArray = function(bbox) {
+    return new OpenLayers.Bounds(parseFloat(bbox[0]),
+                                 parseFloat(bbox[1]),
+                                 parseFloat(bbox[2]),
+                                 parseFloat(bbox[3]));
+};
+
+/** Alternative constructor that builds a new OpenLayers.Bounds
+*    from an OpenLayers.Size
+* 
+* @constructor
+* 
+* @param {OpenLayers.Size} size
+*            
+* @returns New OpenLayers.Bounds object built with top and left set to 0 and
+*           bottom right taken from the passed-in OpenLayers.Size.
+* @type OpenLayers.Bounds
+*/
+OpenLayers.Bounds.fromSize = function(size) {
+    return new OpenLayers.Bounds(0,
+                                 size.h,
+                                 size.w,
+                                 0);
+};
+/**
+ * @param {String} quadrant 
+ * 
+ * @returns The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if 
+ *           you pass in "bl" it returns "tr", if you pass in "br" it 
+ *           returns "tl", etc.
+ * @type String
+ */
+OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
+    var opp = "";
+    
+    opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
+    opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
+    
+    return opp;
+};
+
+
+/*********************
+ *                   *
+ *      ELEMENT      * 
+ *                   * 
+ *********************/
+
+OpenLayers.Element = {
+  visible: function(element) {
+    return OpenLayers.Util.getElement(element).style.display != 'none';
+  },
+
+  toggle: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = OpenLayers.Util.getElement(arguments[i]);
+      OpenLayers.Element[OpenLayers.Element.visible(element) ? 'hide' : 'show'](element);
+    }
+  },
+
+  hide: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = OpenLayers.Util.getElement(arguments[i]);
+      element.style.display = 'none';
+    }
+  },
+
+  show: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = OpenLayers.Util.getElement(arguments[i]);
+      element.style.display = '';
+    }
+  },
+
+  remove: function(element) {
+    element = OpenLayers.Util.getElement(element);
+    element.parentNode.removeChild(element);
+  },
+
+  getHeight: function(element) {
+    element = OpenLayers.Util.getElement(element);
+    return element.offsetHeight;
+  },
+
+  getDimensions: function(element) {
+    element = OpenLayers.Util.getElement(element);
+    if (OpenLayers.Element.getStyle(element, 'display') != 'none')
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = '';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = 'none';
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  getStyle: function(element, style) {
+    element = OpenLayers.Util.getElement(element);
+    var value = element.style[style.camelize()];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css.getPropertyValue(style) : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style.camelize()];
+      }
+    }
+
+    if (window.opera && OpenLayers.Util.indexOf(['left', 'top', 'right', 'bottom'],style) != -1)
+      if (OpenLayers.Element.getStyle(element, 'position') == 'static') value = 'auto';
+
+    return value == 'auto' ? null : value;
+  }
+
+};
+
+/*********************
+ *                   *
+ *      STRING       * 
+ *                   * 
+ *********************/
+
+/**
+* @param {String} sStart
+* 
+* @returns Whether or not this string starts with the string passed in.
+* @type Boolean
+*/
+String.prototype.startsWith = function(sStart) {
+    return (this.substr(0,sStart.length) == sStart);
+};
+
+/**
+* @param {String} str
+* 
+* @returns Whether or not this string contains with the string passed in.
+* @type Boolean
+*/
+String.prototype.contains = function(str) {
+    return (this.indexOf(str) != -1);
+};
+
+/**
+* @returns A trimmed version of the string - all leading and 
+*          trailing spaces removed
+* @type String
+*/
+String.prototype.trim = function() {
+    
+    var b = 0;
+    while(this.substr(b,1) == " ") {
+        b++;
+    }
+    
+    var e = this.length - 1;
+    while(this.substr(e,1) == " ") {
+        e--;
+    }
+    
+    return this.substring(b, e+1);
+};
+
+
+String.indexOf = function(object) {
+ for (var i = 0; i < this.length; i++)
+     if (this[i] == object) return i;
+ return -1;
+};
+
+String.prototype.camelize = function() {
+    var oStringList = this.split('-');
+    if (oStringList.length == 1) return oStringList[0];
+
+    var camelizedString = this.indexOf('-') == 0
+      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
+      : oStringList[0];
+
+    for (var i = 1, len = oStringList.length; i < len; i++) {
+      var s = oStringList[i];
+      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
+    }
+
+    return camelizedString;
+};
+
+
+/*********************
+ *                   *
+ *      NUMBER       * 
+ *                   * 
+ *********************/
+
+/** NOTE: Works only with integer values does *not* work with floats!
+ * 
+ * @param {int} sig
+ * 
+ * @returns The number, rounded to the specified number of significant digits.
+ *          If null, 0, or negaive value passed in, returns 0
+ * @type int
+ */
+Number.prototype.limitSigDigs = function(sig) {
+    var number = (sig > 0) ? this.toString() : 0;
+    if (sig < number.length) {
+        var exp = number.length - sig;
+        number = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp);
+    }
+    return parseInt(number);
+}
+
+
+/*********************
+ *                   *
+ *      FUNCTION     * 
+ *                   * 
+ *********************/
+
+Function.prototype.bind = function() {
+  var __method = this, args = [], object = arguments[0];
+  for (var i = 1; i < arguments.length; i++)
+    args.push(arguments[i]);
+  return function(moreargs) {
+    for (var i = 0; i < arguments.length; i++)
+      args.push(arguments[i]);
+    return __method.apply(object, args);
+  }
+};
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this;
+  return function(event) {
+    return __method.call(object, event || window.event);
+  }
+};

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/ArgParser.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/ArgParser.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DragPan.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/DragPan.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DragPan.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /**

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DrawFeature.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/DrawFeature.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/DrawFeature.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/EditingToolbar.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/EditingToolbar.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/EditingToolbar.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /**

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/KeyboardDefaults.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/KeyboardDefaults.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/KeyboardDefaults.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/LayerSwitcher.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/LayerSwitcher.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/LayerSwitcher.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /** 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/MouseDefaults.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseDefaults.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /**

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MousePosition.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/MousePosition.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MousePosition.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/MouseToolbar.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/MouseToolbar.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/NavToolbar.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/NavToolbar.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/NavToolbar.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /**

Modified: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Navigation.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/Navigation.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/Navigation.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,5 +1,5 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
+/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/release-license.txt 
  * for the full text of the license. */
 
 /**

Deleted: tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- branches/openlayers/2.4/lib/OpenLayers/Control/OverviewMap.js	2007-05-24 14:25:38 UTC (rev 3176)
+++ tags/openlayers/release-2.4-rc4/lib/OpenLayers/Control/OverviewMap.js	2007-05-24 14:55:48 UTC (rev 3178)
@@ -1,608 +0,0 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
- * for the full text of the license. */
-/**
- * @fileoverview Locator Map Control
- * @author Tim Schaub
- */
-
-/** 
- * @class
- * 
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/BaseTypes.js
- * @requires OpenLayers/Events.js
- */
-OpenLayers.Control.OverviewMap = OpenLayers.Class.create();
-
-OpenLayers.Control.OverviewMap.prototype = 
-  OpenLayers.Class.inherit( OpenLayers.Control, {
-
-    /** For div.id
-     * @type String */
-    id:  "OverviewMap",
-
-    /** @type DOMElement */
-    element: null,
-    
-    /**
-     * The overvew map itself.
-     * @type OpenLayers.Map
-     */
-    ovmap: null,
-        
-    /**
-     * The overvew map size in pixels.  Note that this is the size of the map
-     * itself - the element that contains the map (default class name
-     * olControlOverviewMapElement) may have padding or other style attributes
-     * added via CSS.
-     * @type OpenLayers.Size
-     */
-    size: new OpenLayers.Size(180, 90),
-
-    /**
-     * Ordered list of layers in the overview map.  If none are sent at
-     * construction, then the default below is used.
-     * 
-     * @type Array(OpenLayers.Layer)
-     */
-    layers: null,
-
-    /**
-     * The ratio of the overview map resolution to the main map resolution
-     * at which to zoom farther out on the overview map.
-     * @type Float
-     */
-    minRatio: 8,
-
-    /**
-     * The ratio of the overview map resolution to the main map resolution
-     * at which to zoom farther in on the overview map.
-     * @type Float
-     */
-    maxRatio: 32,
-
-    /**
-     * An object containing any non-default properties to be sent to the
-     * overview map's map constructor.  These should include any non-default
-     * options that the main map was constructed with.
-     * @type: Object
-     */
-    mapOptions: null,
-
-    /**
-     * @constructor
-     * @param {Object} options Hashtable of options to set on the overview map
-     */
-    initialize: function(options) {
-        this.layers = new Array();
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * 
-     */
-    destroy: function() {
-        if (!this.mapDiv) { // we've already been destroyed
-            return;
-        }
-        this.mapDiv.removeChild(this.extentRectangle);
-        this.extentRectangle = null;
-        this.rectEvents.destroy();
-        this.rectEvents = null;
-
-        this.ovmap.destroy();
-        this.ovmap = null;
-        
-        this.element.removeChild(this.mapDiv);
-        this.mapDiv = null;
-        this.mapDivEvents.destroy(); 
-        this.mapDivEvents = null;
-
-        this.div.removeChild(this.element);
-        this.element = null;
-        this.elementEvents.destroy();
-        this.elementEvents = null;
-
-        if (this.maximizeDiv) {
-            OpenLayers.Event.stopObservingElement(this.maximizeDiv);
-            this.div.removeChild(this.maximizeDiv);
-            this.maximizeDiv = null;
-        }
-        
-        if (this.minimizeDiv) {
-            OpenLayers.Event.stopObservingElement(this.minimizeDiv);
-            this.div.removeChild(this.minimizeDiv);
-            this.minimizeDiv = null;
-        }
-        
-        this.map.events.unregister('moveend', this, this.update);
-        this.map.events.unregister("changebaselayer", this, 
-                                    this.baseLayerDraw);
-
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);    
-    },
-
-    /**
-     * @type DOMElement
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        if(!(this.layers.length > 0)) {
-            if (this.map.baseLayer) {
-                var layer = this.map.baseLayer.clone();
-                this.layers = [layer];
-            } else {
-                this.map.events.register("changebaselayer", this, this.baseLayerDraw);
-                return this.div;
-            }
-        }
-
-        // create overview map DOM elements
-        this.element = document.createElement('div');
-        this.element.className = this.displayClass + 'Element';
-        this.element.style.display = 'none';
-
-        this.mapDiv = document.createElement('div');
-        this.mapDiv.style.width = this.size.w + 'px';
-        this.mapDiv.style.height = this.size.h + 'px';
-        this.mapDiv.style.position = 'relative';
-        this.mapDiv.style.overflow = 'hidden';
-        this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap');
-        
-        this.extentRectangle = document.createElement('div');
-        this.extentRectangle.style.position = 'absolute';
-        this.extentRectangle.style.zIndex = 1000;  //HACK
-        this.extentRectangle.style.overflow = 'hidden';
-        this.extentRectangle.style.backgroundImage = 'url(' +
-                                        OpenLayers.Util.getImagesLocation() +
-                                        'blank.gif)';
-        this.extentRectangle.className = this.displayClass+'ExtentRectangle';
-        this.mapDiv.appendChild(this.extentRectangle);
-                
-        this.element.appendChild(this.mapDiv);  
-
-        this.div.appendChild(this.element);
-
-        this.map.events.register('moveend', this, this.update);
-        
-        // Set up events.  The image div recenters the map on click.
-        // The extent rectangle can be dragged to recenter the map.
-        // If the mousedown happened elsewhere, then mousemove and mouseup
-        // should slip through.
-        this.elementEvents = new OpenLayers.Events(this, this.element);
-        this.elementEvents.register('mousedown', this, function(e) {
-            OpenLayers.Event.stop(e);
-        });
-        this.elementEvents.register('click', this, function(e) {
-            OpenLayers.Event.stop(e);
-        });
-        this.elementEvents.register('dblclick', this, function(e) {
-            OpenLayers.Event.stop(e);
-        });
-        this.rectEvents = new OpenLayers.Events(this, this.extentRectangle);
-        this.rectEvents.register('mouseout', this, this.rectMouseOut);
-        this.rectEvents.register('mousedown', this, this.rectMouseDown);
-        this.rectEvents.register('mousemove', this, this.rectMouseMove);
-        this.rectEvents.register('mouseup', this, this.rectMouseUp);
-        this.rectEvents.register('click', this, function(e) {
-            OpenLayers.Event.stop(e);
-        });
-        this.rectEvents.register('dblclick', this, this.rectDblClick );
-        this.mapDivEvents = new OpenLayers.Events(this, this.mapDiv);
-        this.mapDivEvents.register('click', this, this.mapDivClick);
-
-        // Optionally add min/max buttons if the control will go in the
-        // map viewport.
-        if(!this.outsideViewport) {
-            this.div.cl