Sha256: 384beb3cd7eb01bf4d9ec995a2a66648636e04a15ab2696afb6c267a04d9a25c

Contents?: true

Size: 1.99 KB

Versions: 7

Compression:

Stored size: 1.99 KB

Contents

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>OpenLayers: Overlay layer extents crossing the dateline</title>
    <link rel="stylesheet" href="../../theme/default/style.css" type="text/css">
    <link rel="stylesheet" href="../../examples/style.css" type="text/css">
    <style type="text/css">
        #map {
            height: 512px;
        }
    </style>

    <script src="../../lib/OpenLayers.js"></script>
    <script type="text/javascript">

// make map available for easy debugging
var map;

function init(){
    map = new OpenLayers.Map('map');

    var base = new OpenLayers.Layer.WMS("marble", 
        "http://demo.opengeo.org/geoserver/wms",
        {layers: "topp:naturalearth"},
        {wrapDateLine: true}
    );
    var extent = new OpenLayers.Bounds(142.3828125,-70.902270266175,233.6171875,-12.039326531729);
    var wms = new OpenLayers.Layer.WMS( "world",
        "http://demo.opengeo.org/geoserver/wms",
        {layers: 'world', transparent: true},
        {maxExtent: extent}
    );
    
    var vector = new OpenLayers.Layer.Vector();
    vector.addFeatures([
        new OpenLayers.Feature.Vector(extent.toGeometry())
    ]);

    map.addLayers([base, wms, vector]);

    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.zoomToExtent(extent);
}

    </script>
  </head>
  <body onload="init()">
    <h1 id="title">OpenLayers overlays crossing the dateline test</h1>

    <p id="shortdesc">
        The overlay has an extent smaller than the world extent, but exceeds
        the world extent. The base layer is configured with wrapDateLine set to
        true. The area inside the orange rectangle should always contain tiles
        from the world layer, regardless of the zoom level.
    </p>
    <div id="map" class="smallmap"></div>
  </body>
</html>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
postrunner-0.0.10 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.9 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.8 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.7 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.6 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.5 misc/openlayers/tests/manual/dateline-smallextent.html
postrunner-0.0.4 misc/openlayers/tests/manual/dateline-smallextent.html