[OpenLayers-Commits] r11271 - in sandbox/camptocamp/mobile/openlayers/examples: . img

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 23 03:56:39 EST 2011


Author: sbrunner
Date: 2011-02-23 00:56:39 -0800 (Wed, 23 Feb 2011)
New Revision: 11271

Added:
   sandbox/camptocamp/mobile/openlayers/examples/img/mobile-layers.png
   sandbox/camptocamp/mobile/openlayers/examples/img/mobile-loc.png
   sandbox/camptocamp/mobile/openlayers/examples/img/mobile-minus.png
   sandbox/camptocamp/mobile/openlayers/examples/img/mobile-plus.png
   sandbox/camptocamp/mobile/openlayers/examples/img/mobile-search.png
   sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js
Removed:
   sandbox/camptocamp/mobile/openlayers/examples/mobile-layers.png
   sandbox/camptocamp/mobile/openlayers/examples/mobile-loc.png
   sandbox/camptocamp/mobile/openlayers/examples/mobile-search.png
Modified:
   sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.html
Log:
temporary version of sencha touch example

Copied: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-layers.png (from rev 11256, sandbox/camptocamp/mobile/openlayers/examples/mobile-layers.png)
===================================================================
(Binary files differ)

Copied: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-loc.png (from rev 11256, sandbox/camptocamp/mobile/openlayers/examples/mobile-loc.png)
===================================================================
(Binary files differ)

Added: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-minus.png
===================================================================
(Binary files differ)


Property changes on: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-minus.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-plus.png
===================================================================
(Binary files differ)


Property changes on: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-plus.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Copied: sandbox/camptocamp/mobile/openlayers/examples/img/mobile-search.png (from rev 11256, sandbox/camptocamp/mobile/openlayers/examples/mobile-search.png)
===================================================================
(Binary files differ)

Deleted: sandbox/camptocamp/mobile/openlayers/examples/mobile-layers.png
===================================================================
(Binary files differ)

Deleted: sandbox/camptocamp/mobile/openlayers/examples/mobile-loc.png
===================================================================
(Binary files differ)

Deleted: sandbox/camptocamp/mobile/openlayers/examples/mobile-search.png
===================================================================
(Binary files differ)

Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.html
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.html	2011-02-23 08:51:33 UTC (rev 11270)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.html	2011-02-23 08:56:39 UTC (rev 11271)
@@ -20,66 +20,14 @@
                 bottom: 5px;
                 right: 5px;
             }
-        </style>
-        <script>
-        
-        new Ext.Application({
-            name: "ol",
-            launch: function() {
-                this.viewport = new Ext.Panel({
-                    fullscreen: true,
-                    dockedItems: [
-                    {
-                        dock: "bottom",
-                        xtype: "toolbar",
-                        ui: "light",
-                        layout: {
-                            pack: "center"
-                        },
-                        items: [{
-                            xtype: "segmentedbutton",
-                            items: [{
-                                text: "Locate"
-                            }, {
-                                text: "Search"
-                            }, {
-                                text: "Layers"
-                            }],
-                            listeners: {
-                                toggle: function(container, button, pressed) {
-                                    Ext.each(map.getControlsByClass(/DrawFeature/), function(control) {
-                                        control.deactivate();
-                                    });
-                                    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();
-                                        }
-                                    }
-                                }
-                            }
-                        }]
-                    }],
-                    items: [{
-                        xtype: "component",
-                        scroll: false,
-                        monitorResize: true,
-                        id: "map",
-                        listeners: {
-                            render: init,
-                            resize: function() {
-                                if (window.map) {
-                                    map.updateSize();
-                                }
-                            }
-                        }
-                    }]
-                });
+            div.x-button img {
+                width: 26px;
+                height: 26px;
             }
-        });
-        </script>
+        </style>
+
+        <script src="mobile-sencha.js"></script>
     </head>
-    <body></body>
+    <body>
+    </body>
 </html>

Added: sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js	                        (rev 0)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js	2011-02-23 08:56:39 UTC (rev 11271)
@@ -0,0 +1,89 @@
+
+new Ext.Application({
+    name: "ol",
+    launch: function() {
+        this.viewport = new Ext.Panel({
+            fullscreen: true,
+            dockedItems: [
+            {
+                dock: "bottom",
+                xtype: "toolbar",
+                ui: "light",
+                layout: {
+                    pack: "center"
+                },
+                items: [{
+                    xtype: "segmentedbutton",
+                    items: [{
+//                    text: "+",
+                        icon: "img/mobile-plus.png",
+                        handler: function(btn) {
+                            map.zoomIn();
+                            btn.el.removeClass( "x-button-pressed"); // unpress the button
+                            
+                        }
+                    },
+                    {
+                //                    text: "-",
+                        icon: "img/mobile-minus.png",
+                        handler: function(btn) {
+                            map.zoomOut();
+                            btn.el.removeClass( "x-button-pressed"); // unpress the button
+                        }
+                    },
+                    {
+//                        text: "Locate",
+                        icon: "img/mobile-loc.png",
+                        handler: function(btn) {
+                        window.alert('111');
+                        btn.el.removeClass( "x-button-pressed"); // unpress the button
+                        }
+                    }, {
+//                        text: "Search",
+                        icon: "img/mobile-search.png",
+                        handler: function(btn) {
+                        window.alert('222');
+                        btn.el.removeClass( "x-button-pressed"); // unpress the button
+                        }
+                    }, {
+//                        text: "Layers",
+                        icon: "img/mobile-layers.png",
+                        handler: function(btn) {
+                        window.alert('333');
+                        btn.el.removeClass( "x-button-pressed"); // unpress the button
+                        }
+                    }],
+                    listeners: {
+                        toggle: function(container, button, pressed) {
+                            Ext.each(map.getControlsByClass(/DrawFeature/), function(control) {
+                                control.deactivate();
+                            });
+                            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();
+                                }
+                            }
+                        }
+                    }
+                }]
+            }],
+            items: [{
+                xtype: "component",
+                scroll: false,
+                monitorResize: true,
+                id: "map",
+                listeners: {
+                    render: init,
+                    resize: function() {
+                        if (window.map) {
+                            map.updateSize();
+                        }
+                    }
+                }
+            }]
+        });
+    }
+});



More information about the Commits mailing list