Coordinates that are easier to visualize.
This commit is contained in:
@@ -16,35 +16,8 @@
|
||||
<script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>
|
||||
|
||||
<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()">
|
||||
<body>
|
||||
<h1 id="title">OpenLayers sketch handlers crossing the dateline example</h1>
|
||||
|
||||
<div id="tags">
|
||||
@@ -60,5 +33,24 @@ function init(){
|
||||
|
||||
<div id="docs">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
var base = new OpenLayers.Layer.WMS("marble",
|
||||
"http://demo.opengeo.org/geoserver/wms",
|
||||
{layers: "topp:naturalearth"},
|
||||
{wrapDateLine: true}
|
||||
);
|
||||
|
||||
var vector = new OpenLayers.Layer.Vector("Editable Vectors");
|
||||
|
||||
map.addLayers([base, vector]);
|
||||
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(-179, 0), 2);
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user