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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user