63 lines
1.9 KiB
HTML
63 lines
1.9 KiB
HTML
<!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: Sketch handlers 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(){
|
|
var options = {
|
|
projection: new OpenLayers.Projection("EPSG:900913"),
|
|
units: "m",
|
|
maxResolution: 156543.0339,
|
|
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508)
|
|
};
|
|
map = new OpenLayers.Map('map', options);
|
|
|
|
var osm = new OpenLayers.Layer.OSM(
|
|
"OSM", null, {wrapDateLine: true}
|
|
);
|
|
var vector = new OpenLayers.Layer.Vector("Editable Vectors");
|
|
|
|
map.addLayers([osm, vector]);
|
|
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
|
|
|
|
var extent = new OpenLayers.Bounds(15849982.183008, -11368938.517442, -14206280.326992, -1350184.3474418);
|
|
map.zoomToExtent(extent);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<h1 id="title">OpenLayers sketch handlers crossing the dateline example</h1>
|
|
|
|
<div id="tags">
|
|
international date line, dateline, sketch
|
|
</div>
|
|
<p id="shortdesc">
|
|
Start digitizing a polygon or line
|
|
on one side of the international dateline, and then cross the dateline
|
|
whilst digitizing. The feature should behave like digitizing on any
|
|
other location.
|
|
</p>
|
|
<div id="map" class="smallmap"></div>
|
|
|
|
<div id="docs">
|
|
</div>
|
|
</body>
|
|
</html>
|