[OpenLayers-Commits] r7490 - in sandbox/topp/trimet: build doc examples lib/OpenLayers lib/OpenLayers/Control lib/OpenLayers/Feature lib/OpenLayers/Format lib/OpenLayers/Handler lib/OpenLayers/Lang lib/OpenLayers/Layer lib/OpenLayers/Renderer lib/OpenLayers/Tile tests tests/Control tests/Format tests/Layer tests/Tile theme/default theme/default/img tools

commits at openlayers.org commits at openlayers.org
Fri Jul 11 13:38:45 EDT 2008


Author: tschaub
Date: 2008-07-11 13:38:45 -0400 (Fri, 11 Jul 2008)
New Revision: 7490

Added:
   sandbox/topp/trimet/examples/stylemap.html
   sandbox/topp/trimet/lib/OpenLayers/Lang/nb.js
   sandbox/topp/trimet/lib/OpenLayers/Lang/zh-TW.js
   sandbox/topp/trimet/theme/default/img/navigation_history.png
   sandbox/topp/trimet/tools/oldot.py
Removed:
   sandbox/topp/trimet/examples/smoothDragging.html
Modified:
   sandbox/topp/trimet/build/full.cfg
   sandbox/topp/trimet/build/library.cfg
   sandbox/topp/trimet/build/lite.cfg
   sandbox/topp/trimet/doc/authors.txt
   sandbox/topp/trimet/examples/editingtoolbar-outside.html
   sandbox/topp/trimet/examples/georss-flickr.html
   sandbox/topp/trimet/examples/intersects.html
   sandbox/topp/trimet/examples/navigation-history.html
   sandbox/topp/trimet/examples/projected-map.html
   sandbox/topp/trimet/examples/rotate-features.html
   sandbox/topp/trimet/examples/sld.html
   sandbox/topp/trimet/examples/spherical-mercator.html
   sandbox/topp/trimet/examples/styles-rotation.html
   sandbox/topp/trimet/examples/styles-unique.html
   sandbox/topp/trimet/lib/OpenLayers/BaseTypes.js
   sandbox/topp/trimet/lib/OpenLayers/Control/NavigationHistory.js
   sandbox/topp/trimet/lib/OpenLayers/Control/OverviewMap.js
   sandbox/topp/trimet/lib/OpenLayers/Control/Permalink.js
   sandbox/topp/trimet/lib/OpenLayers/Control/ScaleLine.js
   sandbox/topp/trimet/lib/OpenLayers/Feature/Vector.js
   sandbox/topp/trimet/lib/OpenLayers/Format/GeoRSS.js
   sandbox/topp/trimet/lib/OpenLayers/Format/WKT.js
   sandbox/topp/trimet/lib/OpenLayers/Handler/Box.js
   sandbox/topp/trimet/lib/OpenLayers/Lang/en.js
   sandbox/topp/trimet/lib/OpenLayers/Lang/fr.js
   sandbox/topp/trimet/lib/OpenLayers/Layer/GeoRSS.js
   sandbox/topp/trimet/lib/OpenLayers/Layer/WFS.js
   sandbox/topp/trimet/lib/OpenLayers/Layer/WMS.js
   sandbox/topp/trimet/lib/OpenLayers/Map.js
   sandbox/topp/trimet/lib/OpenLayers/Renderer/Elements.js
   sandbox/topp/trimet/lib/OpenLayers/Tile/WFS.js
   sandbox/topp/trimet/tests/BaseTypes.html
   sandbox/topp/trimet/tests/Control/ScaleLine.html
   sandbox/topp/trimet/tests/Format/WKT.html
   sandbox/topp/trimet/tests/Layer/GeoRSS.html
   sandbox/topp/trimet/tests/Layer/WFS.html
   sandbox/topp/trimet/tests/Map.html
   sandbox/topp/trimet/tests/Tile/WFS.html
   sandbox/topp/trimet/tests/run-tests.html
   sandbox/topp/trimet/theme/default/style.css
   sandbox/topp/trimet/tools/exampleparser.py
Log:
merge r7354:HEAD from trunk

Modified: sandbox/topp/trimet/build/full.cfg
===================================================================
--- sandbox/topp/trimet/build/full.cfg	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/build/full.cfg	2008-07-11 17:38:45 UTC (rev 7490)
@@ -18,5 +18,7 @@
 OpenLayers/Lang/en-CA.js
 OpenLayers/Lang/fr.js
 OpenLayers/Lang/it.js
+OpenLayers/Lang/nb.js
 OpenLayers/Lang/pt-BR.js
-OpenLayers/Lang/sv-SE.js
\ No newline at end of file
+OpenLayers/Lang/sv-SE.js
+OpenLayers/Lang/zh-TW.js

Modified: sandbox/topp/trimet/build/library.cfg
===================================================================
--- sandbox/topp/trimet/build/library.cfg	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/build/library.cfg	2008-07-11 17:38:45 UTC (rev 7490)
@@ -51,6 +51,9 @@
 OpenLayers/Lang/en-CA.js
 OpenLayers/Lang/fr.js
 OpenLayers/Lang/it.js
+OpenLayers/Lang/nb.js
 OpenLayers/Lang/pt-BR.js
 OpenLayers/Lang/sv-SE.js
+OpenLayers/Lang/zh-TW.js
 
+

Modified: sandbox/topp/trimet/build/lite.cfg
===================================================================
--- sandbox/topp/trimet/build/lite.cfg	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/build/lite.cfg	2008-07-11 17:38:45 UTC (rev 7490)
@@ -19,13 +19,5 @@
 OpenLayers/Tile/Image.js
 
 [exclude]
-Firebug/firebug.js
-Firebug/firebugx.js
-OpenLayers/Lang/cs-CZ.js
-OpenLayers/Lang/de.js
-OpenLayers/Lang/en-CA.js
-OpenLayers/Lang/fr.js
-OpenLayers/Lang/it.js
-OpenLayers/Lang/pt-BR.js
-OpenLayers/Lang/sv-SE.js
 
+

Modified: sandbox/topp/trimet/doc/authors.txt
===================================================================
--- sandbox/topp/trimet/doc/authors.txt	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/doc/authors.txt	2008-07-11 17:38:45 UTC (rev 7490)
@@ -23,6 +23,7 @@
 Christopher Schmidt
 Cameron Shorter                                                              
 Paul Spencer                                                                 
+Paul Smith                                                                 
 Glen Stampoultzis
 James Stembridge
 Erik Uzureau

Modified: sandbox/topp/trimet/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/topp/trimet/examples/editingtoolbar-outside.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/editingtoolbar-outside.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -42,6 +42,9 @@
   </head>
   <body onload="init()">
     <h1 id="title">OpenLayers EditingToolbar Outside Viewport</h1>
+    <p id="shortdesc">
+        Display an editing toolbar panel outside the map viewport.
+    </p>
     <div id="map" class="smallmap"></div>
     <div id="panel" class="olControlEditingToolbar"></div>
   </body>

Modified: sandbox/topp/trimet/examples/georss-flickr.html
===================================================================
--- sandbox/topp/trimet/examples/georss-flickr.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/georss-flickr.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -46,9 +46,23 @@
             
             style.addRules([rule, elseRule]);
             
