simplified the example a bit; improved description
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<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="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">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>OpenLayers: Sketch handlers crossing the dateline</title>
|
<title>OpenLayers: Overlay layer extents crossing the dateline</title>
|
||||||
<link rel="stylesheet" href="../../theme/default/style.css" type="text/css">
|
<link rel="stylesheet" href="../../theme/default/style.css" type="text/css">
|
||||||
<link rel="stylesheet" href="../../examples/style.css" type="text/css">
|
<link rel="stylesheet" href="../../examples/style.css" type="text/css">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -34,13 +34,10 @@ function init(){
|
|||||||
{maxExtent: extent}
|
{maxExtent: extent}
|
||||||
);
|
);
|
||||||
|
|
||||||
var poly = extent.toGeometry();
|
|
||||||
var vector = new OpenLayers.Layer.Vector();
|
var vector = new OpenLayers.Layer.Vector();
|
||||||
poly.components[0].components.forEach(function(point) {
|
vector.addFeatures([
|
||||||
vector.addFeatures([
|
new OpenLayers.Feature.Vector(extent.toGeometry())
|
||||||
new OpenLayers.Feature.Vector(point)
|
]);
|
||||||
]);
|
|
||||||
})
|
|
||||||
|
|
||||||
map.addLayers([base, wms, vector]);
|
map.addLayers([base, wms, vector]);
|
||||||
|
|
||||||
@@ -54,9 +51,10 @@ function init(){
|
|||||||
<h1 id="title">OpenLayers overlays crossing the dateline test</h1>
|
<h1 id="title">OpenLayers overlays crossing the dateline test</h1>
|
||||||
|
|
||||||
<p id="shortdesc">
|
<p id="shortdesc">
|
||||||
The overlay has an extent smaller than the world extent. The base layer
|
The overlay has an extent smaller than the world extent, but exceeds
|
||||||
is configured with wrapDateLine set to true. New Zealand and a part of
|
the world extent. The base layer is configured with wrapDateLine set to
|
||||||
Australia should always be visible on the map.
|
true. The area inside the orange rectangle should always contain tiles
|
||||||
|
from the world layer, regardless of the zoom level.
|
||||||
</p>
|
</p>
|
||||||
<div id="map" class="smallmap"></div>
|
<div id="map" class="smallmap"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user