summaryrefslogtreecommitdiff
path: root/misc/openlayers/tests/Control/ZoomBox.html
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2015-10-17 21:36:38 +0200
committerChris Schlaeger <chris@linux.com>2015-10-17 21:36:38 +0200
commite30f267181d990947e67909de4809fa941698c85 (patch)
tree46e9f94c2b3699ed378963b420b8a8d361286ea1 /misc/openlayers/tests/Control/ZoomBox.html
parente763ceb183f389fcd314a4a6a712d87c9d4cdb32 (diff)
downloadpostrunner-e30f267181d990947e67909de4809fa941698c85.zip
Upgrading openlayers to 3.x
Diffstat (limited to 'misc/openlayers/tests/Control/ZoomBox.html')
-rw-r--r--misc/openlayers/tests/Control/ZoomBox.html54
1 files changed, 0 insertions, 54 deletions
diff --git a/misc/openlayers/tests/Control/ZoomBox.html b/misc/openlayers/tests/Control/ZoomBox.html
deleted file mode 100644
index 7763bcf..0000000
--- a/misc/openlayers/tests/Control/ZoomBox.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src="../OLLoader.js"></script>
- <script type="text/javascript">
-
- function test_constructor(t) {
- t.plan(4);
-
- var control = new OpenLayers.Control.ZoomBox();
- t.ok(control instanceof OpenLayers.Control, "instance of Control");
- t.ok(control instanceof OpenLayers.Control.ZoomBox, "instance of ZoomBox");
- t.eq(control.displayClass, "olControlZoomBox", "displayClass");
- control.destroy();
-
- control = new OpenLayers.Control.ZoomBox({
- zoomOnClick: false
- });
- t.eq(control.zoomOnClick, false, "zoomOnClick");
- control.destroy();
- }
-
- function test_zoomBox(t) {
- t.plan(4);
- var map = new OpenLayers.Map("map", {
- zoomMethod: null,
- layers: [new OpenLayers.Layer("", {isBaseLayer: true})],
- center: [0, 0],
- zoom: 1
- });
- var control = new OpenLayers.Control.ZoomBox();
- map.addControl(control);
- control.zoomBox(new OpenLayers.Pixel(50, 60));
- t.eq(map.getZoom(), 2, "zoomed on click");
-
- control.zoomOnClick = false;
- control.zoomBox(new OpenLayers.Pixel(-50, -60));
- t.eq(map.getZoom(), 2, "not zoomed with zoomOnClick set to false");
-
- map.zoomToMaxExtent();
- // pixel bounds bottom > top
- control.zoomBox(new OpenLayers.Bounds(128, 128, 256, 64));
- t.eq(map.getCenter().toShortString(), "-45, 22.5", "centered to box center");
- t.eq(map.getZoom(), 3, "zoomed to box extent");
-
- map.destroy();
- }
-
- </script>
-</head>
-<body>
- <div id="map" style="width: 512px; height: 256px;"/>
-</body>
-</html>