-            // Create a layer with a style map.  Giving the style map keys
-            // for "default" and "select" rendering intent.
-            markerLayer = new OpenLayers.Layer.Vector("", {
+            // Create a GML layer with GeoRSS format and a style map.
+            markerLayer = new OpenLayers.Layer.GML("Some images from Flickr",
+			                                       "xml/georss-flickr.xml", {
+                format: OpenLayers.Format.GeoRSS,
+                formatOptions: {
+                    // adds the thumbnail attribute to the feature
+                    createFeatureFromItem: function(item) {
+                        var feature = OpenLayers.Format.GeoRSS.prototype
+                                .createFeatureFromItem.apply(this, arguments);
+                        feature.attributes.thumbnail =
+                                this.getElementsByTagNameNS(
+                                item, "*", "thumbnail")[0].getAttribute("url");
+                        return feature;
+                    }
+                },
+				// Giving the style map keys for "default" and "select"
+				// rendering intent, to make the image larger when selected
                 styleMap: new OpenLayers.StyleMap({
                     "default": style,
                     "select": new OpenLayers.Style({pointRadius: 35})
@@ -75,31 +89,7 @@
             map.addControl(popupControl);
             
             popupControl.activate();
-            
-            OpenLayers.loadURL("xml/georss-flickr.xml", null, window, afterload);
-            
         }
-        
-        function afterload(req) {
-            // extended version of OpenLayers.Format.GeoRSS.createFeatureFromItem;
-            // adds the thumbnail attribute to the feature
-            function createFeatureFromItem(item) {
-                var feature = OpenLayers.Format.GeoRSS.prototype
-                        .createFeatureFromItem.apply(this, arguments);
-                feature.attributes.thumbnail =
-                        this.getElementsByTagNameNS(
-                        item, "*", "thumbnail")[0].getAttribute("url");
-                return feature;
-            }
-
-            var store = new OpenLayers.Format.GeoRSS({
-                    createFeatureFromItem: createFeatureFromItem});
-
-            rss = store.read(req.responseText);
-
-            markerLayer.setName("Some images from Flickr");
-            markerLayer.addFeatures(rss);
-        }
     </script>
   </head>
   <body onload="init()">

Modified: sandbox/topp/trimet/examples/intersects.html
===================================================================
--- sandbox/topp/trimet/examples/intersects.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/intersects.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -161,6 +161,9 @@
   <body onload="init()">
     <div id="leftcol">
         <h1 id="title">OpenLayers Geometry Intersection Example</h1>
+        <p id="shortdesc">
+            Use of geometry.intersects method for testing geometry intersections.
+        </p>
         <div id="map" class="smallmap"></div>
         <div id="input">
             <textarea id="text"></textarea> 

Modified: sandbox/topp/trimet/examples/navigation-history.html
===================================================================
--- sandbox/topp/trimet/examples/navigation-history.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/navigation-history.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -17,18 +17,7 @@
         <script type="text/javascript">
             var map, nav, panel;
 
-            // preload images if you care
-            var preload = [
-                "../theme/default/img/view_previous_on.png",
-                "../theme/default/img/view_next_on.png"
-            ];
-            var img = new Array(preload.length);
-            for(var i=0; i<preload.length; ++i) {
-                img[i] = new Image();
-                img[i].src = preload[i];
-            }
-            
-            function init(){
+            function init() {
                 map = new OpenLayers.Map('map');
 
                 nav = new OpenLayers.Control.NavigationHistory();
@@ -48,8 +37,6 @@
                 );
                 map.addLayer(layer);
                 map.zoomToMaxExtent();
-
-
             }
         </script>
     </head>

Modified: sandbox/topp/trimet/examples/projected-map.html
===================================================================
--- sandbox/topp/trimet/examples/projected-map.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/projected-map.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -47,6 +47,7 @@
             
             map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
             map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.addControl(new OpenLayers.Control.ScaleLine());
         }
     </script>
   </head>

Modified: sandbox/topp/trimet/examples/rotate-features.html
===================================================================
--- sandbox/topp/trimet/examples/rotate-features.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/rotate-features.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -77,12 +77,12 @@
             };
             var center = new OpenLayers.Feature.Vector(origin, null, style);
             vectorLayer.addFeatures([center]);
-            window.setInterval(rotateFeature, 100,
-                               pointFeature, 360 / 20, origin);
-            window.setInterval(rotateFeature, 100,
-                               lineFeature, 360 / 40, origin);
-            window.setInterval(rotateFeature, 100,
-                               polygonFeature, -360 / 20, origin);
+            window.setInterval(function() {rotateFeature(
+                               pointFeature, 360 / 20, origin)}, 100);
+            window.setInterval(function() {rotateFeature(
+                               lineFeature, 360 / 40, origin)}, 100);
+            window.setInterval(function(){rotateFeature(
+                               polygonFeature, -360 / 20, origin)}, 100);
         }
 
         function rotateFeature(feature, angle, origin) {

Modified: sandbox/topp/trimet/examples/sld.html
===================================================================
--- sandbox/topp/trimet/examples/sld.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/sld.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -91,8 +91,11 @@
   </head>
   <body onload="init()">
     <h1 id="title">Styled Layer Descriptor (SLD) Example</h1>
+    <p id="shortdesc">
+        Parsing SLD and applying styles to a vector layer.
+    </p>
     <div id="map" class="smallmap"></div>
-    <p>This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD
+    <p id="docs">This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD
     file</a> to style the vector features. To construct layers that use styles
     from SLD, create a StyleMap for the layer that uses one of the userStyles in the
     namedLayers object of the return from format.read().</p>

Deleted: sandbox/topp/trimet/examples/smoothDragging.html
===================================================================
--- sandbox/topp/trimet/examples/smoothDragging.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/smoothDragging.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -1,75 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-    <link rel="stylesheet" href="style.css" type="text/css" />
-    <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
-    <script src='http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'></script>
-    <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
-
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
- 
-        // make map available for easy debugging
-        var map;
-
-        // avoid pink tiles
-        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
-        OpenLayers.Util.onImageLoadErrorColor = "transparent";
-
-        function init(){
-            var options = {
-                projection: "EPSG:900913",
-                units: "m",
-                maxResolution: 156543.0339,
-                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
-                                                 20037508, 20037508.34)
-            };
-            map = new OpenLayers.Map('map', options);
-
-            // create Google Mercator layers
-            var gmap = new OpenLayers.Layer.Google(
-                "Google Streets",
-                {'sphericalMercator': true}
-            );
-
-            // create Virtual Earth layers
-            var ve = new OpenLayers.Layer.VirtualEarth(
-                "Virtual Earth Raods",
-                {'type': VEMapStyle.Road, 'sphericalMercator': true}
-            ); 
-
-            // create Virtual Earth layers
-            var ve = new OpenLayers.Layer.VirtualEarth(
-                "Virtual Earth Raods",
-                {'type': VEMapStyle.Road, 'sphericalMercator': true}
-            ); 
-
-            // create Yahoo layer
-            var yahoo = new OpenLayers.Layer.Yahoo(
-                "Yahoo Street",
-                {'sphericalMercator': true}
-            );
-
-            // create WMS layer
-            var wms = new OpenLayers.Layer.WMS(
-                "World Map",
-                "http://world.freemap.in/tiles/",
-                {'layers': 'factbook-overlay', 'format':'png'},
-                {
-                    'opacity': 0.4,
-                    'isBaseLayer': false,'wrapDateLine': true
-                }
-            );
-
-            map.addLayers([gmap, wms, ve, yahoo]);
-            map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.zoomToMaxExtent()
-        }
-
-    </script>
-  </head>
-  <body onload="init()">
-    <h1 id="title">OpenLayers With Responsive Dragging</h1>
-    <div id="map" class="smallmap"></div>
-  </body>
-</html>

Modified: sandbox/topp/trimet/examples/spherical-mercator.html
===================================================================
--- sandbox/topp/trimet/examples/spherical-mercator.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/spherical-mercator.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -41,7 +41,7 @@
             );
             var gsat = new OpenLayers.Layer.Google(
                 "Google Satellite",
-                {type: G_SATELLITE_MAP, 'sphericalMercator': true}
+                {type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22}
             );
             var ghyb = new OpenLayers.Layer.Google(
                 "Google Hybrid",
@@ -86,6 +86,14 @@
                     attribution: '<a href="http://www.openstreetmap.org/">OpenStreetMap</a>'
                 }
             );
