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

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 23 10:56:40 EST 2011


Author: sbrunner
Date: 2011-02-23 07:56:40 -0800 (Wed, 23 Feb 2011)
New Revision: 11342

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 15:54:26 UTC (rev 11341)
+++ sandbox/sbrunner/openlayers/examples/geolocation.js	2011-02-23 15:56:40 UTC (rev 11342)
@@ -124,21 +124,17 @@
 // Device Orientation
 if (window.DeviceOrientationEvent) {
     window.addEventListener("deviceorientation", function(event) {
-        window.alert(111);
         if (event.alpha) {
-        window.alert(222);
             var orientation = event.alpha - window.orientation - 90;
-        window.alert(333);
             var img = OpenLayers.Util.getElement('northimg');
-        window.alert(444);
-            var value = "rotate(" + event.orientation + "deg)";
-        window.alert(555);
+            var value = "rotate(" + orientation + "deg)";
             img.style.transform = value;
-        window.alert(666);
             img.style.webkitTransform = value;
         window.alert(777);
+        window.alert(arrow);
+        window.alert(arrow.style);
 
-            arrow.style.rotation = -event.orientation;
+            arrow.style.rotation = -orientation;
         window.alert(888);
             arrow.layer.drawFeature(arrow);
         window.alert(999);



More information about the Commits mailing list