[OpenLayers-Commits] r11502 - in sandbox/cmoullet/openlayers: . build examples examples/img img lib/OpenLayers lib/OpenLayers/BaseTypes lib/OpenLayers/Layer tests tests/BaseTypes tests/Layer theme/default/img tools

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Fri Feb 25 09:20:49 EST 2011


Author: cmoullet
Date: 2011-02-25 06:20:48 -0800 (Fri, 25 Feb 2011)
New Revision: 11502

Added:
   sandbox/cmoullet/openlayers/examples/img/check-round-green.png
   sandbox/cmoullet/openlayers/examples/img/check-round-grey.png
   sandbox/cmoullet/openlayers/examples/img/list.png
   sandbox/cmoullet/openlayers/examples/img/minus1.png
   sandbox/cmoullet/openlayers/examples/mobile-base.js
   sandbox/cmoullet/openlayers/examples/mobile-sencha.js
Modified:
   sandbox/cmoullet/openlayers/
   sandbox/cmoullet/openlayers/build/build.py
   sandbox/cmoullet/openlayers/build/mobile.cfg
   sandbox/cmoullet/openlayers/examples/mobile-jq.html
   sandbox/cmoullet/openlayers/examples/mobile-navigation.js
   sandbox/cmoullet/openlayers/examples/mobile-sencha.html
   sandbox/cmoullet/openlayers/examples/mobile.html
   sandbox/cmoullet/openlayers/examples/mobile.js
   sandbox/cmoullet/openlayers/examples/tile-origin.html
   sandbox/cmoullet/openlayers/img/cloud-popup-relative.png
   sandbox/cmoullet/openlayers/img/drag-rectangle-off.png
   sandbox/cmoullet/openlayers/img/drag-rectangle-on.png
   sandbox/cmoullet/openlayers/img/east-mini.png
   sandbox/cmoullet/openlayers/img/layer-switcher-maximize.png
   sandbox/cmoullet/openlayers/img/layer-switcher-minimize.png
   sandbox/cmoullet/openlayers/img/marker-blue.png
   sandbox/cmoullet/openlayers/img/marker-gold.png
   sandbox/cmoullet/openlayers/img/marker-green.png
   sandbox/cmoullet/openlayers/img/marker.png
   sandbox/cmoullet/openlayers/img/measuring-stick-off.png
   sandbox/cmoullet/openlayers/img/measuring-stick-on.png
   sandbox/cmoullet/openlayers/img/north-mini.png
   sandbox/cmoullet/openlayers/img/panning-hand-off.png
   sandbox/cmoullet/openlayers/img/panning-hand-on.png
   sandbox/cmoullet/openlayers/img/slider.png
   sandbox/cmoullet/openlayers/img/south-mini.png
   sandbox/cmoullet/openlayers/img/west-mini.png
   sandbox/cmoullet/openlayers/img/zoom-minus-mini.png
   sandbox/cmoullet/openlayers/img/zoom-plus-mini.png
   sandbox/cmoullet/openlayers/img/zoom-world-mini.png
   sandbox/cmoullet/openlayers/img/zoombar.png
   sandbox/cmoullet/openlayers/lib/OpenLayers/BaseTypes/Pixel.js
   sandbox/cmoullet/openlayers/lib/OpenLayers/Layer/Grid.js
   sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js
   sandbox/cmoullet/openlayers/tests/BaseTypes/Pixel.html
   sandbox/cmoullet/openlayers/tests/Layer/ArcGIS93Rest.html
   sandbox/cmoullet/openlayers/tests/Layer/Grid.html
   sandbox/cmoullet/openlayers/tests/Layer/KaMap.html
   sandbox/cmoullet/openlayers/tests/Layer/MapGuide.html
   sandbox/cmoullet/openlayers/tests/Layer/MapServer.html
   sandbox/cmoullet/openlayers/tests/Layer/TMS.html
   sandbox/cmoullet/openlayers/tests/Layer/WMS.html
   sandbox/cmoullet/openlayers/tests/Layer/WrapDateLine.html
   sandbox/cmoullet/openlayers/tests/Layer/XYZ.html
   sandbox/cmoullet/openlayers/tests/Map.html
   sandbox/cmoullet/openlayers/theme/default/img/add_point_off.png
   sandbox/cmoullet/openlayers/theme/default/img/drag-rectangle-off.png
   sandbox/cmoullet/openlayers/theme/default/img/drag-rectangle-on.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_line_off.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_line_on.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_point_off.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_point_on.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_polygon_off.png
   sandbox/cmoullet/openlayers/theme/default/img/draw_polygon_on.png
   sandbox/cmoullet/openlayers/theme/default/img/editing_tool_bar.png
   sandbox/cmoullet/openlayers/theme/default/img/move_feature_off.png
   sandbox/cmoullet/openlayers/theme/default/img/move_feature_on.png
   sandbox/cmoullet/openlayers/theme/default/img/navigation_history.png
   sandbox/cmoullet/openlayers/theme/default/img/pan-panel-NOALPHA.png
   sandbox/cmoullet/openlayers/theme/default/img/pan-panel.png
   sandbox/cmoullet/openlayers/theme/default/img/pan_on.png
   sandbox/cmoullet/openlayers/theme/default/img/panning-hand-off.png
   sandbox/cmoullet/openlayers/theme/default/img/panning-hand-on.png
   sandbox/cmoullet/openlayers/theme/default/img/remove_point_on.png
   sandbox/cmoullet/openlayers/theme/default/img/save_features_off.png
   sandbox/cmoullet/openlayers/theme/default/img/save_features_on.png
   sandbox/cmoullet/openlayers/theme/default/img/view_next_off.png
   sandbox/cmoullet/openlayers/theme/default/img/view_previous_off.png
   sandbox/cmoullet/openlayers/theme/default/img/zoom-panel.png
   sandbox/cmoullet/openlayers/tools/
   sandbox/cmoullet/openlayers/tools/release.sh
   sandbox/cmoullet/openlayers/tools/update_dev_dir.sh
