Merge branch 'master' into 3526

This commit is contained in:
ahocevar
2011-10-06 18:21:05 -04:00
61 changed files with 124 additions and 1054 deletions

View File

@@ -8,8 +8,6 @@
* @requires OpenLayers/Util.js
* @requires OpenLayers/Events.js
* @requires OpenLayers/Tween.js
* @requires OpenLayers/Console.js
* @requires OpenLayers/Lang.js
*/
/**
@@ -238,20 +236,6 @@ OpenLayers.Map = OpenLayers.Class({
*/
panRatio: 1.5,
/**
* Property: viewRequestID
* {String} Used to store a unique identifier that changes when the map
* view changes. viewRequestID should be used when adding data
* asynchronously to the map: viewRequestID is incremented when
* you initiate your request (right now during changing of
* baselayers and changing of zooms). It is stored here in the
* map and also in the data that will be coming back
* asynchronously. Before displaying this data on request
* completion, we check that the viewRequestID of the data is
* still the same as that of the map. Fix for #480
*/
viewRequestID: 0,
// Options
/**
@@ -946,12 +930,10 @@ OpenLayers.Map = OpenLayers.Class({
* layer - {<OpenLayers.Layer>}
*/
addLayer: function (layer) {
for(var i=0, len=this.layers.length; i <len; i++) {
for(var i = 0, len = this.layers.length; i < len; i++) {
if (this.layers[i] == layer) {
var msg = OpenLayers.i18n('layerAlreadyAdded',
{'layerName':layer.name});
OpenLayers.Console.warn(msg);
return false;
throw new Error("You tried to add the layer: " + layer.name +
" to the map, but it has already been added");
}
}
if (this.events.triggerEvent("preaddlayer", {layer: layer}) === false) {
@@ -960,7 +942,6 @@ OpenLayers.Map = OpenLayers.Class({
if(this.allOverlays) {
layer.isBaseLayer = false;
}
layer.div.className = "olLayerDiv";
layer.div.style.overflow = "";
@@ -1174,10 +1155,6 @@ OpenLayers.Map = OpenLayers.Class({
// set new baselayer
this.baseLayer = newBaseLayer;
// Increment viewRequestID since the baseLayer is
// changing. This is used by tiles to check if they should
// draw themselves.
this.viewRequestID++;
if(!this.allOverlays || this.baseLayer.visibility) {
this.baseLayer.setVisibility(true);
}
@@ -1819,8 +1796,6 @@ OpenLayers.Map = OpenLayers.Class({
if (zoomChanged) {
this.zoom = zoom;
this.resolution = res;
// zoom level has changed, increment viewRequestID.
this.viewRequestID++;
}
var bounds = this.getExtent();