Pulling in patches for OL 2.11 RC3:
* ArcGISCache resolutions get compromised by some JS frameworks. (Closes #3474) * OpenLayers.Layer.HTTPRequest initialize simplification (Closes #3470) * missing requires (Closes #3467) * deleting a vertex does not update feature.modified (Closes #3463) * fixing test failure in some browsers (Closes #3461) * a grid layer may be moved while its grid hasn't been initialized yet (Closes #3458) -- this one is the actual release blocker * Change the callback function of Protocol.Script (JSONP) (Closes #3417) * "build.py -c closure" does not work on Windows systems. (Closes #3158) git-svn-id: http://svn.openlayers.org/branches/openlayers/2.11@12274 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -633,6 +633,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.layer.drawFeature(this.feature, this.standalone ?
|
||||
undefined :
|
||||
this.selectControl.renderIntent);
|
||||
this.modified = true;
|
||||
this.resetVertices();
|
||||
this.setFeatureState();
|
||||
this.onModification(this.feature);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Format/XML.js
|
||||
* @requires OpenLayers/Format/OWSCommon/v1_1_0.js
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -172,21 +172,23 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
|
||||
this.lods = [];
|
||||
for(var key in info.tileInfo.lods) {
|
||||
var lod = info.tileInfo.lods[key];
|
||||
if (this.useScales) {
|
||||
this.scales.push(lod.scale);
|
||||
} else {
|
||||
this.resolutions.push(lod.resolution);
|
||||
if (info.tileInfo.lods.hasOwnProperty(key)) {
|
||||
var lod = info.tileInfo.lods[key];
|
||||
if (this.useScales) {
|
||||
this.scales.push(lod.scale);
|
||||
} else {
|
||||
this.resolutions.push(lod.resolution);
|
||||
}
|
||||
|
||||
var start = this.getContainingTileCoords(upperLeft, lod.resolution);
|
||||
lod.startTileCol = start.x;
|
||||
lod.startTileRow = start.y;
|
||||
|
||||
var end = this.getContainingTileCoords(bottomRight, lod.resolution);
|
||||
lod.endTileCol = end.x;
|
||||
lod.endTileRow = end.y;
|
||||
this.lods.push(lod);
|
||||
}
|
||||
|
||||
var start = this.getContainingTileCoords(upperLeft, lod.resolution);
|
||||
lod.startTileCol = start.x;
|
||||
lod.startTileRow = start.y;
|
||||
|
||||
var end = this.getContainingTileCoords(bottomRight, lod.resolution);
|
||||
lod.endTileCol = end.x;
|
||||
lod.endTileRow = end.y;
|
||||
this.lods.push(lod);
|
||||
}
|
||||
|
||||
this.maxExtent = this.calculateMaxExtentWithLOD(this.lods[0]);
|
||||
|
||||
@@ -58,9 +58,7 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, {
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function(name, url, params, options) {
|
||||
var newArguments = arguments;
|
||||
newArguments = [name, options];
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, newArguments);
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, [name, options]);
|
||||
this.url = url;
|
||||
this.params = OpenLayers.Util.extend( {}, params);
|
||||
},
|
||||
|
||||
@@ -1722,7 +1722,8 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
var layer, i, len;
|
||||
for (i=0, len=this.layers.length; i<len; ++i) {
|
||||
layer = this.layers[i];
|
||||
if (layer.visibility) {
|
||||
if (layer.visibility &&
|
||||
(layer === this.baseLayer || layer.inRange)) {
|
||||
layer.moveByPx(dx, dy);
|
||||
layer.events.triggerEvent("move");
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
*/
|
||||
createRequest: function(url, params, callback) {
|
||||
var id = OpenLayers.Protocol.Script.register(callback);
|
||||
var name = "OpenLayers.Protocol.Script.getCallback(" + id + ")";
|
||||
var name = "OpenLayers.Protocol.Script.registry[" + id + "]";
|
||||
params = OpenLayers.Util.extend({}, params);
|
||||
params[this.callbackKey] = this.callbackPrefix + name;
|
||||
url = OpenLayers.Util.urlAppend(
|
||||
@@ -328,7 +328,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
(function() {
|
||||
var o = OpenLayers.Protocol.Script;
|
||||
var counter = 0;
|
||||
var registry = {};
|
||||
o.registry = [];
|
||||
|
||||
/**
|
||||
* Function: OpenLayers.Protocol.Script.register
|
||||
@@ -344,7 +344,10 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
*/
|
||||
o.register = function(callback) {
|
||||
var id = ++counter;
|
||||
registry[id] = callback;
|
||||
o.registry[id] = function() {
|
||||
o.unregister(id);
|
||||
callback.apply(this, arguments);
|
||||
};
|
||||
return id;
|
||||
};
|
||||
|
||||
@@ -356,22 +359,6 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
* id: {Number} The identifer returned by the register function.
|
||||
*/
|
||||
o.unregister = function(id) {
|
||||
delete registry[id];
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: OpenLayers.Protocol.Script.getCallback
|
||||
* Retreive and unregister a callback. A call to this function is the "P"
|
||||
* in JSONP. For example, a script may be added with a src attribute
|
||||
* http://example.com/features.json?callback=OpenLayers.Protocol.Script.getCallback(1)
|
||||
*
|
||||
* Parameters:
|
||||
* id: {Number} The identifer returned by the register function.
|
||||
*/
|
||||
o.getCallback = function(id) {
|
||||
var callback = registry[id];
|
||||
o.unregister(id);
|
||||
return callback;
|
||||
delete o.registry[id];
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user