Log:
Merge with trunk



Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11463
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11499

Modified: sandbox/cmoullet/openlayers/build/build.py
===================================================================
--- sandbox/cmoullet/openlayers/build/build.py	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/build/build.py	2011-02-25 14:20:48 UTC (rev 11502)
@@ -15,7 +15,7 @@
     try:
         import closure
         have_compressor.append("closure")
-    except ImportError, E:
+    except Exception, E:
         print "No closure (%s) % E"
     try:
         import closure_ws

Modified: sandbox/cmoullet/openlayers/build/mobile.cfg
===================================================================
--- sandbox/cmoullet/openlayers/build/mobile.cfg	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/build/mobile.cfg	2011-02-25 14:20:48 UTC (rev 11502)
@@ -12,6 +12,9 @@
 OpenLayers/Control/TouchNavigation.js
 OpenLayers/Control/Geolocate.js
 OpenLayers/Control/ZoomPanel.js
+OpenLayers/Control/Attribution.js
+OpenLayers/Layer/Vector.js
+OpenLayers/Renderer/SVG.js
 
 [exclude]
 

Copied: sandbox/cmoullet/openlayers/examples/img/check-round-green.png (from rev 11499, trunk/openlayers/examples/img/check-round-green.png)
===================================================================
(Binary files differ)

Copied: sandbox/cmoullet/openlayers/examples/img/check-round-grey.png (from rev 11499, trunk/openlayers/examples/img/check-round-grey.png)
===================================================================
(Binary files differ)

Copied: sandbox/cmoullet/openlayers/examples/img/list.png (from rev 11499, trunk/openlayers/examples/img/list.png)
===================================================================
(Binary files differ)

Copied: sandbox/cmoullet/openlayers/examples/img/minus1.png (from rev 11499, trunk/openlayers/examples/img/minus1.png)
===================================================================
(Binary files differ)

Copied: sandbox/cmoullet/openlayers/examples/mobile-base.js (from rev 11499, trunk/openlayers/examples/mobile-base.js)
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-base.js	                        (rev 0)
+++ sandbox/cmoullet/openlayers/examples/mobile-base.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -0,0 +1,108 @@
+// API key for http://openlayers.org. Please get your own at
+// http://bingmapsportal.com/ and use that instead.
+var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
+
+// initialize map when page ready
+var map;
+var gg = new OpenLayers.Projection("EPSG:4326");
+var sm = new OpenLayers.Projection("EPSG:900913");
+
+var init = function () {
+
+    var vector = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+    var geolocate = new OpenLayers.Control.Geolocate({
+        id: 'locate-control',
+        geolocationOptions: {
+            enableHighAccuracy: false,
+            maximumAge: 0,
+            timeout: 7000
+        }
+    });
+    // create map
+    map = new OpenLayers.Map({
+        div: "map",
+        theme: null,
+        projection: sm,
+        units: "m",
+        numZoomLevels: 18,
+        maxResolution: 156543.0339,
+        maxExtent: new OpenLayers.Bounds(
+            -20037508.34, -20037508.34, 20037508.34, 20037508.34
+        ),
+        controls: [
+            new OpenLayers.Control.Attribution(),
+            new OpenLayers.Control.TouchNavigation({
+                dragPanOptions: {
+                    interval: 0, // non-zero kills performance on some mobile phones
+                    enableKinetic: true
+                }
+            }),
+            geolocate
+        ],
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            }),
+            new OpenLayers.Layer.Bing({
+                key: apiKey,
+                type: "Road",
+                // custom metadata parameter to request the new map style - only useful
+                // before May 1st, 2011
+                metadataParams: {
+                    mapVersion: "v1"
+                },
+                name: "Bing Road",
+                transitionEffect: 'resize'
+            }),
+            new OpenLayers.Layer.Bing({
+                key: apiKey,
+                type: "Aerial",
+                name: "Bing Aerial",
+                transitionEffect: 'resize'
+            }),
+            new OpenLayers.Layer.Bing({
+                key: apiKey,
+                type: "AerialWithLabels",
+                name: "Bing Aerial + Labels",
+                transitionEffect: 'resize'
+            }), 
+            vector
+        ]
+    });
+    map.zoomToMaxExtent();
+
+    var style = {
+        fillOpacity: 0.1,
+        fillColor: '#000',
+        strokeColor: '#f00',
+        strokeOpacity: 0.6
+    };
+    geolocate.events.register("locationupdated",this,function(e) {
+        vector.removeAllFeatures();
+        vector.addFeatures([
+            new OpenLayers.Feature.Vector(
+                e.point,
+                {},
+                {
+                    graphicName: 'cross',
+                    strokeColor: '#f00',
+                    strokeWidth: 2,
+                    fillOpacity: 0,
+                    pointRadius: 10
+                }
+            ),
+            new OpenLayers.Feature.Vector(
+                OpenLayers.Geometry.Polygon.createRegularPolygon(
+                    new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+                    e.position.coords.accuracy/2,
+                    50,
+                    0
+                ),
+                {},
+                style
+            )
+        ]);
+        map.zoomToExtent(vector.getDataExtent());
+    });
+};

Modified: sandbox/cmoullet/openlayers/examples/mobile-jq.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-jq.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/mobile-jq.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -11,7 +11,7 @@
         <script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>
         <link rel="stylesheet" href="style.mobile.css" type="text/css">
         <script src="../lib/OpenLayers.js"></script>
