From adf91b1d10ec07eab3307eef43c42647134fcb17 Mon Sep 17 00:00:00 2001 From: euzuro Date: Tue, 20 Jun 2006 22:57:18 +0000 Subject: [PATCH] again, change function name from ScreenPx to ViewPortPx git-svn-id: http://svn.openlayers.org/trunk/openlayers@631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 4 ++-- tests/test_Map.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index b4c71ba323..4a0b60e247 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -385,7 +385,7 @@ OpenLayers.Map.prototype = { */ getLayerPxFromLonLat: function (lonlat) { //adjust for displacement of layerContainerDiv - var px = this.getScreenPxFromLonLat(lonlat); + var px = this.getViewPortPxFromLonLat(lonlat); return this.getLayerPxFromScreenPx(px); }, @@ -397,7 +397,7 @@ OpenLayers.Map.prototype = { * and resolution * @type OpenLayers.Pixel */ - getScreenPxFromLonLat: function (lonlat) { + getViewPortPxFromLonLat: function (lonlat) { var resolution = this.getResolution(); var extent = this.getExtent(); return new OpenLayers.Pixel( diff --git a/tests/test_Map.html b/tests/test_Map.html index 86288a8efe..3f83f9bf9e 100644 --- a/tests/test_Map.html +++ b/tests/test_Map.html @@ -128,8 +128,8 @@ var lonlat = map.getLonLatFromViewPortPx(pixel); t.ok( lonlat instanceof OpenLayers.LonLat, "getLonLatFromViewPortPx returns valid OpenLayers.LonLat" ); - var newPixel = map.getScreenPxFromLonLat(lonlat); - t.ok( newPixel instanceof OpenLayers.Pixel, "getScreenPxFromLonLat returns valid OpenLayers.Pixel" ); + var newPixel = map.getViewPortPxFromLonLat(lonlat); + t.ok( newPixel instanceof OpenLayers.Pixel, "getViewPortPxFromLonLat returns valid OpenLayers.Pixel" ); // WARNING!!! I'm faily sure that the following test's validity // depends highly on rounding and the resolution. For now,