Merged r[280]:[358] from source:/sandbox/follower/b-singlefile/ (Enable building of Single File Library version of OpenLayers library).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@359 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -29,8 +29,23 @@ OpenLayers._getScriptLocation = function () {
|
||||
return scriptLocation;
|
||||
}
|
||||
|
||||
try{new OpenLayers.Map();}
|
||||
catch(e){
|
||||
/*
|
||||
`_OPENLAYERS_SFL_` is a flag indicating this file is being included
|
||||
in a Single File Library build of the OpenLayers Library.
|
||||
|
||||
When we are *not* part of a SFL build we dynamically include the
|
||||
OpenLayers library code.
|
||||
|
||||
When we *are* part of a SFL build we do not dynamically include the
|
||||
OpenLayers library code as it will be appended at the end of this file.
|
||||
*/
|
||||
if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
||||
/*
|
||||
The original code appeared to use a try/catch block
|
||||
to avoid polluting the global namespace,
|
||||
we now use a anonymous function to achieve the same result.
|
||||
*/
|
||||
(function() {
|
||||
var jsfiles=new Array(
|
||||
"Prototype.js",
|
||||
"Rico/Corner.js",
|
||||
@@ -78,4 +93,5 @@ catch(e){
|
||||
allScriptTags += currentScriptTag;
|
||||
}
|
||||
document.write(allScriptTags);
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
2
lib/_sfl_header.js
Normal file
2
lib/_sfl_header.js
Normal file
@@ -0,0 +1,2 @@
|
||||
_OPENLAYERS_SFL_=true
|
||||
|
||||
Reference in New Issue
Block a user