-        <script src="mobile.js"></script>
+        <script src="mobile-base.js"></script>
         <style>
             html {
                 height: 100%;

Modified: sandbox/cmoullet/openlayers/examples/mobile-navigation.js
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-navigation.js	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/mobile-navigation.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -1,17 +1,30 @@
-var map, layer;
+var map;
+
 function init() {
-    map = new OpenLayers.Map('map', { controls: [
-        new OpenLayers.Control.TouchNavigation({
-            dragPanOptions: {
-                interval: 0, // non-zero kills performance on some mobile phones
-                enableKinetic: true
-            }
-        }),
-        new OpenLayers.Control.ZoomPanel()
-    ] });
-    layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
-            "http://vmap0.tiles.osgeo.org/wms/vmap0",
-            {layers: 'basic'} );
-    map.addLayer(layer);
-    map.setCenter(new OpenLayers.LonLat(5, 40), 2);
+    map = new OpenLayers.Map({
+        div: "map",
+        theme: null,
+        projection: new OpenLayers.Projection("EPSG:900913"),
+        units: "m",
+        numZoomLevels: 18,
+        maxResolution: 156543.0339,
+        maxExtent: new OpenLayers.Bounds(
+            -20037508.34, -20037508.34, 20037508.34, 20037508.34
+        ),
+        controls: [
+            new OpenLayers.Control.TouchNavigation({
+                dragPanOptions: {
+                    interval: 0, // non-zero kills performance on some mobile phones
+                    enableKinetic: true
+                }
+            }),
+            new OpenLayers.Control.ZoomPanel()
+        ],
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            })
+        ]
+    });
+    map.setCenter(new OpenLayers.LonLat(0, 0), 3);
 }

Modified: sandbox/cmoullet/openlayers/examples/mobile-sencha.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-sencha.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/mobile-sencha.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -5,12 +5,30 @@
     <meta name="apple-mobile-web-app-capable" content="yes" />
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
         <title>OpenLayers with Sencha Touch</title>
-        <script src="../lib/OpenLayers.js"></script>
+        <script src="../lib/OpenLayers.js?mobile"></script>
         <link rel="stylesheet" href="style.mobile.css" type="text/css">
         <link rel="stylesheet" href="http://dev.sencha.com/deploy/touch/resources/css/sencha-touch.css">
         <script src="http://dev.sencha.com/deploy/touch/sencha-touch.js"></script>
-        <script src="mobile.js"></script>
+        <script src="mobile-sencha.js"></script>
+        <script src="mobile-base.js"></script>
         <style>
+            .searchList {
+                min-height: 150px;
+            }
+            .close-btn {
+                position: absolute;
+                right: 10px;
+                top: 10px;
+            }
+            img.minus {
+                -webkit-mask-image: url(img/minus1.png);
+            }
+            img.layers {
+                -webkit-mask-image: url(img/list.png);
+            }
+            .gx-layer-item {
+                margin-left: 10px;
+            }
             #map {
                 width: 100%;
                 height: 100%;
@@ -25,100 +43,96 @@
             }
         </style>
         <script>
