[OpenLayers-Commits] r2314 - sandbox/vector-2.4/tests/Layer
commits at openlayers.org
commits at openlayers.org
Mon Mar 5 11:55:59 EST 2007
Author: euzuro
Date: 2007-03-05 11:55:57 -0500 (Mon, 05 Mar 2007)
New Revision: 2314
Modified:
sandbox/vector-2.4/tests/Layer/test_Google.html
Log:
remove extraneous google tests
Modified: sandbox/vector-2.4/tests/Layer/test_Google.html
===================================================================
--- sandbox/vector-2.4/tests/Layer/test_Google.html 2007-03-05 16:53:33 UTC (rev 2313)
+++ sandbox/vector-2.4/tests/Layer/test_Google.html 2007-03-05 16:55:57 UTC (rev 2314)
@@ -30,7 +30,7 @@
t.ok(layer.isBaseLayer, "a default load of google layer responds as a base layer");
}
- function test_03_Layer_Google_Translation_zoom (t) {
+ function test_03_Layer_Google_Translation_lonlat (t) {
t.plan( 4 );
@@ -41,44 +41,21 @@
// these two lines specify an appropriate translation.
// the code afterwards works by itself to test that translation
// works correctly both ways.
- var gZoom = 5;
- var correspondingOLZoom = 5;
-
-
- olZoom = layer.getOLZoomFromGZoom(gZoom);
- t.eq(olZoom, correspondingOLZoom, "Translation from GZoom to OL Zoom works");
- t.eq(layer.getGZoomFromOLZoom(olZoom), gZoom, "Translation from OL Zoom to GZoom works");
-
- t.ok( layer.getGZoomFromOLZoom(null) == null, "getGZoomFromOLZoom(null) returns null");
- t.ok( layer.getOLZoomFromGZoom(null) == null, "getOLZoomFromGZoom(null) returns null");
- }
-
- function test_04_Layer_Google_Translation_lonlat (t) {
-
- t.plan( 4 );
-
- var map = new OpenLayers.Map('map');
- var layer = new OpenLayers.Layer.Google('Goog Layer');
- map.addLayer(layer);
-
- // these two lines specify an appropriate translation.
- // the code afterwards works by itself to test that translation
- // works correctly both ways.
var gLatLng = new GLatLng(50,100);
var correspondingOLLonLat = new OpenLayers.LonLat(100,50);
- olLonLat = layer.getOLLonLatFromGLatLng(gLatLng);
+ olLonLat = layer.getOLLonLatFromMapObjectLonLat(gLatLng);
t.ok(olLonLat.equals(correspondingOLLonLat), "Translation from GLatLng to OpenLayers.LonLat works");
- var transGLatLng = layer.getGLatLngFromOLLonLat(olLonLat);
+ var transGLatLng = layer.getMapObjectLonLatFromOLLonLat(olLonLat);
t.ok( transGLatLng.equals(gLatLng), "Translation from OpenLayers.LonLat to GLatLng works");
- t.ok( layer.getGLatLngFromOLLonLat(null) == null, "getGLatLngFromOLLonLat(null) returns null");
- t.ok( layer.getOLLonLatFromGLatLng(null) == null, "getOLLonLatFromGLatLng(null) returns null");
+ t.ok( layer.getMapObjectLonLatFromOLLonLat(null) == null, "getGLatLngFromOLLonLat(null) returns null");
+ t.ok( layer.getOLLonLatFromMapObjectLonLat(null) == null, "getOLLonLatFromGLatLng(null) returns null");
}
- function test_05_Layer_Google_Translation_pixel (t) {
+ function test_04_Layer_Google_Translation_pixel (t) {
t.plan( 4 );
@@ -93,44 +70,16 @@
var correspondingOLPixel = new OpenLayers.Pixel(50, 100);
- olPixel = layer.getOLPixelFromGPoint(gPoint);
+ olPixel = layer.getOLPixelFromMapObjectPixel(gPoint);
t.ok( olPixel.equals(correspondingOLPixel), "Translation from GPoint to OpenLayers.Pixel works");
- var transGPoint = layer.getGPointFromOLPixel(olPixel);
+ var transGPoint = layer.getMapObjectPixelFromOLPixel(olPixel);
t.ok( transGPoint.equals(gPoint), "Translation from OpenLayers.Pixel to GPoint works");
- t.ok( layer.getGPointFromOLPixel(null) == null, "getGPointFromOLPixel(null) returns null");
- t.ok( layer.getOLPixelFromGPoint(null) == null, "getOLPixelFromGPoint(null) returns null");
+ t.ok( layer.getMapObjectPixelFromOLPixel(null) == null, "getGPointFromOLPixel(null) returns null");
+ t.ok( layer.getOLPixelFromMapObjectPixel(null) == null, "getOLPixelFromGPoint(null) returns null");
}
- function test_06_Layer_Google_Translation_bounds (t) {
-
- t.plan( 4 );
-
- var map = new OpenLayers.Map('map');
- var layer = new OpenLayers.Layer.Google('Goog Layer');
- map.addLayer(layer);
-
- // these two lines specify an appropriate translation.
- // the code afterwards works by itself to test that translation
- // works correctly both ways.
- var sw = new GLatLng(10,20);
- var ne = new GLatLng(50,40)
- var gBounds = new GLatLngBounds(sw, ne);
- var correspondingOLBounds = new OpenLayers.Bounds(20, 10, 40, 50);
-
-
- olBounds = layer.getOLBoundsFromGLatLngBounds(gBounds);
-
- t.ok(olBounds.equals(correspondingOLBounds), "Translation from GLatLngBounds to OpenLayers.Bounds works");
-
- var transGBounds = layer.getGLatLngBoundsFromOLBounds(olBounds);
- t.ok( transGBounds.equals(gBounds), "Translation from OpenLayers.Bounds to GLatLngBounds works");
-
- t.ok( layer.getGLatLngBoundsFromOLBounds(null) == null, "getGLatLngBoundsFromOLBounds(null) returns null");
- t.ok( layer.getOLBoundsFromGLatLngBounds(null) == null, "getOLBoundsFromGLatLngBounds(null) returns null");
- }
-
function test_99_Layer_destroy (t) {
t.plan( 5 );
More information about the Commits
mailing list