[OpenLayers-Commits] r11338 - sandbox/sbrunner/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Feb 23 10:50:48 EST 2011
Author: sbrunner
Date: 2011-02-23 07:50:48 -0800 (Wed, 23 Feb 2011)
New Revision: 11338
Modified:
sandbox/sbrunner/openlayers/examples/geolocation.js
Log:
fix Openlayers => OpenLayers
Modified: sandbox/sbrunner/openlayers/examples/geolocation.js
===================================================================
--- sandbox/sbrunner/openlayers/examples/geolocation.js 2011-02-23 15:46:23 UTC (rev 11337)
+++ sandbox/sbrunner/openlayers/examples/geolocation.js 2011-02-23 15:50:48 UTC (rev 11338)
@@ -74,11 +74,11 @@
e.point,
{},
{
- externalGraphic: "img/mobile-arrow.png",
- graphicHeight: 19,
- graphicWidth: 20,
- graphicXOffset: -10,
- graphicYOffset: -10
+ externalGraphic: "img/mobile-arrow.svg",
+ graphicHeight: 30,
+ graphicWidth: 30,
+ graphicXOffset: -15,
+ graphicYOffset: -15
}
);
vector.addFeatures([
@@ -124,24 +124,15 @@
// Device Orientation
if (window.DeviceOrientationEvent) {
window.addEventListener("deviceorientation", function(event) {
- window.alert(111);
- if (typeof(event.alpha) != 'undefined') {
- window.alert(222);
+ if (event.alpha) {
var orientation = event.alpha - window.orientation - 90;
- window.alert(333);
- var img = Openlayers.Util.getElement('northimg');
- window.alert(444);
+ var img = OpenLayers.Util.getElement('northimg');
var value = "rotate(" + event.orientation + "deg)";
- window.alert(555);
img.style.transform = value;
- window.alert(666);
img.style.webkitTransform = value;
- window.alert(777);
arrow.style.rotation = -event.orientation;
- window.alert(888);
arrow.layer.drawFeature(arrow);
- window.alert(999);
}
else {
OpenLayers.Util.getElement('north').style.display = "none";
More information about the Commits
mailing list