-        
-        new Ext.Application({
+
+        var app = new Ext.Application({
             name: "ol",
             launch: function() {
                 this.viewport = new Ext.Panel({
                     fullscreen: true,
                     dockedItems: [{
-                        dock: "top",
+                        dock: "bottom",
                         xtype: "toolbar",
                         ui: "light",
                         layout: {
                             pack: "center"
                         },
-                        defaults: {
-                            ui: "plain",
-                            iconMask: true
-                        },
                         items: [{
-                            iconCls: "arrow_left",
+                            iconCls: "search",
+                            iconMask: true,
+                            handler: function(){
+                                // this is the app
+                                if (!app.searchFormPopupPanel) {
+                                    app.searchFormPopupPanel = new App.SearchFormPopupPanel({
+                                        map: map
+                                    });
+                                }
+                                app.searchFormPopupPanel.show('pop');
+                            }
+                        }, {
+                            iconCls: "locate",
+                            iconMask: true,
                             handler: function() {
-                                pan(-0.25, 0);
+                                var geolocate = map.getControlsBy("id", "locate-control")[0];
+                                if (geolocate.active) {
+                                    geolocate.getCurrentLocation();
+                                } else {
+                                    geolocate.activate();
+                                }
                             }
                         }, {
-                            iconCls: "arrow_up",
+                            xtype: "spacer"
+                        }, {
+                            iconMask: true,
+                            iconCls: "add",
                             handler: function() {
-                                pan(0, -0.25);
+                                map.zoomIn();
                             }
                         }, {
-                            iconCls: "arrow_down",
+                            iconMask: true,
+                            iconCls: "minus",
                             handler: function() {
-                                pan(0, 0.25);
+                                map.zoomOut();
                             }
                         }, {
-                            iconCls: "arrow_right",
+                            xtype: "spacer"
+                        }, {
+                            iconMask: true,
+                            iconCls: "layers",
                             handler: function() {
-                                pan(0.25, 0);
-                            }
-                        }]
-                    }, {
-                        dock: "bottom",
-                        xtype: "toolbar",
-                        ui: "light",
-                        layout: {
-                            pack: "center"
-                        },
-                        items: [{
-                            xtype: "segmentedbutton",
-                            items: [{
-                                text: "navigate",
-                                pressed: true
-                            }, {
-                                text: "point",
-                                id: "point"
-                            }, {
-                                text: "line",
-                                id: "line"
-                            }, {
-                                text: "poly",
-                                id: "poly"
-                            }, {
-                                text: "modify",
-                                id: "mod"
-                            }],
-                            listeners: {
-                                toggle: function(container, button, pressed) {
-                                    Ext.each(map.getControlsByClass(/DrawFeature/), function(control) {
-                                        control.deactivate();
+                                if (!app.popup) {
+                                    app.popup = new Ext.Panel({
+                                        floating: true,
+                                        modal: true,
+                                        centered: true,
+                                        hideOnMaskTap: true,
+                                        width: 240,
+                                        items: [{
+                                            xtype: 'app_layerlist',
+                                            map: map
+                                        }],
+                                        scroll: 'vertical'
                                     });
-                                    map.getControlsBy("id", "mod-control")[0].deactivate();
-                                    if (pressed) {
-                                        var id = button.id + "-control";
-                                        var control = map.getControlsBy("id", id)[0];
-                                        if (control) {
-                                            control.activate();
-                                        }
-                                    }
                                 }
+                                app.popup.show('pop');
                             }
                         }]
                     }],
-                    items: [{
-                        xtype: "component",
-                        scroll: false,
-                        monitorResize: true,
-                        id: "map",
-                        listeners: {
-                            render: init,
-                            resize: function() {
-                                if (window.map) {
-                                    map.updateSize();
+                    items: [
+                        {
+                            xtype: "component",
+                            scroll: false,
+                            monitorResize: true,
+                            id: "map",
+                            listeners: {
+                                render: init,
+                                resize: function() {
+                                    if (window.map) {
+                                        map.updateSize();
+                                    }
                                 }
                             }
                         }
-                    }]
+                    ]
                 });
             }
         });

Copied: sandbox/cmoullet/openlayers/examples/mobile-sencha.js (from rev 11499, trunk/openlayers/examples/mobile-sencha.js)
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-sencha.js	                        (rev 0)
+++ sandbox/cmoullet/openlayers/examples/mobile-sencha.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -0,0 +1,198 @@
+Ext.ns('App');
+
+/**
+ * The model for the geonames records used in the search
+ */
+Ext.regModel('Geonames', {
+    fields: ['countryName', 'toponymName', 'name', 'lat', 'lng']
+});
+
+/**
+ * Custom class for the Search 
+ */
+App.SearchFormPopupPanel = Ext.extend(Ext.Panel, {
+    map: null,
+    floating: true,
+    modal: true,
+    centered: true,
+    hideOnMaskTap: true,
+    width: Ext.is.Phone ? undefined : 400,
+    height: Ext.is.Phone ? undefined : 400,
+    scroll: false,
+    layout: 'fit',
+    fullscreen: Ext.is.Phone ? true : undefined,
+    url: 'http://ws.geonames.org/searchJSON?',
+    errorText: 'Sorry, we had problems communicating with geonames.org. Please try again.',
+    errorTitle: 'Communication error',
+    maxResults: 6,
+    featureClass: "P",
+    
+    createStore: function(){
+        this.store = new Ext.data.Store({
+            model: 'Geonames',
+            proxy: {
+                type: 'scripttag',
+                timeout: 5000,
+                listeners: {
+                    exception: function(){
+                        this.hide();
+                        Ext.Msg.alert(this.errorTitle, this.errorText, Ext.emptyFn);
+                    },
+                    scope: this
+                },
+                url: this.url,
+                reader: {
+                    type: 'json',
+                    root: 'geonames'
+                }
+            }
+        });
+    },
+    
+    doSearch: function(searchfield, evt){
+        var q = searchfield.getValue();
+        this.store.load({
+            params: {
+                featureClass: this.featureClass,
+                maxRows: this.maxResults,
+                name_startsWith: encodeURIComponent(q)
+            }
+        });
+    },
+    
+    onItemTap: function(dataView, index, item, event){
+        var record = this.store.getAt(index);
+        var lon = record.get('lng');
+        var lat = record.get('lat');
+        var lonlat = new OpenLayers.LonLat(lon, lat);
+        map.setCenter(lonlat.transform(gg, sm), 12);
+        this.hide("pop");
+    },
+    
+    initComponent: function(){
+        this.createStore();
+        this.resultList = new Ext.List({
+            scroll: 'vertical',
+            cls: 'searchList',
+            loadingText: "Searching ...",
+            store: this.store,
+            itemTpl: '<div>{name} ({countryName})</div>',
+            listeners: {
+                itemtap: this.onItemTap,
+                scope: this
+            }
+        });
+        this.formContainer = new Ext.form.FormPanel({
+            scroll: false,
+            items: [{
+                xtype: 'button',
+                cls: 'close-btn',
+                ui: 'decline-small',
+                text: 'Close',
+                handler: function(){
+                    this.hide();
+                },
+                scope: this 
+            }, {
+                xtype: 'fieldset',
+                scroll: false,
+                title: 'Search for a place',
+                items: [{
+                    xtype: 'searchfield',
+                    label: 'Search',
+                    placeHolder: 'placename',
+                    listeners: {
+                        action: this.doSearch,
+                        scope: this
+                    }
+                },
+                    this.resultList
+                ]
+            }]
+        });
+        this.items = [{
+            xtype: 'panel',
+            layout: 'fit',
+            items: [this.formContainer]
+        }];
+        App.SearchFormPopupPanel.superclass.initComponent.call(this);
+    }
+});
+
+App.LayerList = Ext.extend(Ext.List, {
+    
+    map: null,
+    
+    createStore: function(){
+        Ext.regModel('Layer', {
+            fields: ['id', 'name', 'visibility', 'zindex']
+        });
+        var data = [];
+        Ext.each(this.map.layers, function(layer){
+            if (layer.displayInLayerSwitcher === true) {
+                var visibility = layer.isBaseLayer ? (this.map.baseLayer == layer) : layer.getVisibility();
+                data.push({
+                    id: layer.id,
+                    name: layer.name,
+                    visibility: visibility,
+                    zindex: layer.getZIndex()
+                });
+            }
+        });
+        return new Ext.data.Store({
+            model: 'Layer',
+            sorters: 'zindex',
+            data: data
+        });
+    },
+    
+    initComponent: function(){
+        this.store = this.createStore();
+        this.itemTpl = new Ext.XTemplate(
+            '<tpl if="visibility == true">', 
+                '<img width="20" src="img/check-round-green.png">', 
+            '</tpl>', 
+            '<tpl if="visibility == false">', 
+                '<img width="20" src="img/check-round-grey.png">', 
+            '</tpl>', 
+            '<span class="gx-layer-item">{name}</span>'
+        );
+        this.listeners = {
+            itemtap: function(dataview, index, item, e){
+                var record = dataview.getStore().getAt(index);
+                var layer = this.map.getLayersBy("id", record.get("id"))[0];
+                if (layer.isBaseLayer) {
+                    this.map.setBaseLayer(layer);
+                }
+                else {
+                    layer.setVisibility(!layer.getVisibility());
+                }
+                record.set("visibility", layer.getVisibility());
+            }
+        };
+        this.map.events.on({
+            "changelayer": this.onChangeLayer,
+            scope: this
+        });
+        App.LayerList.superclass.initComponent.call(this);
+    },
+
+    findLayerRecord: function(layer){
+        var found;
+        this.store.each(function(record){
+            if (record.get("id") === layer.id) {
+                found = record;
+            }
+        }, this);
+        return found;
+    },
+    
+    onChangeLayer: function(evt){
+        if (evt.property == "visibility") {
+            var record = this.findLayerRecord(evt.layer);
+            record.set("visibility", evt.layer.getVisibility());
+        }
+    }
+    
+});
+Ext.reg('app_layerlist', App.LayerList);

Modified: sandbox/cmoullet/openlayers/examples/mobile.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/mobile.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -2,6 +2,7 @@
 <html>
     <head>
         <title>OpenLayers Mobile</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
         <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
         <meta name="apple-mobile-web-app-capable" content="yes">
         <link rel="stylesheet" href="style.mobile.css" type="text/css">
@@ -9,20 +10,61 @@
         <script src="mobile.js"></script>
         <style>
             html, body {
-                margin: 0;
-                padding: 0;
-                height: 100%;
+                margin  : 0;
+                padding : 0;
+                height  : 100%;
+                width   : 100%;
             }
+            @media only screen and (max-width: 600px) {
+                html, body {
+                    height  : 117%;
+                }
+            }
             #map {
-                position: relative;
-                width: 100%;
-                height: 100%;
+                width    : 100%;
+                position : relative;
+                height   : 100%;
             }
             .olControlAttribution {
-                font-size: 10px;
-                bottom: 5px;
-                right: 5px;
+                position      : absolute;
+                font-size     : 10px;
+                bottom        : 0 !important;
+                right         : 0 !important;
+                background    : rgba(0,0,0,0.1);
+                font-family   : Arial;
+                padding       : 2px 4px;
+                border-radius : 5px 0 0 0;
             }
+            div.olControlZoomPanel .olControlZoomInItemInactive,
+            div.olControlZoomPanel .olControlZoomOutItemInactive {
+                background: rgba(0,0,0,0.2);
+                position: absolute;
+            }
+            div.olControlZoomPanel .olControlZoomInItemInactive {
+                border-radius: 5px 5px 0 0;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive {
+                border-radius: 0 0 5px 5px ;
+                top: 37px;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive:after ,
+            div.olControlZoomPanel .olControlZoomInItemInactive:after{
+                font-weight: bold;
+                content   : '+';
+                font-size : 36px;
+                padding:  7px;
+                z-index: 2000;
+                color     : #fff;
+                line-height: 1em;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive:after{
+                content: '–';
+                line-height: 0.9em;
+                padding: 0 8px;
+            }
+            div.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
+                display: none;
+            }
             #title, #tags, #shortdesc {
                 display: none;
             }

Modified: sandbox/cmoullet/openlayers/examples/mobile.js
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile.js	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/mobile.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -1,77 +1,40 @@
-
 // initialize map when page ready
 var map;
-var gg = new OpenLayers.Projection("EPSG:4326");
-var sm = new OpenLayers.Projection("EPSG:900913");
-function init() {
-    
-    // layer for drawn features
-    var vector = new OpenLayers.Layer.Vector();
 
+// Get rid of address bar on iphone/ipod
+var fixSize = function() {
+    window.scrollTo(0,0);
+    document.body.style.height = '100%';
+    if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) {
+        if (document.body.parentNode) {
+            document.body.parentNode.style.height = '100%';
+        }
+    }
+};
+setTimeout(fixSize, 700);
+setTimeout(fixSize, 1500);
+
+var init = function () {
     // create map
     map = new OpenLayers.Map({
         div: "map",
-        projection: sm,
-        units: "m",
-        numZoomLevels: 18,
-        maxResolution: 156543.0339,
-        maxExtent: new OpenLayers.Bounds(
-            -20037508.34, -20037508.34, 20037508.34, 20037508.34
-        ),
+        theme: null,
         controls: [
+            new OpenLayers.Control.Attribution(),
             new OpenLayers.Control.TouchNavigation({
                 dragPanOptions: {
                     interval: 0, // non-zero kills performance on some mobile phones
                     enableKinetic: true
                 }
             }),
-            new OpenLayers.Control.Attribution(),
-            new OpenLayers.Control.DrawFeature(
-                vector, OpenLayers.Handler.Point, {id: "point-control"}
-            ),
-            new OpenLayers.Control.DrawFeature(
-                vector, OpenLayers.Handler.Path, {id: "line-control"}
-            ),
-            new OpenLayers.Control.DrawFeature(
-                vector, OpenLayers.Handler.Polygon, {id: "poly-control"}
-            ),
-            new OpenLayers.Control.ModifyFeature(vector, {id: "mod-control"}),
             new OpenLayers.Control.ZoomPanel()
         ],
-        layers: [new OpenLayers.Layer.OSM(), vector],
-        center: new OpenLayers.LonLat(0, 0),
-        zoom: 1
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            })
+        ],
+        center: new OpenLayers.LonLat(742000, 5861000),
+        zoom: 3
     });
-
-    // attempt to get position
-    if (window.navigator && navigator.geolocation) {
-        navigator.geolocation.getCurrentPosition(
-            updatePosition,
-            function failure(error) {
-                OpenLayers.Console.log(error.message);
-            },
-            {
-                enableHighAccuracy: true
-            }
-        );
-    }
-
 };
-
-// get position if possible
-var position;
-function updatePosition(pos) {
-    position = pos;
-    var lon =  position.coords.longitude;
-    var lat = position.coords.latitude;
-    OpenLayers.Console.log("position: lon " + lon + ", lat " + lat);
-    map.setCenter(
-        new OpenLayers.LonLat(lon, lat).transform(gg, sm)
-    );
-}
-
-function pan(fx, fy) {
-    var size = map.getSize();
-    map.pan(size.w * fx, size.h * fy);
-}
-

Modified: sandbox/cmoullet/openlayers/examples/tile-origin.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/tile-origin.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/examples/tile-origin.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -5,7 +5,6 @@
     <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Tile Origin Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
-        <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
     </head>
     <body>

Modified: sandbox/cmoullet/openlayers/img/cloud-popup-relative.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/east-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/layer-switcher-maximize.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/layer-switcher-minimize.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/marker-blue.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/marker-gold.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/marker-green.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/marker.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/measuring-stick-off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/measuring-stick-on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/north-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/slider.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/south-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/west-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/zoom-minus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/zoom-plus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/zoom-world-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/img/zoombar.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -86,6 +86,24 @@
     },
 
     /**
+     * APIMethod: distanceTo
+     * Returns the distance to the pixel point passed in as a parameter.
+     *
+     * Parameters:
+     * px - {<OpenLayers.Pixel>}
+     *
+     * Returns:
+     * {Float} The pixel point passed in as parameter to calculate the
+     *     distance to.
+     */
+    distanceTo:function(px) {
+        return Math.sqrt(
+            Math.pow(this.x - px.x, 2) +
+            Math.pow(this.y - px.y, 2)
+        );
+    },
+
+    /**
      * APIMethod: add
      *
      * Parameters:

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Layer/Grid.js	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Layer/Grid.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -78,8 +78,11 @@
      * {Integer} Used only when in gridded mode, this specifies the number of 
      *           extra rows and colums of tiles on each side which will
      *           surround the minimum grid tiles to cover the map.
+     *           For very slow loading layers, a larger value may increase
+     *           performance somewhat when dragging, but will increase bandwidth
+     *           use significantly. 
      */
-    buffer: 2,
+    buffer: 0,
 
     /**
      * APIProperty: numLoadingTiles
@@ -129,6 +132,20 @@
     },
 
     /**
+     * Method: removeMap
+     * Called when the layer is removed from the map.
+     *
+     * Parameters:
+     * map - {<OpenLayers.Map>} The map.
+     */
+    removeMap: function(map) {
+        if(this.timerId != null) {
+            window.clearTimeout(this.timerId);
+            this.timerId = null;
+        }
+    },
+
+    /**
      * APIMethod: destroy
      * Deconstruct the layer and clear the grid.
      */

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js	2011-02-25 14:20:48 UTC (rev 11502)
@@ -600,6 +600,14 @@
         
         // add any initial layers
         if (options && options.layers) {
+            /** 
+             * If you have set options.center, the map center property will be
+             * set at this point.  However, since setCenter has not been caleld,
+             * addLayers gets confused.  So we delete the map center in this 
+             * case.  Because the check below uses options.center, it will
+             * be properly set below.
+             */
+            delete this.center;
             this.addLayers(options.layers);        
             // set center (and optionally zoom)
             if (options.center) {

Modified: sandbox/cmoullet/openlayers/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/BaseTypes/Pixel.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/BaseTypes/Pixel.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -40,11 +40,22 @@
         t.eq( pixel.x, 5, "changing oldPixel.x doesn't change pixel.x");
     }
 
+    function test_Pixel_distanceTo(t) {
+        t.plan( 2 );
+        var px = new OpenLayers.Pixel(0,-2);
+        pixel = new OpenLayers.Pixel(0,0);
+        t.eq( pixel.distanceTo(px), 2, "(0,0) distanceTo (0,-2) = 2");
+
+        px = new OpenLayers.Pixel(-4,6);
+        pixel = new OpenLayers.Pixel(4,6);
+        t.eq( pixel.distanceTo(px), 8, "(4,6) distanceTo (-4,6) = 8");
+    }
+
     function test_Pixel_equals(t) {
         t.plan( 5 );
         pixel = new OpenLayers.Pixel(5,6);
 
-        px = new OpenLayers.Pixel(5,6);
+        var px = new OpenLayers.Pixel(5,6);
         t.eq( pixel.equals(px), true, "(5,6) equals (5,6)");
 
         px = new OpenLayers.Pixel(1,6);

Modified: sandbox/cmoullet/openlayers/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/ArcGIS93Rest.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/ArcGIS93Rest.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -94,7 +94,7 @@
         var params = {layers: "show:0,2"};
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.ArcGIS93Rest(name, url, params);
+        layer = new OpenLayers.Layer.ArcGIS93Rest(name, url, params, {buffer: 2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );

Modified: sandbox/cmoullet/openlayers/tests/Layer/Grid.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/Grid.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/Grid.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -27,7 +27,7 @@
                        
         layer = new OpenLayers.Layer.Grid(name, url, params, null);
         t.ok( layer instanceof OpenLayers.Layer.Grid, "returns OpenLayers.Layer.Grid object" );
-        t.eq( layer.buffer, 2, "buffer default is 2");
+        t.eq( layer.buffer, 0, "buffer default is 0");
         t.eq( layer.ratio, 1.5, "ratio default is 1.5");
         t.eq( layer.numLoadingTiles, 0, "numLoadingTiles starts at 0");
         t.ok( layer.events.listeners["tileloaded"] != null, "'tileloaded' event added to layer's event types");
@@ -47,7 +47,7 @@
     function test_Layer_Grid_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );
@@ -593,7 +593,7 @@
 
     function test_Layer_Grid_destroy (t) {
 
-        t.plan( 7 );
+        t.plan( 8 );
 
         var map = new OpenLayers.Map('map');
         layer = new OpenLayers.Layer.Grid(name, url, params);
@@ -608,6 +608,7 @@
         map.addLayer(layer);
 
         map.setCenter(new OpenLayers.LonLat(0,0), 10);
+        map.setCenter(new OpenLayers.LonLat(1,1));
 
          
         //grab a reference to one of the tiles
@@ -616,6 +617,7 @@
 
         layer.destroy();
         t.eq( tile.imgDiv, null, "Tile destroyed" ); 
+        t.eq( layer.timerId, null, "Tile loading timeout cleared");
         
         t.ok( layer.grid == null, "tiles appropriately destroyed")
 

Modified: sandbox/cmoullet/openlayers/tests/Layer/KaMap.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/KaMap.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/KaMap.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -65,8 +65,8 @@
         layer = new OpenLayers.Layer.KaMap(name, url, params, units);
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
-        t.eq( layer.grid.length, 8, "KaMap rows is correct." );
-        t.eq( layer.grid[0].length, 6, "KaMap cols is correct." );
+        t.eq( layer.grid.length, 4, "KaMap rows is correct." );
+        t.eq( layer.grid[0].length, 3, "KaMap cols is correct." );
         map.destroy();
         
     }

Modified: sandbox/cmoullet/openlayers/tests/Layer/MapGuide.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/MapGuide.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/MapGuide.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -69,7 +69,7 @@
         layer = new OpenLayers.Layer.MapGuide(name, url, paramsTiled);
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,400000),5);
-        t.eq( layer.grid.length, 6, "Grid rows is correct." );
+        t.eq( layer.grid.length, 3, "Grid rows is correct." );
         // t.eq( layer.grid[0].length, 6, "Grid cols is correct." );
         map.destroy();
     }

Modified: sandbox/cmoullet/openlayers/tests/Layer/MapServer.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/MapServer.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/MapServer.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -74,11 +74,11 @@
     function test_Layer_MapServer_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.MapServer(name, url, params);
+        layer = new OpenLayers.Layer.MapServer(name, url, params, {buffer: 0});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
-        t.eq( layer.grid.length, 7, "Grid rows is correct." );
-        t.eq( layer.grid[0].length, 6, "Grid cols is correct." );
+        t.eq( layer.grid.length, 4, "Grid rows is correct." );
+        t.eq( layer.grid[0].length, 3, "Grid cols is correct." );
         map.destroy();
         
     }
@@ -234,7 +234,7 @@
             var map = new OpenLayers.Map('map');
             var layer = new OpenLayers.Layer.Google("Google");
             map.addLayer(layer);
-            layer = new OpenLayers.Layer.MapServer(name, url, params, {isBaseLayer: false, reproject: true});
+            layer = new OpenLayers.Layer.MapServer(name, url, params, {isBaseLayer: false, reproject: true, buffer: 2});
             layer.isBaseLayer=false;
             map.addLayer(layer);
             map.setCenter(new OpenLayers.LonLat(0,0), 5);
@@ -251,7 +251,7 @@
         }
         
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.MapServer(name, url, params);
+        layer = new OpenLayers.Layer.MapServer(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0), 5);
         var tile = layer.grid[0][0];

