From e0aa067cb6aaa8fd3de1eb4d4fec09d548bc2117 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 1 Jun 2006 12:30:46 +0000 Subject: [PATCH] remove 'projection' member from Layer. keep single instance in map git-svn-id: http://svn.openlayers.org/trunk/openlayers@496 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer.js | 3 --- lib/OpenLayers/Layer/Grid.js | 2 +- lib/OpenLayers/Map.js | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 4f18e91f1b..a95008c76e 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -11,9 +11,6 @@ OpenLayers.Layer.prototype = { /** This variable is set in map.addLayer, not within the layer itself * @type OpenLayers.Map */ map: null, - - // str -- projection for use in WFS, WMS, etc. - projection: null, /** * @param {str} name diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index e14f700da4..34b088f40d 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -220,7 +220,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { */ getFullRequestString:function(params) { var requestString = ""; - this.params.SRS = this.projection; + this.params.SRS = this.map.projection; // concat tile params with layer params and convert to string var allParams = Object.extend(params, this.params); var paramsString = OpenLayers.Util.getParameterString(allParams); diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index a54da66d48..0009f45edb 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -130,7 +130,6 @@ OpenLayers.Map.prototype = { */ addLayer: function (layer, zIndex) { layer.map = this; - layer.projection = this.projection; layer.div.style.overflow = ""; if (zIndex) { layer.div.style.zIndex = zIndex; @@ -387,6 +386,10 @@ OpenLayers.Map.prototype = { this.events.triggerEvent("moveend"); }, + /** + * ZOOM TO BOUNDS FUNCTION + */ + moveToNewExtent: function (zoomChanged) { if (zoomChanged != null) { // reset the layerContainerDiv's location this.layerContainerDiv.style.left = "0px";