Merge branch 'master' into clientzoom
This commit is contained in:
@@ -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
|
||||
|
||||
/**
|
||||
@@ -948,12 +932,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) {
|
||||
@@ -962,7 +944,6 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
if(this.allOverlays) {
|
||||
layer.isBaseLayer = false;
|
||||
}
|
||||
|
||||
|
||||
layer.div.className = "olLayerDiv";
|
||||
layer.div.style.overflow = "";
|
||||
@@ -1176,10 +1157,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);
|
||||
}
|
||||
@@ -1697,14 +1674,6 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
parseInt(this.layerContainerDiv.style.left) - dx + "px";
|
||||
this.minPx.x -= dx;
|
||||
this.maxPx.x -= dx;
|
||||
if (wrapDateLine) {
|
||||
if (this.maxPx.x > maxX) {
|
||||
this.maxPx.x -= (maxX - minX);
|
||||
}
|
||||
if (this.minPx.x < minX) {
|
||||
this.minPx.x += (maxX - minX);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dy) {
|
||||
this.layerContainerDiv.style.top =
|
||||
@@ -1829,8 +1798,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();
|
||||
|
||||
Reference in New Issue
Block a user