Modified: sandbox/cmoullet/openlayers/tests/Layer/TMS.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/TMS.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/TMS.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -134,7 +134,7 @@
         t.plan(1);
             m = new OpenLayers.Map("map", {'maxExtent':new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795)});
             layer = new OpenLayers.Layer.TMS( "TMS", 
-                    "http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418]} );
+                    "http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418], buffer: 2} );
             m.addLayer(layer);
             m.zoomToMaxExtent();
             t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/1.png", "TMS tiles around rounded properly.");

Modified: sandbox/cmoullet/openlayers/tests/Layer/WMS.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/WMS.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/WMS.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -146,7 +146,7 @@
     function test_Layer_WMS_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );
@@ -312,7 +312,7 @@
             var layer = new OpenLayers.Layer.Google("Google");
             map.addLayer(layer);
             var wmslayer = new OpenLayers.Layer.WMS(name, url, params,
-                                                    {isBaseLayer: false, reproject:true});
+                                                    {isBaseLayer: false, reproject:true, buffer: 2});
             wmslayer.isBaseLayer=false;
             map.addLayer(wmslayer);
             map.setCenter(new OpenLayers.LonLat(0,0), 5);
@@ -329,7 +329,7 @@
         }
 
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer: 2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0), 5);
         var tile = layer.grid[0][0];

