Sha256: c330d5a1790780aa7b1b68cd0ed0c446034ca55900cfa289a44db43fe32d5f1f

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

// initialize map when page ready
var map;

// Get rid of address bar on iphone/ipod
var fixSize = function() {
    window.scrollTo(0,0);
    document.body.style.height = '100%';
    if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) {
        if (document.body.parentNode) {
            document.body.parentNode.style.height = '100%';
        }
    }
};
setTimeout(fixSize, 700);
setTimeout(fixSize, 1500);

var init = function () {
    // create map
    map = new OpenLayers.Map({
        div: "map",
        theme: null,
        controls: [
            new OpenLayers.Control.Attribution(),
            new OpenLayers.Control.TouchNavigation({
                dragPanOptions: {
                    enableKinetic: true
                }
            }),
            new OpenLayers.Control.Zoom()
        ],
        layers: [
            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
                transitionEffect: 'resize'
            })
        ],
        center: new OpenLayers.LonLat(742000, 5861000),
        zoom: 3
    });
};

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
postrunner-0.0.10 misc/openlayers/examples/mobile.js
postrunner-0.0.9 misc/openlayers/examples/mobile.js
postrunner-0.0.8 misc/openlayers/examples/mobile.js
postrunner-0.0.7 misc/openlayers/examples/mobile.js
postrunner-0.0.6 misc/openlayers/examples/mobile.js
postrunner-0.0.5 misc/openlayers/examples/mobile.js
postrunner-0.0.4 misc/openlayers/examples/mobile.js