[OpenLayers-Commits] r11286 - sandbox/camptocamp/mobile/openlayers/examples

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 23 04:59:55 EST 2011


Author: sbrunner
Date: 2011-02-23 01:59:55 -0800 (Wed, 23 Feb 2011)
New Revision: 11286

Modified:
   sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js
Log:
add geo localysation

Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js	2011-02-23 09:58:23 UTC (rev 11285)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-sencha.js	2011-02-23 09:59:55 UTC (rev 11286)
@@ -19,7 +19,7 @@
                         icon: "img/mobile-plus.png",
                         handler: function(btn) {
                             map.zoomIn();
-                            btn.el.removeClass( "x-button-pressed"); // unpress the button
+                            btn.el.removeCls("x-button-pressed"); // unpress the button
                             
                         }
                     },
@@ -28,29 +28,29 @@
                         icon: "img/mobile-minus.png",
                         handler: function(btn) {
                             map.zoomOut();
-                            btn.el.removeClass( "x-button-pressed"); // unpress the button
+                            btn.el.removeCls("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
+                            map.getControlsBy("id", "locate-control")[0].activate();
+                            btn.el.removeCls("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
+                            window.alert('222');
+                            btn.el.removeCls("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
+                            window.alert('333');
+                            btn.el.removeCls("x-button-pressed"); // unpress the button
                         }
                     }],
                     listeners: {



More information about the Commits mailing list