[OpenLayers-Commits] r11355 - sandbox/sbrunner/openlayers/examples

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 23 11:51:47 EST 2011


Author: sbrunner
Date: 2011-02-23 08:51:47 -0800 (Wed, 23 Feb 2011)
New Revision: 11355

Modified:
   sandbox/sbrunner/openlayers/examples/geolocation.js
Log:
add debug messages

Modified: sandbox/sbrunner/openlayers/examples/geolocation.js
===================================================================
--- sandbox/sbrunner/openlayers/examples/geolocation.js	2011-02-23 16:46:06 UTC (rev 11354)
+++ sandbox/sbrunner/openlayers/examples/geolocation.js	2011-02-23 16:51:47 UTC (rev 11355)
@@ -112,14 +112,19 @@
 
                 
 // Device Orientation
+        window.alert(111);
 if (window.DeviceOrientationEvent) {
+        window.alert(222);
     var f = function(event) {
-        if (event.alpha) {
+        window.alert(333);
+      //  if (event.alpha) {
             var orientation = event.alpha - window.orientation - 90;
             var img = OpenLayers.Util.getElement('northimg');
             var value = "rotate(" + orientation + "deg)";
             img.style.transform = value;
             img.style.webkitTransform = value;
+
+            if (arrow) {
         window.alert(777);
         window.alert(""+orientation);
         window.alert(""+typeof(arrow));
@@ -129,6 +134,8 @@
         window.alert(888);
             arrow.layer.drawFeature(arrow);
         window.alert(999);
+    }
+          if (event.alpha) {
         }
         else {
 //            OpenLayers.Util.getElement('north').style.display = "none";



More information about the Commits mailing list