build based on r487
git-svn-id: http://svn.openlayers.org/trunk/openlayers@488 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+57
-82
@@ -1,27 +1,3 @@
|
|||||||
////
|
|
||||||
/// This blob sucks in all the files in uncompressed form for ease of use
|
|
||||||
///
|
|
||||||
|
|
||||||
OpenLayers = new Object();
|
|
||||||
OpenLayers._scriptName = "lib/OpenLayers.js";
|
|
||||||
OpenLayers._getScriptLocation = function () {
|
|
||||||
var scriptLocation = "";
|
|
||||||
var SCRIPT_NAME = OpenLayers._scriptName;
|
|
||||||
|
|
||||||
var scripts = document.getElementsByTagName('script');
|
|
||||||
for (var i = 0; i < scripts.length; i++) {
|
|
||||||
var src = scripts[i].getAttribute('src');
|
|
||||||
if (src) {
|
|
||||||
var index = src.lastIndexOf(SCRIPT_NAME);
|
|
||||||
// is it found, at the end of the URL?
|
|
||||||
if ((index > -1) && (index + SCRIPT_NAME.length == src.length)) {
|
|
||||||
scriptLocation = src.slice(0, -SCRIPT_NAME.length);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return scriptLocation;
|
|
||||||
}
|
|
||||||
/* Prototype JavaScript framework, version 1.4.0
|
/* Prototype JavaScript framework, version 1.4.0
|
||||||
* (c) 2005 Sam Stephenson <sam@conio.net>
|
* (c) 2005 Sam Stephenson <sam@conio.net>
|
||||||
*
|
*
|
||||||
@@ -2690,8 +2666,8 @@ OpenLayers.Bounds.prototype = {
|
|||||||
* @type OpenLayers.Pixel
|
* @type OpenLayers.Pixel
|
||||||
*/
|
*/
|
||||||
getCenterPixel:function() {
|
getCenterPixel:function() {
|
||||||
return new OpenLayers.Pixel(this.left + (this.getWidth() / 2),
|
return new OpenLayers.Pixel( (this.left + this.right) / 2,
|
||||||
this.bottom + (this.getHeight() / 2));
|
(this.bottom + this.top) / 2);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2699,8 +2675,8 @@ OpenLayers.Bounds.prototype = {
|
|||||||
* @type OpenLayers.LonLat
|
* @type OpenLayers.LonLat
|
||||||
*/
|
*/
|
||||||
getCenterLonLat:function() {
|
getCenterLonLat:function() {
|
||||||
return new OpenLayers.LonLat(this.left + (this.getWidth() / 2),
|
return new OpenLayers.LonLat( (this.left + this.right) / 2,
|
||||||
this.bottom + (this.getHeight() / 2));
|
(this.bottom + this.top) / 2);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2821,12 +2797,25 @@ OpenLayers.Bounds.prototype = {
|
|||||||
*/
|
*/
|
||||||
OpenLayers.Bounds.fromString = function(str) {
|
OpenLayers.Bounds.fromString = function(str) {
|
||||||
var bounds = str.split(",");
|
var bounds = str.split(",");
|
||||||
return new OpenLayers.Bounds(parseFloat(bounds[0]),
|
return OpenLayers.Bounds.fromArray(bounds);
|
||||||
parseFloat(bounds[1]),
|
|
||||||
parseFloat(bounds[2]),
|
|
||||||
parseFloat(bounds[3]));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Alternative constructor that builds a new OpenLayers.Bounds
|
||||||
|
* from an array
|
||||||
|
*
|
||||||
|
* @constructor
|
||||||
|
*
|
||||||
|
* @param {Array} bbox Array of bounds values (ex. <i>[5,42,10,45]</i>)
|
||||||
|
*
|
||||||
|
* @returns New OpenLayers.Bounds object built from the passed-in Array.
|
||||||
|
* @type OpenLayers.Bounds
|
||||||
|
*/
|
||||||
|
OpenLayers.Bounds.fromArray = function(bbox) {
|
||||||
|
return new OpenLayers.Bounds(parseFloat(bbox[0]),
|
||||||
|
parseFloat(bbox[1]),
|
||||||
|
parseFloat(bbox[2]),
|
||||||
|
parseFloat(bbox[3]));
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} quadrant
|
* @param {String} quadrant
|
||||||
@@ -3259,21 +3248,23 @@ OpenLayers.ProxyHost = "/viewer/Crossbrowser/blindproxy.py?url=";
|
|||||||
/**
|
/**
|
||||||
* Ajax reader for OpenLayers
|
* Ajax reader for OpenLayers
|
||||||
*
|
*
|
||||||
* Pay close attention to how this works:
|
|
||||||
*
|
|
||||||
*@uri url to do remote XML http get
|
*@uri url to do remote XML http get
|
||||||
*@param 'get' format params (x=y&a=b...)
|
*@param 'get' format params (x=y&a=b...)
|
||||||
*@who object which is providing a specific callbacks for this request
|
*@who object to handle callbacks for this request
|
||||||
*@complete the name of the function which must be defined in the callers.handler[] array
|
*@complete the function to be called on success
|
||||||
*@failure the name of the function which must be defined in the callers.handler[] array
|
*@failure the function to be called on failure
|
||||||
*
|
*
|
||||||
* example usage from a caller:
|
* example usage from a caller:
|
||||||
*
|
*
|
||||||
* this.handlers["caps"] = function(request){..}
|
* caps: function(request) {
|
||||||
* OpenLayers.loadURL(url,params,this,"caps");
|
* -blah-
|
||||||
|
* },
|
||||||
|
*
|
||||||
|
* OpenLayers.loadURL(url,params,this,caps);
|
||||||
*
|
*
|
||||||
* Notice the above example does not provide an error handler; a default empty
|
* Notice the above example does not provide an error handler; a default empty
|
||||||
* handler is provided which merely logs the error if a failure handler is not supplied
|
* handler is provided which merely logs the error if a failure handler is not
|
||||||
|
* supplied
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -3309,31 +3300,18 @@ OpenLayers.loadURL = function(uri, params, caller,
|
|||||||
|
|
||||||
// ol.Log.debug("loadURL [" + uri + "]");
|
// ol.Log.debug("loadURL [" + uri + "]");
|
||||||
|
|
||||||
var successx;
|
var success = (onComplete) ? onComplete.bind(caller)
|
||||||
var failurex;
|
: OpenLayers.nullHandler;
|
||||||
var bind1 = null;
|
|
||||||
var bind2 = null;
|
|
||||||
|
|
||||||
if (onComplete) {
|
var failure = (onFailure) ? onFailure.bind(caller)
|
||||||
successx = caller.handlers[onComplete];
|
: OpenLayers.nullHandler;
|
||||||
bind1 = caller;
|
|
||||||
} else {
|
|
||||||
successx = OpenLayers.nullHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (onFailure) {
|
|
||||||
failurex = caller.handlers[onFailure];
|
|
||||||
bind2=caller;
|
|
||||||
} else {
|
|
||||||
failurex = OpenLayers.nullHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
// from prototype.js
|
// from prototype.js
|
||||||
new Ajax.Request(uri,
|
new Ajax.Request(uri,
|
||||||
{ method: 'get',
|
{ method: 'get',
|
||||||
parameters: params,
|
parameters: params,
|
||||||
onComplete: successx.bind(bind1),
|
onComplete: success,
|
||||||
onFailure: failurex.bind(bind2)
|
onFailure: failure
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -4366,9 +4344,9 @@ OpenLayers.Popup.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
this.div.style.width = this.size.w;
|
this.div.style.width = this.size.w;
|
||||||
this.div.style.height = this.size.h;
|
this.div.style.height = this.size.h;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4380,8 +4358,8 @@ OpenLayers.Popup.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
this.div.style.backgroundColor = this.backgroundColor;
|
this.div.style.backgroundColor = this.backgroundColor;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4394,11 +4372,11 @@ OpenLayers.Popup.prototype = {
|
|||||||
|
|
||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
// for Mozilla and Safari
|
// for Mozilla and Safari
|
||||||
this.div.style.opacity = this.opacity;
|
this.div.style.opacity = this.opacity;
|
||||||
|
|
||||||
// for IE
|
// for IE
|
||||||
this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')';
|
this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4411,7 +4389,7 @@ OpenLayers.Popup.prototype = {
|
|||||||
|
|
||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
this.div.style.border = this.border;
|
this.div.style.border = this.border;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4712,16 +4690,13 @@ OpenLayers.Tile.WFS.prototype =
|
|||||||
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
|
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
this.features = new Array();
|
this.features = new Array();
|
||||||
|
|
||||||
this.handlers = new Array();
|
|
||||||
this.handlers["requestSuccess"] = this.requestSuccess;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
draw:function() {
|
draw:function() {
|
||||||
OpenLayers.Tile.prototype.draw.apply(this, arguments);
|
OpenLayers.Tile.prototype.draw.apply(this, arguments);
|
||||||
this.loadFeaturesForRegion("requestSuccess");
|
this.loadFeaturesForRegion(this.requestSuccess);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -5606,9 +5581,9 @@ OpenLayers.Popup.AnchoredBubble.prototype =
|
|||||||
|
|
||||||
this.setRicoCorners(true);
|
this.setRicoCorners(true);
|
||||||
|
|
||||||
//set the popup color and opacity
|
//set the popup color and opacity
|
||||||
this.setBackgroundColor();
|
this.setBackgroundColor();
|
||||||
this.setOpacity();
|
this.setOpacity();
|
||||||
|
|
||||||
return this.div;
|
return this.div;
|
||||||
},
|
},
|
||||||
@@ -5640,11 +5615,11 @@ OpenLayers.Popup.AnchoredBubble.prototype =
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
if (this.contentDiv != null) {
|
if (this.contentDiv != null) {
|
||||||
this.div.style.background = "transparent";
|
this.div.style.background = "transparent";
|
||||||
Rico.Corner.changeColor(this.contentDiv, this.backgroundColor);
|
Rico.Corner.changeColor(this.contentDiv, this.backgroundColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5658,7 +5633,7 @@ OpenLayers.Popup.AnchoredBubble.prototype =
|
|||||||
if (this.div != null) {
|
if (this.div != null) {
|
||||||
if (this.contentDiv != null) {
|
if (this.contentDiv != null) {
|
||||||
Rico.Corner.changeOpacity(this.contentDiv, this.opacity);
|
Rico.Corner.changeOpacity(this.contentDiv, this.opacity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -5704,9 +5679,9 @@ OpenLayers.Popup.AnchoredBubble.prototype =
|
|||||||
Rico.Corner.round(this.div, options);
|
Rico.Corner.round(this.div, options);
|
||||||
} else {
|
} else {
|
||||||
Rico.Corner.reRound(this.contentDiv, options);
|
Rico.Corner.reRound(this.contentDiv, options);
|
||||||
//set the popup color and opacity
|
//set the popup color and opacity
|
||||||
this.setBackgroundColor();
|
this.setBackgroundColor();
|
||||||
this.setOpacity();
|
this.setOpacity();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user