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:
@@ -12,9 +12,6 @@ OpenLayers.Layer.prototype = {
|
|||||||
* @type OpenLayers.Map */
|
* @type OpenLayers.Map */
|
||||||
map: null,
|
map: null,
|
||||||
|
|
||||||
// str -- projection for use in WFS, WMS, etc.
|
|
||||||
projection: null,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {str} name
|
* @param {str} name
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
*/
|
*/
|
||||||
getFullRequestString:function(params) {
|
getFullRequestString:function(params) {
|
||||||
var requestString = "";
|
var requestString = "";
|
||||||
this.params.SRS = this.projection;
|
this.params.SRS = this.map.projection;
|
||||||
// concat tile params with layer params and convert to string
|
// concat tile params with layer params and convert to string
|
||||||
var allParams = Object.extend(params, this.params);
|
var allParams = Object.extend(params, this.params);
|
||||||
var paramsString = OpenLayers.Util.getParameterString(allParams);
|
var paramsString = OpenLayers.Util.getParameterString(allParams);
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ OpenLayers.Map.prototype = {
|
|||||||
*/
|
*/
|
||||||
addLayer: function (layer, zIndex) {
|
addLayer: function (layer, zIndex) {
|
||||||
layer.map = this;
|
layer.map = this;
|
||||||
layer.projection = this.projection;
|
|
||||||
layer.div.style.overflow = "";
|
layer.div.style.overflow = "";
|
||||||
if (zIndex) {
|
if (zIndex) {
|
||||||
layer.div.style.zIndex = zIndex;
|
layer.div.style.zIndex = zIndex;
|
||||||
@@ -387,6 +386,10 @@ OpenLayers.Map.prototype = {
|
|||||||
this.events.triggerEvent("moveend");
|
this.events.triggerEvent("moveend");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ZOOM TO BOUNDS FUNCTION
|
||||||
|
*/
|
||||||
|
|
||||||
moveToNewExtent: function (zoomChanged) {
|
moveToNewExtent: function (zoomChanged) {
|
||||||
if (zoomChanged != null) { // reset the layerContainerDiv's location
|
if (zoomChanged != null) { // reset the layerContainerDiv's location
|
||||||
this.layerContainerDiv.style.left = "0px";
|
this.layerContainerDiv.style.left = "0px";
|
||||||
|
|||||||
Reference in New Issue
Block a user