Modified: sandbox/cmoullet/openlayers/tests/Layer/WrapDateLine.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/WrapDateLine.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/WrapDateLine.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -130,7 +130,7 @@
         t.plan( 3 );
 
         var url = "http://octo.metacarta.com/cgi-bin/mapserv";
-        layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true});
+        layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true, buffer: 2});
         var m = new OpenLayers.Map('map');
         m.addLayer(layer);
         m.zoomToMaxExtent();
@@ -146,7 +146,7 @@
         var layer = new OpenLayers.Layer.KaMap( "Blue Marble NG",
              "http://www.openlayers.org/world/index.php",
              {g: "satellite", map: "world"},
-             {wrapDateLine: true} ); 
+             {wrapDateLine: true, buffer: 2} ); 
         var m = new OpenLayers.Map('map');
         m.addLayer(layer);
         m.zoomToMaxExtent();
@@ -158,13 +158,13 @@
     function test_Layer_WrapDateLine_WMS_Overlay (t) {
         t.plan( 3 );
         var url = "http://octo.metacarta.com/cgi-bin/mapserv";
-        baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true});
+        baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true, buffer: 2});
         var layer = new OpenLayers.Layer.WMS( "DM Solutions Demo",
             "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
             {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
                      "prov_bound,fedlimit,rail,road,popplace",
              transparent: "true", format: "image/png"},
-            {wrapDateLine: true, reproject: false,encodeBBOX:true});
+            {wrapDateLine: true, reproject: false,encodeBBOX:true, buffer:2});
         var m = new OpenLayers.Map('map');
         m.addLayers([baselayer,layer]);
         m.zoomToMaxExtent();