+            // create OSM layer
+            var mapnik = new OpenLayers.Layer.TMS(
+                "OpenAerialMap",
+                "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/",
+                {
+                    type: 'png', getURL: osm_getTileURL
+                }
+            );
 
             // create OSM layer
             var osmarender = new OpenLayers.Layer.TMS(

Copied: sandbox/topp/trimet/examples/stylemap.html (from rev 7489, trunk/openlayers/examples/stylemap.html)
===================================================================
--- sandbox/topp/trimet/examples/stylemap.html	                        (rev 0)
+++ sandbox/topp/trimet/examples/stylemap.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -0,0 +1,85 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>OpenLayers StyleMap</title>
+    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="style.css" type="text/css" />
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        var map;
+
+        function init() {
+            map = new OpenLayers.Map('map');
+            var wms = new OpenLayers.Layer.WMS(
+                "OpenLayers WMS",
+                "http://labs.metacarta.com/wms/vmap0",
+                {layers: 'basic'}
+            );
+            
+            // Create 50 random features, and give them a "type" attribute that
+            // will be used to style them by size.
+            var features = new Array(50);
+            for (var i=0; i<features.length; i++) {
+                features[i] = new OpenLayers.Feature.Vector(
+                    new OpenLayers.Geometry.Point(
+                        (360 * Math.random()) - 180, (180 * Math.random()) - 90
+                    ), {
+                        type: 5 + parseInt(5 * Math.random())
+                    }
+                );
+            }
+            
+            // Create a styleMap to style your features for two different
+            // render intents.  The style for the 'default' render intent will
+            // be applied when the feature is first drawn.  The style for the
+            // 'select' render intent will be applied when the feature is
+            // selected.
+            var myStyles = new OpenLayers.StyleMap({
+                "default": new OpenLayers.Style({
+                    pointRadius: "${type}", // sized according to type attribute
+                    fillColor: "#ffcc66",
+                    strokeColor: "#ff9933",
+                    strokeWidth: 2
+                }),
+                "select": new OpenLayers.Style({
+                    fillColor: "#66ccff",
+                    strokeColor: "#3399ff"
+                })
+            });
+            
+            // Create a vector layer and give it your style map.
+            var points = new OpenLayers.Layer.Vector(
+                'Points', {styleMap: myStyles}
+            );
+            points.addFeatures(features);
+            map.addLayers([wms, points]);
+            
+            // Create a select feature control and add it to the map.
+            var select = new OpenLayers.Control.SelectFeature(points, {hover: true});
+            map.addControl(select);
+            select.activate();
+            
+            map.setCenter(new OpenLayers.LonLat(0, 0), 1);
+        }
+    </script>
+  </head>
+  <body onload="init()">
+    <h1 id="title">StyleMap Example</h1>
+
+    <div id="tags"></div>
+
+    <p id="shortdesc">
+        Shows how to use a StyleMap.
+    </p>
+
+    <div id="map" class="smallmap"></div>
+
+    <div id="docs">
+        <p>A style map is used with vector layers to define styles for various
+        rendering intents.  The style map used here has styles defined for the
+        "default" and "select" rendering intents.  This map also has an active
+        select feature control.  When you hover over features, they are selected
+        and drawn with the style corresponding the the "select" render intent.
+        </p>
+    </div>
+  </body>
+</html>
\ No newline at end of file

Modified: sandbox/topp/trimet/examples/styles-rotation.html
===================================================================
--- sandbox/topp/trimet/examples/styles-rotation.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/styles-rotation.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -76,7 +76,7 @@
   </head>
   <body onload="init()">
     <h1 id="title">Rotation Styles Example</h1>
-    <p id="shortdesc">Vector point feature symbolizers can have a <tt>rotation</tt> property. The center of the rotation is the point of the image specified by <tt>graphicXOffset</tt> and <tt>graphicYOffset</tt>.</p>
+    <p id="shortdesc">Vector point feature symbolizers can have a rotation property. The center of the rotation is the point of the image specified by graphicXOffset and graphicYOffset.</p>
     <div id="map"></div>
     <div id="docs"/>
   </body>

Modified: sandbox/topp/trimet/examples/styles-unique.html
===================================================================
--- sandbox/topp/trimet/examples/styles-unique.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/examples/styles-unique.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -92,11 +92,8 @@
     <div id="tags"></div>
 
     <p id="shortdesc">
-      Shows how to create a style based :
-      <ul> 
-        <li>on unique feature attribute values (markers),</li>
-        <li>on feature state values (circles).</li>
-      </ul>
+        Shows how to create a style based on unique feature attribute values (markers)
+        and feature state values (circles).
     </p>
 
     <div id="map" class="smallmap"></div>

Modified: sandbox/topp/trimet/lib/OpenLayers/BaseTypes.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/BaseTypes.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/BaseTypes.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -134,6 +134,31 @@
             }
         }
         return tokens.join("");
+    },
+    
+    /**
+     * Property: OpenLayers.String.numberRegEx
+     * Used to test strings as numbers.
+     */
+    numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
+    
+    /**
+     * APIFunction: OpenLayers.String.isNumeric
+     * Determine whether a string contains only a numeric value.
+     *
+     * Examples:
+     * (code)
+     * OpenLayers.String.isNumeric("6.02e23") // true
+     * OpenLayers.String.isNumeric("12 dozen") // false
+     * OpenLayers.String.isNumeric("4") // true
+     * OpenLayers.String.isNumeric(" 4 ") // false
+     * (end)
+     *
+     * Returns:
+     * {Boolean} String contains only a number.
+     */
+    isNumeric: function(value) {
+        return OpenLayers.String.numberRegEx.test(value);
     }
 
 };

Modified: sandbox/topp/trimet/lib/OpenLayers/Control/NavigationHistory.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Control/NavigationHistory.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Control/NavigationHistory.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -137,14 +137,14 @@
 
         var previousOptions = {
             trigger: OpenLayers.Function.bind(this.previousTrigger, this),
-            displayClass: this.displayClass + "Previous"
+            displayClass: this.displayClass + " " + this.displayClass + "Previous"
         };
         OpenLayers.Util.extend(previousOptions, this.previousOptions);
         this.previous = new OpenLayers.Control.Button(previousOptions);
         
         var nextOptions = {
             trigger: OpenLayers.Function.bind(this.nextTrigger, this),
-            displayClass: this.displayClass + "Next"
+            displayClass: this.displayClass + " " + this.displayClass + "Next"
         };
         OpenLayers.Util.extend(nextOptions, this.nextOptions);
         this.next = new OpenLayers.Control.Button(nextOptions);

