Sha256: b79f9d025514f21ec180e9dc280b2095dc30a48800d13be045dec2ee0ad0522b

Contents?: true

Size: 1.13 KB

Versions: 7

Compression:

Stored size: 1.13 KB

Contents

// make map available for easy debugging
var map;

function init() {

    var options = {
        projection: new OpenLayers.Projection("EPSG:102113"),
        units: "m",
        numZoomLevels: 18,
        maxResolution: 156543.0339,
        maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                         20037508, 20037508.34)
    };
    map = new OpenLayers.Map('map', options);

    // create Google layer with EPSG:102113 code
    var gsat = new OpenLayers.Layer.Google("Google Imagery", {
        type: G_SATELLITE_MAP, 
        sphericalMercator: true,
        projection: "EPSG:102113"
    });

    // create WMS layer
    var wms = new OpenLayers.Layer.WMS(
        "Highways",
        "http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer",
        {layers: "2", format: "image/gif", transparent: "true"},
        {
            isBaseLayer: false,
            wrapDateLine: true
        }
    );

    map.addLayers([gsat, wms]);
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.setCenter(new OpenLayers.LonLat(-10723197, 4500612), 3);
}

Version data entries

7 entries across 7 versions & 1 rubygems

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