Modified: sandbox/cmoullet/openlayers/tests/Layer/XYZ.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Layer/XYZ.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Layer/XYZ.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -126,7 +126,7 @@
         t.plan(1);
             m = new OpenLayers.Map("map", {'maxExtent':new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795)});
             layer = new OpenLayers.Layer.XYZ( "XYZ", 
-                    url, {layername: 'basic', type:'png', resolutions:[0.000634956337608418]} );
+                    url, {layername: 'basic', type:'png', resolutions:[0.000634956337608418], buffer: 2} );
             m.addLayer(layer);
             m.zoomToMaxExtent()
             t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/0.png", "XYZ tiles around rounded properly.");

Modified: sandbox/cmoullet/openlayers/tests/Map.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Map.html	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tests/Map.html	2011-02-25 14:20:48 UTC (rev 11502)
@@ -352,6 +352,8 @@
 
         valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
         t.eq(valid, false, "19 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+
+        map.destroy();
     }
     
     function test_Map_isValidLonLat(t) {
@@ -977,6 +979,8 @@
         map.addControls(controls2, pixels2);
         t.eq(map.controls.length, 5, "three additional controls were added by map.addControls with a px-array");
         t.eq(map.controls[3].position.toString(), pixels2[1].toString(), "control 'fourthctrl' has position set to given px");
+
+        map.destroy();
     }
 
     function test_Map_getControl(t) {
@@ -1598,11 +1602,13 @@
         
         t.eq(map.layers.length, 2, "multiple layers added from options");
         t.ok(map.baseLayer, "map has a base layer");
+
+        map.destroy();
         
     }
     
     function test_center_option(t) {
-        t.plan(6);
+        t.plan(7);
         
         var map, msg;
         
@@ -1625,6 +1631,12 @@
             map.destroy();
         }
         