Modified: sandbox/topp/trimet/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Control/OverviewMap.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Control/OverviewMap.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -495,7 +495,7 @@
     updateRectToMap: function() {
         // The base layer for overview map needs to be in the same projection
         // as the base layer for the main map.  This should be made more robust.
-        if(this.map.units != 'degrees') {
+        if(this.map.getUnits() != 'degrees') {
             if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) {
                 alert(OpenLayers.i18n("sameProjection"));
             }

Modified: sandbox/topp/trimet/lib/OpenLayers/Control/Permalink.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Control/Permalink.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Control/Permalink.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -153,7 +153,7 @@
         params.lon = Math.round(lon*100000)/100000;
         
         params.layers = '';
-        for(var i=0; i< this.map.layers.length; i++) {
+        for (var i=0; i < this.map.layers.length; i++) {
             var layer = this.map.layers[i];
 
             if (layer.isBaseLayer) {
@@ -164,7 +164,7 @@
         }
 
         var href = this.base;
-        if( href.indexOf('?') != -1 ){
+        if (href.indexOf('?') != -1) {
             href = href.substring( 0, href.indexOf('?') );
         }
 

Modified: sandbox/topp/trimet/lib/OpenLayers/Control/ScaleLine.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Control/ScaleLine.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Control/ScaleLine.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -153,7 +153,7 @@
             return;
         }
 
-        var curMapUnits = this.map.units;
+        var curMapUnits = this.map.getUnits();
         var inches = OpenLayers.INCHES_PER_UNIT;
 
         // convert maxWidth to map units

Modified: sandbox/topp/trimet/lib/OpenLayers/Feature/Vector.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Feature/Vector.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Feature/Vector.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -315,7 +315,7 @@
         hoverPointRadius: 1,
         hoverPointUnit: "%",
         pointerEvents: "visiblePainted",
-        cursor: ""
+        cursor: "inherit"
     },
     'select': {
         fillColor: "blue",
@@ -351,6 +351,6 @@
         hoverPointRadius: 1,
         hoverPointUnit: "%",
         pointerEvents: "visiblePainted",
-        cursor: ""
+        cursor: "inherit"
     }
 };    

Modified: sandbox/topp/trimet/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Format/GeoRSS.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Format/GeoRSS.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -223,9 +223,11 @@
      */
     getChildValue: function(node, nsuri, name, def) {
         var value;
-        try {
-            value = this.getElementsByTagNameNS(node, nsuri, name)[0].firstChild.nodeValue;
-        } catch(e) {
+        var eles = this.getElementsByTagNameNS(node, nsuri, name);
+        if(eles && eles[0] && eles[0].firstChild
+            && eles[0].firstChild.nodeValue) {
+            value = eles[0].firstChild.nodeValue;
+        } else {
             value = (def == undefined) ? "" : def;
         }
         return value;

Modified: sandbox/topp/trimet/lib/OpenLayers/Format/WKT.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Format/WKT.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Format/WKT.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -67,7 +67,9 @@
                     features.CLASS_NAME == "OpenLayers.Feature.Vector") {
                     features.geometry.transform(this.externalProjection,
                                                 this.internalProjection);
-                } else if (features && typeof features == "object") {
+                } else if (features &&
+                           type != "geometrycollection" &&
+                           typeof features == "object") {
                     for (var i = 0; i < features.length; i++) {
                         var component = features[i];
                         component.geometry.transform(this.externalProjection,

Modified: sandbox/topp/trimet/lib/OpenLayers/Handler/Box.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Handler/Box.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Handler/Box.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -84,16 +84,14 @@
     * Method: moveBox
     */
     moveBox: function (xy) {
-        var deltaX = Math.abs(this.dragHandler.start.x - xy.x);
-        var deltaY = Math.abs(this.dragHandler.start.y - xy.y);
+        var startX = this.dragHandler.start.x;
+        var startY = this.dragHandler.start.y;
+        var deltaX = Math.abs(startX - xy.x);
+        var deltaY = Math.abs(startY - xy.y);
         this.zoomBox.style.width = Math.max(1, deltaX) + "px";
         this.zoomBox.style.height = Math.max(1, deltaY) + "px";
-        if (xy.x < this.dragHandler.start.x) {
-            this.zoomBox.style.left = xy.x+"px";
-        }
-        if (xy.y < this.dragHandler.start.y) {
-            this.zoomBox.style.top = xy.y+"px";
-        }
+        this.zoomBox.style.left = xy.x < startX ? xy.x+"px" : startX+"px";
+        this.zoomBox.style.top = xy.y < startY ? xy.y+"px" : startY+"px";
     },
 
     /**

Modified: sandbox/topp/trimet/lib/OpenLayers/Lang/en.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Lang/en.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Lang/en.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -75,7 +75,7 @@
         "To get rid of this message, select a new BaseLayer " +
         "in the layer switcher in the upper-right corner.<br><br>" +
         "Most likely, this is because the ${layerLib} library " +
-        "script was either not correctly included.<br><br>" +
+        "script was not correctly included.<br><br>" +
         "Developers: For help getting this working correctly, " +
         "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
         "target='_blank'>click here</a>",

Modified: sandbox/topp/trimet/lib/OpenLayers/Lang/fr.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Lang/fr.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Lang/fr.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -14,6 +14,108 @@
  */
 OpenLayers.Lang.fr = {
 
-    'overlays': "Couches de superposition"
+    'unhandledRequest': "Requête non gérée, retournant ${statusText}",
 
+    'permalink': "Permalien",
+
+    'overlays': "Calques",
+
+    'baseLayer': "Calque de base",
+
+    'sameProjection':
+        "La carte de situation ne fonctionne que lorsque sa projection est la même que celle de la carte principale",
+
+    'readNotImplemented': "Lecture non implémentée.",
+
+    'writeNotImplemented': "Ecriture non implémentée.",
+
+    'noFID': "Impossible de mettre à jour un objet sans identifiant (fid).",
+
+    'errorLoadingGML': "Erreur au chargement du fichier GML ${url}",
+
+    'browserNotSupported':
+        "Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}",
+
+    'componentShouldBe': "addFeatures : le composant devrait être de type ${geomType}",
+
+    // console message
+    'getFeatureError':
+        "getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous " +
+        "avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.",
+
+    // console message
+    'minZoomLevelError':
+        "La propriété minZoomLevel doit seulement être utilisée " +
+        "pour des couches FixedZoomLevels-descendent. Le fait que " +
+        "cette couche WFS vérifie la présence de minZoomLevel " +
+        "est une relique du passé. Nous ne pouvons toutefois la " +
+        "supprimer sans casser des applications qui pourraient en dépendre." +
+        " C'est pourquoi nous la déprécions -- la vérification du minZoomLevel " +
+        "sera supprimée en version 3.0. A la place, merci d'utiliser " +
+        "les paramètres de résolutions min/max tel que décrit sur : " +
+        "http://trac.openlayers.org/wiki/SettingZoomLevels",
+
+    'commitSuccess': "Transaction WFS : SUCCES ${response}",
+
+    'commitFailed': "Transaction WFS : ECHEC ${response}",
+
+    'googleWarning':
+        "La couche Google n'a pas été en mesure de se charger correctement.<br><br>" +
+        "Pour supprimer ce message, choisissez une nouvelle BaseLayer " +
+        "dans le sélecteur de couche en haut à droite.<br><br>" +
+        "Cela est possiblement causé par la non-inclusion de la " +
+        "librairie Google Maps, ou alors parce que la clé de l'API " +
+        "ne correspond pas à votre site.<br><br>" +
+        "Développeurs : pour savoir comment corriger ceci, " +
+        "<a href='http://trac.openlayers.org/wiki/Google' " +
+        "target='_blank'>cliquez ici</a>",
+
+    'getLayerWarning':
+        "La couche ${layerType} n'est pas en mesure de se charger correctement.<br><br>" +
+        "Pour supprimer ce message, choisissez une nouvelle BaseLayer " +
+        "dans le sélecteur de couche en haut à droite.<br><br>" +
+        "Cela est possiblement causé par la non-inclusion de la " +
+        "librairie ${layerLib}.<br><br>" +
+        "Développeurs : pour savoir comment corriger ceci, " +
+        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
+        "target='_blank'>cliquez ici</a>",
+
+    'scale': "Echelle ~ 1 : ${scaleDenom}",
+
+    // console message
+    'layerAlreadyAdded':
+        "Vous avez essayé d'ajouter à la carte le calque : ${layerName}, mais il est déjà présent",
+
+    // console message
+    'reprojectDeprecated':
+        "Vous utilisez l'option 'reproject' " +
+        "sur la couche ${layerName}. Cette option est dépréciée : " +
+        "Son usage permettait d'afficher des données au dessus de couches raster commerciales." + 
+        "Cette fonctionalité est maintenant supportée en utilisant le support de la projection " +
+        "Mercator Sphérique. Plus d'information est disponible sur " +
+        "http://trac.openlayers.org/wiki/SphericalMercator.",
+
+    // console message
+    'methodDeprecated':
+        "Cette méthode est dépréciée, et sera supprimée à la version 3.0. " +
+        "Merci d'utiliser ${newMethod} à la place.",
+
+    // console message
+    'boundsAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
+
+    // console message
+    'lonlatAddError': "Vous devez passer les deux valeurs lon et lat à la fonction add.",
+
+    // console message
+    'pixelAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
+
+    // console message
+    'unsupportedGeometryType': "Type de géométrie non supporté : ${geomType}",
+
+    // console message
+    'pagePositionFailed':
+        "OpenLayers.Util.pagePosition a échoué: l'élément d'id ${elemId} pourrait être mal positionné.",
+    
+    'end': ''
+
 };

Copied: sandbox/topp/trimet/lib/OpenLayers/Lang/nb.js (from rev 7489, trunk/openlayers/lib/OpenLayers/Lang/nb.js)
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Lang/nb.js	                        (rev 0)
+++ sandbox/topp/trimet/lib/OpenLayers/Lang/nb.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -0,0 +1,121 @@
+/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
+ * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+/**
+ * @requires OpenLayers/Lang.js
+ */
+
+/**
+ * Namespace: OpenLayers.Lang["nb"]
+ * Dictionary for norwegian bokmål (Norway). Keys for entries are used in calls to
+ *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
+ *     strings formatted for use with <OpenLayers.String.format> calls.
+ */
+OpenLayers.Lang["nb"] = {
+
+    'unhandledRequest': "Ubehandlet forespørsel returnerte ${statusText}",
+
+    'permalink': "Kobling til denne siden",
+
+    'overlays': "Kartlag",
+
+    'baseLayer': "Bakgrunnskart",
+
+    'sameProjection':
+        "Oversiktskartet fungerer bare når det har samme projeksjon som hovedkartet",
+
+    'readNotImplemented': "Lesing er ikke implementert.",
+
+    'writeNotImplemented': "Skriving er ikke implementert.",
+
+    'noFID': "Kan ikke oppdatere feature (objekt) som ikke har FID.",
+
+    'errorLoadingGML': "Feil under lasting av GML-fil ${url}",
+
+    'browserNotSupported':
+        "Din nettleser støtter ikke vektortegning. Følgende tegnemetoder støttes:\n${renderers}",
+
+    'componentShouldBe': "addFeatures : komponenten må være en ${geomType}",
+
+    // console message
+    'getFeatureError':
+        "getFeatureFromEvent kjørt mot lag uten tegnemetode. Dette betyr som regel at du " +
+        "fjernet et lag uten å fjerne alle handlere tilknyttet laget.",
+
+    // console message
+    'minZoomLevelError':
+        "Egenskapen minZoomLevel er kun tenkt for bruk på lag " +
+        "basert på FixedZoomLevels. At dette wfs-laget sjekker " +
+        "minZoomLevel er en fortidslevning. Det kan dog ikke " +
+        "tas bort uten å risikere at OL-baserte applikasjoner " +
+        "slutter å virke, så det er merket som foreldet: " +
+        "minZoomLevel i sjekken nedenfor vil fjernes i 3.0. " +
+        "Vennligst bruk innstillingene for min/maks oppløsning " +
+        "som er beskrevet her: "+
+        "http://trac.openlayers.org/wiki/SettingZoomLevels",
+
+    'commitSuccess': "WFS-transaksjon: SUKSESS ${response}",
+
+    'commitFailed': "WFS-transaksjon: FEILET ${response}",
+
+    'googleWarning':
+        "Google-laget kunne ikke lastes.<br><br>" +
+        "Bytt til et annet bakgrunnslag i lagvelgeren i " +
+        "øvre høyre hjørne for å slippe denne meldingen.<br><br>" +
+        "Sannsynligvis forårsakes feilen av at Google Maps-biblioteket " +
+        "ikke er riktig inkludert på nettsiden, eller at det ikke er " +
+        "angitt riktig API-nøkkel for nettstedet.<br><br>" +
+        "Utviklere: For hjelp til å få dette til å virke se "+
+        "<a href='http://trac.openlayers.org/wiki/Google' " +
+        "target='_blank'>her</a>.",
+
+    'getLayerWarning':
+        "${layerType}-laget kunne ikke lastes.<br><br>" +
+        "Bytt til et annet bakgrunnslag i lagvelgeren i " +
+        "øvre høyre hjørne for å slippe denne meldingen.<br><br>" +
+        "Sannsynligvis forårsakes feilen av at " +
+        "${layerLib}-biblioteket ikke var riktig inkludert " +
+        "på nettsiden.<br><br>" +
+        "Utviklere: For hjelp til å få dette til å virke se " +
+        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
+        "target='_blank'>her</a>.",
+
+    'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
+
+    // console message
+    'layerAlreadyAdded':
+        "Du forsøkte å legge til laget ${layerName} på kartet, men det er allerede lagt til",
+
+    // console message
+    'reprojectDeprecated':
+        "Du bruker innstillingen 'reproject' på laget ${layerName}. " +
+        "Denne innstillingen er foreldet, den var ment for å støtte " +
+        "visning av kartdata over kommersielle bakgrunnskart, men det " +
+        "bør nå gjøres med støtten for Spherical Mercator. Mer informasjon " +
+        "finnes på " +
+        "http://trac.openlayers.org/wiki/SphericalMercator.",
+
+    // console message
+    'methodDeprecated':
+        "Denne metoden er markert som foreldet og vil bli fjernet i 3.0. " +
+        "Bruk ${newMethod} i stedet.",
+
+    // console message
+    'boundsAddError': "Du må gi både x- og y-verdier til funksjonen add.",
+
+    // console message
+    'lonlatAddError': "Du må gi både lon- og lat-verdier til funksjonen add.",
+
+    // console message
+    'pixelAddError': "Du må gi både x- og y-verdier til funksjonen add.",
+
+    // console message
+    'unsupportedGeometryType': "Ustøttet geometritype: ${geomType}",
+
+    // console message
+    'pagePositionFailed':
+        "OpenLayers.Util.pagePosition feilet: elementet med id ${elemId} kan være feilplassert.",
+                    
+    'end': ''
+};

Copied: sandbox/topp/trimet/lib/OpenLayers/Lang/zh-TW.js (from rev 7489, trunk/openlayers/lib/OpenLayers/Lang/zh-TW.js)
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Lang/zh-TW.js	                        (rev 0)
+++ sandbox/topp/trimet/lib/OpenLayers/Lang/zh-TW.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -0,0 +1,121 @@
+/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
+ * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+/**
+ * @requires OpenLayers/Lang.js
+ */
+
+/**
+ * Namespace: OpenLayers.Lang["zh-TW"]
+ * Dictionary for Traditional Chinese. (Used Mainly in Taiwan) 
+ * Keys for entries are used in calls to
+ *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
+ *     strings formatted for use with <OpenLayers.String.format> calls.
+ */
+OpenLayers.Lang["zh-TW"] = {
+
+    'unhandledRequest': "未處理的請求,傳回值為 ${statusText}。",
+
+    'permalink': "永久連結",
+
+    'overlays': "額外圖層",
+
+    'baseLayer': "基礎圖層",
+
+    'sameProjection':
+        "地圖縮覽(OverviewMap)只能在跟主地圖相同投影時起作用。",
+
+    'readNotImplemented': "沒有實作讀取的功能。",
+
+    'writeNotImplemented': "沒有實作寫入的功能。",
+
+    'noFID': "因為沒有 FID 所以無法更新 feature。",
+
+    'errorLoadingGML': "讀取GML檔案 ${url} 錯誤。",
+
+    'browserNotSupported':
+        "您的瀏覽器未支援向量渲染. 目前支援的渲染方式是:\n${renderers}",
+
+    'componentShouldBe': "addFeatures : 元件應該為 ${geomType}",
+
+    // console message
+    'getFeatureError':
+        "getFeatureFromEvent 在一個沒有被渲染的圖層裡被呼叫。這通常意味著您 " +
+        "摧毀了一個圖層,但並未摧毀相關的handler。",
+
+    // console message
+    'minZoomLevelError':
+        "minZoomLevel 屬性僅適合用在 " +
+        "FixedZoomLevels-descendent 類型的圖層. 這個" +
+        "wfs layer 的 minZoomLevel 是過去所遺留下來的," +
+        "然而我們不能移除它而不讓它將" +
+        "過去的程式相容性給破壞掉。" +
+        "因此我們將會迴避使用它 -- minZoomLevel " +
+        "會在3.0被移除,請改" +
+        "用在這邊描述的 min/max resolution 設定: " +
+        "http://trac.openlayers.org/wiki/SettingZoomLevels",
+
+    'commitSuccess': "WFS Transaction: 成功 ${response}",
+
+    'commitFailed': "WFS Transaction: 失敗 ${response}",
+
+    'googleWarning':
+        "The Google Layer 圖層無法被正確的載入。<br><br>" +
+        "要迴避這個訊息, 請在右上角的圖層改變器裡," +
+        "選一個新的基礎圖層。<br><br>" +
+        "很有可能是因為 Google Maps 的函式庫" +
+        "腳本沒有被正確的置入,或沒有包含 " +
+        "您網站上正確的 API key <br><br>" +
+        "開發者: 要幫助這個行為正確完成," +
+        "<a href='http://trac.openlayers.org/wiki/Google' " +
+        "target='_blank'>請按這裡</a>",
+
+    'getLayerWarning':
+        "${layerType} 圖層無法被正確的載入。<br><br>" +
+        "要迴避這個訊息, 請在右上角的圖層改變器裡," +
+        "選一個新的基礎圖層。<br><br>" +
+        "很有可能是因為 ${layerLib} 的函式庫" +
+        "腳本沒有被正確的置入。<br><br>" +
+        "開發者: 要幫助這個行為正確完成," +
+        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
+        "target='_blank'>請按這裡</a>",
+
+    'scale': "Scale = 1 : ${scaleDenom}",
+
+    // console message
+    'layerAlreadyAdded':
+        "你試著新增圖層: ${layerName} 到地圖上,但圖層之前就已經被新增了。",
+
+    // console message
+    'reprojectDeprecated':
+        "你正使用 'reproject' 這個選項 " +
+        "在 ${layerName} 層。這個選項已經不再使用:" +
+        "它的使用原本是設計用來支援在商業地圖上秀出資料," + 
+        "但這個功能已經被" +
+        "Spherical Mercator所取代。更多的資訊可以在 " +
+        "http://trac.openlayers.org/wiki/SphericalMercator 找到。",
+
+    // console message
+    'methodDeprecated':
+        "這個方法已經不再使用且在3.0將會被移除," +
+        "請使用 ${newMethod} 來代替。",
+
+    // console message
+    'boundsAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
+
+    // console message
+    'lonlatAddError': "您必須傳入 lon 跟 lat 兩者的值進 add 函數。",
+
+    // console message
+    'pixelAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
+
+    // console message
+    'unsupportedGeometryType': "未支援的幾何型別: ${geomType}。",
+
+    // console message
+    'pagePositionFailed':
+        "OpenLayers.Util.pagePosition 失敗: id ${elemId} 的 element 可能被錯置。",
+                    
+    'end': ''
+};

Modified: sandbox/topp/trimet/lib/OpenLayers/Layer/GeoRSS.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Layer/GeoRSS.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Layer/GeoRSS.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -121,7 +121,6 @@
     moveTo:function(bounds, zoomChanged, minor) {
         OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments);
         if(this.visibility && !this.loaded){
-            this.events.triggerEvent("loadstart");
             this.loadRSS();
         }
     },

Modified: sandbox/topp/trimet/lib/OpenLayers/Layer/WFS.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Layer/WFS.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Layer/WFS.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -59,6 +59,8 @@
       * APIProperty: format
       * {<OpenLayers.Format>} The format you want the data to be parsed with.
       * Must be passed in the constructor. Should be a class, not an instance.
+      * This option can only be used if no featureClass is passed / vectorMode
+      * is false: if a featureClass is passed, then this parameter is ignored.
       */
     format: null,
 
@@ -78,7 +80,8 @@
 
     /**
      * Property: vectorMode
-     * {Boolean} Should be calculated automatically.
+     * {Boolean} Should be calculated automatically. Determines whether the
+     *     layer is in vector mode or marker mode.
      */
     vectorMode: true, 
     
@@ -433,7 +436,7 @@
      * altUrl - {String} Use this as the url instead of the layer's url
      */
     getFullRequestString:function(newParams, altUrl) {
-        var projectionCode = this.map.getProjection();
+        var projectionCode = this.projection.getCode() || this.map.getProjection();
         this.params.SRS = (projectionCode == "none") ? null : projectionCode;
 
         return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(

Modified: sandbox/topp/trimet/lib/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Layer/WMS.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Layer/WMS.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -186,7 +186,8 @@
      * Catch changeParams and uppercase the new params to be merged in
      *     before calling changeParams on the super class.
      * 
-     *     Once params have been changed, we will need to re-init our tiles.
+     *     Once params have been changed, the tiles will be reloaded with
+     *     the new parameters.
      * 
      * Parameters:
      * newParams - {Object} Hashtable of new params to use
@@ -199,7 +200,7 @@
     },
 
     /** 
-     * Method: getFullRequestString
+     * APIMethod: getFullRequestString
      * Combine the layer's url with its params and these newParams. 
      *   
      *     Add the SRS parameter from projection -- this is probably

Modified: sandbox/topp/trimet/lib/OpenLayers/Map.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Map.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Map.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -1763,6 +1763,21 @@
         return resolution;
     },
 
+    /**
+     * APIMethod: getUnits
+     * 
+     * Returns:
+     * {Float} The current units of the map. 
+     *         If no baselayer is set, returns null.
+     */
+    getUnits: function () {
+        var units = null;
+        if (this.baseLayer != null) {
+            units = this.baseLayer.units;
+        }
+        return units;
+    },
+
      /**
       * APIMethod: getScale
       * 

Modified: sandbox/topp/trimet/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Renderer/Elements.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Renderer/Elements.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -348,8 +348,8 @@
      * Method: nodeFactory
      * Create new node of the specified type, with the (optional) specified id.
      * 
-     * If node already exists with same ID and type, we remove it and then
-     *  call ourselves again to recreate it.
+     * If node already exists with same ID and a different type, we remove it
+     *     and then call ourselves again to recreate it.
      * 
      * Parameters:
      * id - {String}

Modified: sandbox/topp/trimet/lib/OpenLayers/Tile/WFS.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Tile/WFS.js	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/lib/OpenLayers/Tile/WFS.js	2008-07-11 17:38:45 UTC (rev 7490)
@@ -133,13 +133,17 @@
         if (this.features) {
             var doc = request.responseXML;
             if (!doc || !doc.documentElement) {
-                doc = OpenLayers.Format.XML.prototype.read(request.responseText);
+                doc = request.responseText; 
             }
             if (this.layer.vectorMode) {
                 this.layer.addFeatures(this.layer.formatObject.read(doc));
             } else {
-                var resultFeatures = OpenLayers.Ajax.getElementsByTagNameNS(
-                    doc, "http://www.opengis.net/gml", "gml", "featureMember"
+                var xml = new OpenLayers.Format.XML();
+                if (typeof doc == "string") {
+                    doc = xml.read(doc);
+                }
+                var resultFeatures = xml.getElementsByTagNameNS(
+                    doc, "http://www.opengis.net/gml", "featureMember"
                 );
                 this.addResults(resultFeatures);
             }

Modified: sandbox/topp/trimet/tests/BaseTypes.html
===================================================================
--- sandbox/topp/trimet/tests/BaseTypes.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/BaseTypes.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -141,6 +141,43 @@
         );
 
     }
+
+    function test_String_isNumeric(t) {
+        var cases = [
+            {value: "3", expect: true},
+            {value: "+3", expect: true},
+            {value: "-3", expect: true},
+            {value: "3.0", expect: true},
+            {value: "+3.0", expect: true},
+            {value: "-3.0", expect: true},
+            {value: "6.02e23", expect: true},
+            {value: "+1.0e-100", expect: true},
+            {value: "-1.0e+100", expect: true},
+            {value: "1E100", expect: true},
+            {value: null, expect: false},
+            {value: true, expect: false},
+            {value: false, expect: false},
+            {value: undefined, expect: false},
+            {value: "", expect: false},
+            {value: "3 ", expect: false},
+            {value: " 3", expect: false},
+            {value: "1e", expect: false},
+            {value: "1+e", expect: false},
+            {value: "1-e", expect: false}
+        ];
+        t.plan(cases.length);
+        
+        var func = OpenLayers.String.isNumeric;
+        var obj, val, got, exp;
+        for(var i=0; i<cases.length; ++i) {
+            obj = cases[i];
+            val = obj.value;
+            exp = obj.expect;
+            got = func(val);
+            t.eq(got, exp, "'" + val + "' returns " + exp);
+        }
+        
+    }
    
    
     function test_Number_limitSigDigs(t) {

Modified: sandbox/topp/trimet/tests/Control/ScaleLine.html
===================================================================
--- sandbox/topp/trimet/tests/Control/ScaleLine.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Control/ScaleLine.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -86,8 +86,8 @@
         map.addControl(control);
         t.eq(control.div.firstChild.style.visibility, "visible", "top scale is present.");
         t.eq(control.div.lastChild.style.visibility, "visible", "bottom scale is present.");
-        t.eq(control.div.firstChild.innerHTML, "20000 km", "top scale has correct text.");
-        t.eq(control.div.lastChild.innerHTML, "20000 mi", "bottom scale has correct text.");
+        t.eq(control.div.firstChild.innerHTML, "200 m", "top scale has correct text.");
+        t.eq(control.div.lastChild.innerHTML, "1000 ft", "bottom scale has correct text.");
         map.destroy();
     }
     

Modified: sandbox/topp/trimet/tests/Format/WKT.html
===================================================================
--- sandbox/topp/trimet/tests/Format/WKT.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Format/WKT.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -216,8 +216,29 @@
  
     }
 
+    function test_Format_WKT_read_projection(t) {
+        t.plan(1);
+
+        var projections = {
+            src:  new OpenLayers.Projection("EPSG:4326"),
+            dest: new OpenLayers.Projection("EPSG:900913")
+        };
+
+        var points = {
+            src:  new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-87.9, 41.9)),
+            dest: new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-9784983.239366667, 5146011.678566458))
+        };
+
+        var format = new OpenLayers.Format.WKT({
+            externalProjection: projections["src"],
+            internalProjection: projections["dest"],
+        });
+        var feature = format.read("GEOMETRYCOLLECTION(POINT(" + points["src"].geometry.x + " " + points["src"].geometry.y + "))")[0];
+        t.eq(feature.geometry.toString(), points["dest"].geometry.toString(), 
+            "Geometry collections aren't transformed twice when reprojection.");
+    }
     </script> 
 </head> 
 <body> 
 </body> 
-</html> 
\ No newline at end of file
+</html> 

Modified: sandbox/topp/trimet/tests/Layer/GeoRSS.html
===================================================================
--- sandbox/topp/trimet/tests/Layer/GeoRSS.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Layer/GeoRSS.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -75,6 +75,18 @@
 
         });;
     }
+    function test_Layer_GeoRSS_load_events (t) {
+        t.plan( 1 );    
+        layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
+        var map = new OpenLayers.Map('map');
+        var baseLayer = new OpenLayers.Layer.WMS("Test Layer", 
+            "http://octo.metacarta.com/cgi-bin/mapserv?",
+            {map: "/mapdata/vmap_wms.map", layers: "basic"});
+        map.addLayer(baseLayer);
+        map.addLayer(layer);
+        layer.events.register("loadstart", t, function() { this.ok(true, "loadstart event triggered once (#1580)") });
+        map.setCenter(new OpenLayers.LonLat(0,0),0);
+    }
     function test_Layer_GeoRSS_events (t) {
         t.plan( 4 );    
         layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);

Modified: sandbox/topp/trimet/tests/Layer/WFS.html
===================================================================
--- sandbox/topp/trimet/tests/Layer/WFS.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Layer/WFS.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -129,6 +129,16 @@
         t.eq(layer.tile.url, "http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?typename=OWLS&maxfeatures=10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-187.890625%2C-36.679687%2C-12.109375%2C156.679688", "Tile URL is set correctly when not encoded");
         map.destroy();     
     }
+    function test_projection_srs(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map('map');
+        map.addLayer(new OpenLayers.Layer("",{isBaseLayer: true} ));
+        var layer = new OpenLayers.Layer.WFS("","",{},{'projection': new OpenLayers.Projection("EPSG:900913")});
+        map.addLayer(layer);
+        map.zoomToMaxExtent();
+        var params = OpenLayers.Util.getParameters(layer.getFullRequestString());
+        t.eq(params.SRS, "EPSG:900913", "SRS represents projection of WFS layer, instead of map (#1537)");   
+    }
 
 
   </script>

Modified: sandbox/topp/trimet/tests/Map.html
===================================================================
--- sandbox/topp/trimet/tests/Map.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Map.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -1000,6 +1000,23 @@
         layer.destroy();
         map.destroy();
     }
+    
+    function test_Map_getUnits(t) {
+        t.plan(2);
+        var map = new OpenLayers.Map("map");
+        var units = map.getUnits();
+        t.eq(units, null, "getUnits returns null for no base layer");
+        
+        var layer = new OpenLayers.Layer("test", {
+            isBaseLayer: true,
+            units: 'foo'
+        });
+        map.addLayer(layer);
+        var units = map.getUnits();
+        t.eq(units, 'foo', "getUnits returns the base layer units property");
+        layer.destroy();
+        map.destroy();
+    }
 
     function test_Map_destroy (t) {
         t.plan( 3 );    

Modified: sandbox/topp/trimet/tests/Tile/WFS.html
===================================================================
--- sandbox/topp/trimet/tests/Tile/WFS.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/Tile/WFS.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -128,7 +128,43 @@
         tile.requestSuccess({'requestText': '<xml><foo /></xml>'});
         t.ok(true, "Didn't fail after calling requestSuccess on destroyed tile.");
     }
-
+    function test_nonxml_format(t) {
+        t.plan(1);
+        var data = '{"type":"Feature", "id":"OpenLayers.Feature.Vector_135", "properties":{}, "geometry":{"type":"Point", "coordinates":[118.125, -18.6328125]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}'
+        var position = new OpenLayers.Pixel(10,20);
+        var bounds = new OpenLayers.Bounds(1,2,3,4);
+        var url = "bobob";
+        var size = new OpenLayers.Size(5,6);
+        
+        var tile = new OpenLayers.Tile.WFS({
+            vectorMode: true, 
+            formatObject: new OpenLayers.Format.GeoJSON(), 
+            addFeatures: function(features) { 
+                t.eq(features.length, 1, "GeoJSON format returned a single feature which was added.")
+            }
+        }, position, bounds, url, size);
+        tile.requestSuccess({responseText: data});
+    }  
+     
+    function test_xml_string_and_dom(t) {
+        t.plan(2);
+        var data = '<?xml version="1.0" encoding="ISO-8859-1" ?><wfs:FeatureCollection   xmlns:bsc="http://www.bsc-eoc.org/bsc"   xmlns:wfs="http://www.opengis.net/wfs"   xmlns:gml="http://www.opengis.net/gml"   xmlns:ogc="http://www.opengis.net/ogc"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd                        http://www.bsc-eoc.org/bsc http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=OWLS&amp;OUTPUTFORMAT=XMLSCHEMA">      <gml:boundedBy>        <gml:Box srsName="EPSG:4326">            <gml:coordinates>-94.989723,43.285833 -74.755001,51.709520</gml:coordinates>        </gml:Box>      </gml:boundedBy>    <gml:featureMember>      <bsc:OWLS>        <gml:boundedBy>            <gml:Box srsName="EPSG:4326">                <gml:coordinates>-94.142500,50.992777 -94.142500,50.992777</gml:coordinates>            </gml:Box>        </gml:boundedBy>        <bsc:msGeometry>        <gml:Point srsName="EPSG:4326">          <gml:coordinates>-94.142500,50.992777</gml:coordinates>        </gml:Point>        </bsc:msGeometry>        <bsc:ROUTEID>ON_2</bsc:ROUTEID>        <bsc:ROUTE_NAME>Suffel Road</bsc:ROUTE_NAME>        <bsc:LATITUDE>50.9927770</bsc:LATITUDE>        <bsc:LONGITUDE>-94.1425000</bsc:LONGITUDE>      </bsc:OWLS>    </gml:featureMember></wfs:FeatureCollection>';
+        var position = new OpenLayers.Pixel(10,20);
+        var bounds = new OpenLayers.Bounds(1,2,3,4);
+        var url = "bobob";
+        var size = new OpenLayers.Size(5,6);
+        var tile = new OpenLayers.Tile.WFS({
+        }, position, bounds, url, size);
+        tile.addResults = function(results) {
+            t.eq(results.length, 1, "results count is correct when passing in XML as a string into non-vectormode");
+        } 
+        tile.requestSuccess({responseText: data});
+        
+        tile.addResults = function(results) {
+            t.eq(results.length, 1, "results count is correct when passing in XML as DOM into non-vectormode");
+        } 
+        tile.requestSuccess({responseXML: OpenLayers.Format.XML.prototype.read(data)}); 
+    }         
   </script>
 </head>
 <body>

Modified: sandbox/topp/trimet/tests/run-tests.html
===================================================================
--- sandbox/topp/trimet/tests/run-tests.html	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tests/run-tests.html	2008-07-11 17:38:45 UTC (rev 7490)
@@ -437,7 +437,14 @@
 	if( node.outerHTML!=null ) {
 		Test.AnotherWay._g_html_eq_span.innerHTML=node.outerHTML;
 	}else {
-		Test.AnotherWay._g_html_eq_span.appendChild( node.cloneNode( true ) );
+            var clone = node.cloneNode(true);
+            var node = Test.AnotherWay._g_html_eq_span;
+            if(node.ownerDocument && node.ownerDocument.importNode) {
+                if(node.ownerDocument != clone.ownerDocument) {
+                    clone = node.ownerDocument.importNode(clone, true);
+                }
+            }
+            node.appendChild(clone);
 	}
 	return Test.AnotherWay._g_html_eq_span.innerHTML;
 }

Copied: sandbox/topp/trimet/theme/default/img/navigation_history.png (from rev 7489, trunk/openlayers/theme/default/img/navigation_history.png)
===================================================================
(Binary files differ)

Modified: sandbox/topp/trimet/theme/default/style.css
===================================================================
--- sandbox/topp/trimet/theme/default/style.css	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/theme/default/style.css	2008-07-11 17:38:45 UTC (rev 7490)
@@ -128,29 +128,24 @@
   position: relative;
 }
 
-.olControlNavigationHistoryPreviousItemActive { 
-   background-image: url("img/view_previous_on.png");
+.olControlNavigationHistory {
+   background-image: url("img/navigation_history.png");
    background-repeat: no-repeat;
    width:  24px;
    height: 24px;
+
 }
+.olControlNavigationHistoryPreviousItemActive { 
+  background-position: 0px 0px;
+}
 .olControlNavigationHistoryPreviousItemInactive { 
-   background-image: url("img/view_previous_off.png");
-   background-repeat: no-repeat;
-   width:  24px;
-   height: 24px;
+   background-position: 0px -24px;
 }
 .olControlNavigationHistoryNextItemActive { 
-   background-image: url("img/view_next_on.png");
-   background-repeat: no-repeat;
-   width:  24px;
-   height: 24px;
+   background-position: -24px 0px;
 }
 .olControlNavigationHistoryNextItemInactive { 
-   background-image: url("img/view_next_off.png");
-   background-repeat: no-repeat;
-   width:  24px;
-   height: 24px;
+   background-position: -24px -24px;
 }
 
 .olControlNavToolbar .olControlNavigationItemActive { 

Modified: sandbox/topp/trimet/tools/exampleparser.py
===================================================================
--- sandbox/topp/trimet/tools/exampleparser.py	2008-07-11 14:54:38 UTC (rev 7489)
+++ sandbox/topp/trimet/tools/exampleparser.py	2008-07-11 17:38:45 UTC (rev 7490)
@@ -7,6 +7,17 @@
 import time
 from xml.dom.minidom import Document
 
+try:
+    import xml.etree.ElementTree as ElementTree 
+except ImportError:
+    try:
+        import cElementTree as ElementTree
+    except ImportError:
+        try:
+            import elementtree.ElementTree as ElementTree
+        except ImportError:
+            import lxml.etree as ElementTree
+
 missing_deps = False
 try:
     import simplejson
@@ -14,6 +25,8 @@
 except ImportError, E:
     missing_deps = E 
 
+feedName = "example-list.xml"
+feedPath = "http://openlayers.org/dev/examples/"
 
 def getListOfOnlineExamples(baseUrl):
     """
@@ -82,46 +95,74 @@
     classes = getRelatedClasses(html)
     d['classes'] = classes
     return d
+
+def getSvnInfo(path):
+    h = os.popen("svn info %s --xml" % path)
+    tree = ElementTree.fromstring(h.read())
+    h.close()
+    d = {
+        'url': tree.findtext('entry/url'),
+        'author': tree.findtext('entry/commit/author'),
+        'date': tree.findtext('entry/commit/date')
+    }
+    return d
     
 def createFeed(examples):
     doc = Document()
-    feed = doc.createElementNS("http://www.w3.org/2005/Atom", "feed")
-    feed.setAttribute("xmlns", "http://www.w3.org/2005/Atom") #ug, is this for real??
-    for example in examples:
-        s = os.stat("../examples/" + example["example"])
-        example["modified"] = s.st_mtime
+    atomuri = "http://www.w3.org/2005/Atom"
+    feed = doc.createElementNS(atomuri, "feed")
+    feed.setAttribute("xmlns", atomuri)
+    title = doc.createElementNS(atomuri, "title")
+    title.appendChild(doc.createTextNode("OpenLayers Examples"))
+    feed.appendChild(title)
+    link = doc.createElementNS(atomuri, "link")
+    link.setAttribute("rel", "self")
+    link.setAttribute("href", feedPath + feedName)
     
+    modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
+    id = doc.createElementNS(atomuri, "id")
+    id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, feedName, modtime)))
+    feed.appendChild(id)
+    
+    updated = doc.createElementNS(atomuri, "updated")
+    updated.appendChild(doc.createTextNode(modtime))
+    feed.appendChild(updated)
+
     examples.sort(key=lambda x:x["modified"])
     for example in sorted(examples, key=lambda x:x["modified"], reverse=True):
-        entry = doc.createElementNS("http://www.w3.org/2005/Atom", "entry")
+        entry = doc.createElementNS(atomuri, "entry")
         
-        title = doc.createElementNS("http://www.w3.org/2005/Atom", "title")
+        title = doc.createElementNS(atomuri, "title")
         title.appendChild(doc.createTextNode(example["title"] or example["example"]))
         entry.appendChild(title)
         
-        link = doc.createElementNS("http://www.w3.org/2005/Atom", "link")
-        link.setAttribute("href", example["example"])
+        link = doc.createElementNS(atomuri, "link")
+        link.setAttribute("href", "%s%s" % (feedPath, example["example"]))
         entry.appendChild(link)
     
-        summary = doc.createElementNS("http://www.w3.org/2005/Atom", "summary")
+        summary = doc.createElementNS(atomuri, "summary")
         summary.appendChild(doc.createTextNode(example["shortdesc"] or example["example"]))
         entry.appendChild(summary)
         
-        updated = doc.createElementNS("http://www.w3.org/2005/Atom", "updated")
-        updated.appendChild(doc.createTextNode(
-            time.strftime("%Y-%m-%dT%I:%M:%SZ",time.gmtime(example["modified"]))))
+        updated = doc.createElementNS(atomuri, "updated")
+        updated.appendChild(doc.createTextNode(example["modified"]))
         entry.appendChild(updated)
         
+        author = doc.createElementNS(atomuri, "author")
+        name = doc.createElementNS(atomuri, "name")
+        name.appendChild(doc.createTextNode(example["author"]))
+        author.appendChild(name)
+        entry.appendChild(author)
+        
+        id = doc.createElementNS(atomuri, "id")
+        id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, example["example"], example["modified"])))
+        entry.appendChild(id)
+        
         feed.appendChild(entry)
 
     doc.appendChild(feed)
-    return doc
-
-def createEntry(doc, example):
+    return doc    
     
-    return entry
-    
-    
 def wordIndex(examples):
     """
     Create an inverted index based on words in title and shortdesc.  Keys are
@@ -171,12 +212,19 @@
 
     examples = getListOfExamples(examplesLocation)
 
+    modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
+
     for example in examples:
         url = os.path.join(examplesLocation,example)
         html = getExampleHtml(url)
         tagvalues = parseHtml(html,docIds)
         tagvalues['example'] = example
-        tagvalues['link'] = url
+        # add in svn info
+        d = getSvnInfo(url)
+        tagvalues["modified"] = d["date"] or modtime
+        tagvalues["author"] = d["author"] or "anonymous"
+        tagvalues['link'] = example
+
         exampleList.append(tagvalues)
         
     print
@@ -191,8 +239,8 @@
     outFile.write(json)
     outFile.close()
 
-    print "writing feed to ../examples/example-list.xml "
-    atom = open('../examples/example-list.xml','w')
+    print "writing feed to ../examples/%s " % feedName
+    atom = open('../examples/%s' % feedName, 'w')
     doc = createFeed(exampleList)
     atom.write(doc.toxml())
     atom.close()

Copied: sandbox/topp/trimet/tools/oldot.py (from rev 7489, trunk/openlayers/tools/oldot.py)
===================================================================
--- sandbox/topp/trimet/tools/oldot.py	                        (rev 0)
+++ sandbox/topp/trimet/tools/oldot.py	2008-07-11 17:38:45 UTC (rev 7490)
@@ -0,0 +1,43 @@
+import re
+import os    
+def run():
+    sourceDirectory = "../lib/OpenLayers"    
+    allFiles = []
+    SUFFIX_JAVASCRIPT = ".js"
+    ## Find all the Javascript source files
+    for root, dirs, files in os.walk(sourceDirectory):
+        for filename in files:
+            if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."):
+                filepath = os.path.join(root, filename)[len(sourceDirectory)+1:]
+                filepath = filepath.replace("\\", "/")
+                data = open(os.path.join(sourceDirectory, filepath)).read()
+                parents = re.search("OpenLayers.Class\((.*?){", data, 
+                      re.DOTALL)
+                if parents:
+                    parents = [x.strip() for x in parents.group(1).strip().strip(",").split(",")]
+                else: 
+                    parents = []
+                cls = "OpenLayers.%s" % filepath.strip(".js").replace("/", ".")
+                allFiles.append([cls, parents])
+    return allFiles
+print """
+digraph name {
+  fontname = "Helvetica"
+  fontsize = 8
+  K = 0.6
+
+  node [
+    fontname = "Helvetica"
+    fontsize = 8
+    shape = "plaintext"
+  ]
+"""
+
+for i in run():
+    print i[0].replace(".", "_")
+    for item in i[1]:
+        if not item: continue
+        print "%s -> %s" % (i[0].replace(".","_"), item.replace(".", "_"))
+    print "; "
+
+print """}"""



More information about the Commits mailing list