[OpenLayers-Commits] r11935 - sandbox/elemoine/accel3d/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Fri Apr 29 09:50:33 EDT 2011
Author: erilem
Date: 2011-04-29 06:50:32 -0700 (Fri, 29 Apr 2011)
New Revision: 11935
Modified:
sandbox/elemoine/accel3d/examples/mobile-base.js
Log:
modify the mobile-base.js to accept an accel3d query param
Modified: sandbox/elemoine/accel3d/examples/mobile-base.js
===================================================================
--- sandbox/elemoine/accel3d/examples/mobile-base.js 2011-04-29 13:50:17 UTC (rev 11934)
+++ sandbox/elemoine/accel3d/examples/mobile-base.js 2011-04-29 13:50:32 UTC (rev 11935)
@@ -7,6 +7,8 @@
var gg = new OpenLayers.Projection("EPSG:4326");
var sm = new OpenLayers.Projection("EPSG:900913");
+var accel3d = OpenLayers.Util.getParameters().accel3d !== undefined;
+
var init = function (onSelectFeatureFunction) {
var vector = new OpenLayers.Layer.Vector("Vector Layer", {});
@@ -39,6 +41,7 @@
// create map
map = new OpenLayers.Map({
div: "map",
+ accel3d: accel3d,
theme: null,
projection: sm,
units: "m",
@@ -51,7 +54,7 @@
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.TouchNavigation({
dragPanOptions: {
- interval: 100,
+ interval: accel3d ? 0 : 1,
enableKinetic: true
}
}),
@@ -89,7 +92,7 @@
sprintersLayer
],
center: new OpenLayers.LonLat(0, 0),
- zoom: 1
+ zoom: 4
});
var style = {
More information about the Commits
mailing list