+        var log = [];
+        var meth = OpenLayers.Layer.prototype.moveTo;
+        OpenLayers.Layer.prototype.moveTo = function() {
+            log.push(arguments);
+            meth.apply(this, arguments);
+        };
         
         // set center without zoom
         var center = new OpenLayers.LonLat(1, 2);
@@ -1635,8 +1647,10 @@
         });
         
         t.ok(center.equals(map.getCenter()), "map center set without zoom");
+        t.eq(log.length, 1, "moveTo called once");
         
         map.destroy();
+        OpenLayers.Layer.prototype.moveTo = meth;
         
         // set center and zoom
         var zoom = 3;

Modified: sandbox/cmoullet/openlayers/theme/default/img/add_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_line_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_line_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_polygon_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/draw_polygon_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/editing_tool_bar.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/move_feature_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/move_feature_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/navigation_history.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/pan-panel-NOALPHA.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/pan-panel.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/pan_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/remove_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/save_features_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/save_features_on.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/view_next_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/view_previous_off.png
===================================================================
(Binary files differ)

Modified: sandbox/cmoullet/openlayers/theme/default/img/zoom-panel.png
===================================================================
(Binary files differ)


Property changes on: sandbox/cmoullet/openlayers/tools
___________________________________________________________________
Modified: svn:ignore
   - *.pyc

   + *.pyc
closure-compiler.jar



Modified: sandbox/cmoullet/openlayers/tools/release.sh
===================================================================
--- sandbox/cmoullet/openlayers/tools/release.sh	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tools/release.sh	2011-02-25 14:20:48 UTC (rev 11502)
@@ -2,13 +2,22 @@
 
 VERSION=$1
 
+wget -c http://closure-compiler.googlecode.com/files/compiler-latest.zip
+unzip compiler-latest.zip 
+
 svn export http://svn.openlayers.org/tags/openlayers/release-$VERSION OpenLayers-$VERSION
 cd OpenLayers-$VERSION/build
-./build.py full
+mv ../../compiler.jar ../tools/closure-compiler.jar
+./build.py -c closure full
 cp OpenLayers.js ..
+rm ../tools/closure-compiler.jar
 
 cd ..
 
+for i in google ie6-style style; do
+    csstidy theme/default/$i.css --template=highest theme/default/$i.tidy.css
+done    
+
 mkdir doc/devdocs
 mkdir doc/apidocs
 rm tools/*.pyc

Modified: sandbox/cmoullet/openlayers/tools/update_dev_dir.sh
===================================================================
--- sandbox/cmoullet/openlayers/tools/update_dev_dir.sh	2011-02-25 14:19:17 UTC (rev 11501)
+++ sandbox/cmoullet/openlayers/tools/update_dev_dir.sh	2011-02-25 14:20:48 UTC (rev 11502)
@@ -22,7 +22,11 @@
     
     cp OpenLayers.js ..
     cd ..
-    
+    for i in google ie6-style style; do
+        csstidy theme/default/$i.css --template=highest theme/default/$i.tidy.css
+        cp theme/default/$i.tidy.css theme/default/$i.css
+    done
+
     sed -i -e 's!../lib/OpenLayers.js!../OpenLayers.js!' examples/*.html
     naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/apidocs -p /osgeo/openlayers/docs/dev/apidoc_config -s Default OL >/dev/null
     naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/docs -p /osgeo/openlayers/docs/dev/doc_config -s Default OL >/dev/null



More information about the Commits mailing list