[fusion-commits] r1663 - in trunk: . layers layers/MapGuide
layers/MapServer layers/MapServer/php lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Nov 12 16:28:01 EST 2008
Author: madair
Date: 2008-11-12 16:28:01 -0500 (Wed, 12 Nov 2008)
New Revision: 1663
Added:
trunk/layers/MapGuide/
trunk/layers/MapServer/
Removed:
trunk/MapGuide/
trunk/MapServer/
Modified:
trunk/layers/MapServer/MapServer.js
trunk/layers/MapServer/php/CreateSession.php
trunk/layers/MapServer/php/LoadMap.php
trunk/layers/MapServer/php/LoadScaleRanges.php
trunk/layers/MapServer/php/Measure.php
trunk/layers/MapServer/php/Query.php
trunk/layers/MapServer/php/Selection.php
trunk/lib/ApplicationDefinition.js
trunk/lib/fusion.js
Log:
re #140: move MapGuide and MapServer to layers directory
Copied: trunk/layers/MapGuide (from rev 1662, trunk/MapGuide)
Property changes on: trunk/layers/MapGuide
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/layers/MapServer (from rev 1662, trunk/MapServer)
Property changes on: trunk/layers/MapServer
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/layers/MapServer/MapServer.js
===================================================================
--- trunk/MapServer/MapServer.js 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/MapServer.js 2008-11-12 21:28:01 UTC (rev 1663)
@@ -82,7 +82,7 @@
if (!this.session[0]) {
this.session[0] = this;
var sl = Fusion.getScriptLanguage();
- var scriptURL = this.arch + '/' + sl + '/CreateSession.' + sl;
+ var scriptURL = 'layers/' + this.arch + '/' + sl + '/CreateSession.' + sl;
var options = {onSuccess: OpenLayers.Function.bind(this.createSessionCB, this)};
Fusion.ajaxRequest(scriptURL,options);
}
@@ -151,7 +151,7 @@
this._bSelectionIsLoading = false;
var sl = Fusion.getScriptLanguage();
- var loadmapScript = this.arch + '/' + sl + '/LoadMap.' + sl;
+ var loadmapScript = 'layers/' + this.arch + '/' + sl + '/LoadMap.' + sl;
var params = {
'mapfile': mapfile,
'session': this.getSessionID()
@@ -266,7 +266,7 @@
this.aLayers = [];
var sl = Fusion.getScriptLanguage();
- var loadmapScript = this.arch + '/' + sl + '/LoadMap.' + sl;
+ var loadmapScript = 'layers/' + this.arch + '/' + sl + '/LoadMap.' + sl;
var params = {
'mapname': this._sMapname,
@@ -293,7 +293,7 @@
loadScaleRanges: function(userFunc) {
var sl = Fusion.getScriptLanguage();
- var loadmapScript = this.arch + '/' + sl + '/LoadScaleRanges.' + sl;
+ var loadmapScript = 'layers/' + this.arch + '/' + sl + '/LoadScaleRanges.' + sl;
var sessionid = this.getSessionID();
@@ -357,7 +357,7 @@
reorderLayers: function(aLayerIndex) {
var sl = Fusion.getScriptLanguage();
- var loadmapScript = this.arch + '/' + sl + '/SetLayers.' + sl;
+ var loadmapScript = 'layers/' + this.arch + '/' + sl + '/SetLayers.' + sl;
var params = {
'mapname': this._sMapname,
@@ -608,7 +608,7 @@
if (userFunc)
{
- var s = this.arch + '/' + Fusion.getScriptLanguage() + "/Selection." + Fusion.getScriptLanguage() ;
+ var s = 'layers/' + this.arch + '/' + Fusion.getScriptLanguage() + "/Selection." + Fusion.getScriptLanguage() ;
var params = {
'mapname': this._sMapname,
'session': this.getSessionID(),
@@ -693,7 +693,7 @@
}
var zoomTo = options.zoomTo || false;
var sl = Fusion.getScriptLanguage();
- var queryScript = this.arch + '/' + sl + '/Query.' + sl;
+ var queryScript = 'layers/' + this.arch + '/' + sl + '/Query.' + sl;
var params = {
'mapname': this._sMapname,
@@ -720,7 +720,7 @@
},
pingServer: function() {
- var s = this.arch + '/' + Fusion.getScriptLanguage() + "/Common." + Fusion.getScriptLanguage() ;
+ var s = 'layers/' + this.arch + '/' + Fusion.getScriptLanguage() + "/Common." + Fusion.getScriptLanguage() ;
var params = {};
params.parameters = {'session': this.getSessionID()};
Fusion.ajaxRequest(s, params);
@@ -758,7 +758,7 @@
getLegendImageURL: function(fScale, layer) {
var sl = Fusion.getScriptLanguage();
- var url = Fusion.getFusionURL() + '/' + this.arch + '/' + sl + '/LegendIcon.' + sl;
+ var url = Fusion.getFusionURL() + '/layers/' + this.arch + '/' + sl + '/LegendIcon.' + sl;
var sessionid = this.getSessionID();
var params = 'mapname='+this._sMapname+"&session="+sessionid + '&layername='+layer.resourceId + '&classindex='+this.index;
return url + '?'+params;
Modified: trunk/layers/MapServer/php/CreateSession.php
===================================================================
--- trunk/MapServer/php/CreateSession.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/CreateSession.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -30,7 +30,7 @@
/* initialize a session and return the session id to the caller */
include(dirname(__FILE__).'/Common.php');
-include('../../common/php/Utilities.php');
+include('../../../common/php/Utilities.php');
initializeSession( "sid", "", "" );
$sessionId = session_id();
Modified: trunk/layers/MapServer/php/LoadMap.php
===================================================================
--- trunk/MapServer/php/LoadMap.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/LoadMap.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -30,7 +30,7 @@
*****************************************************************************/
/* Common starts the session */
-include(dirname(__FILE__).'/../../common/php/Utilities.php');
+include(dirname(__FILE__).'/../../../common/php/Utilities.php');
include(dirname(__FILE__).'/Common.php');
include(dirname(__FILE__).'/Utilities.php');
Modified: trunk/layers/MapServer/php/LoadScaleRanges.php
===================================================================
--- trunk/MapServer/php/LoadScaleRanges.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/LoadScaleRanges.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -33,7 +33,7 @@
/* set up the session */
include ("Common.php");
-include('../../common/php/Utilities.php');
+include('../../../common/php/Utilities.php');
include ("Utilities.php");
Modified: trunk/layers/MapServer/php/Measure.php
===================================================================
--- trunk/MapServer/php/Measure.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/Measure.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -29,7 +29,7 @@
/* set up the session */
include ("Common.php");
include ("Utilities.php");
-include('../../common/php/Utilities.php');
+include('../../../common/php/Utilities.php');
try {
if (!isset($_REQUEST['session']) ||
Modified: trunk/layers/MapServer/php/Query.php
===================================================================
--- trunk/MapServer/php/Query.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/Query.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -32,7 +32,7 @@
/* set up the session */
include ("Common.php");
include ("Utilities.php");
-include('../../common/php/Utilities.php');
+include('../../../common/php/Utilities.php');
/* the name of the layer in the map to query */
if ($_REQUEST['layers'] != '') {
Modified: trunk/layers/MapServer/php/Selection.php
===================================================================
--- trunk/MapServer/php/Selection.php 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/layers/MapServer/php/Selection.php 2008-11-12 21:28:01 UTC (rev 1663)
@@ -31,7 +31,7 @@
/* set up the session */
include ("Common.php");
-include('../../common/php/Utilities.php');
+include('../../../common/php/Utilities.php');
include ("Utilities.php");
Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/lib/ApplicationDefinition.js 2008-11-12 21:28:01 UTC (rev 1663)
@@ -522,8 +522,7 @@
case 'MapGuide':
case 'MapServer':
if ( !Fusion.Layers[this.type] ) {
- //Fusion.require('layers/' + this.type + '/' + this.type + '.js');
- Fusion.require(this.type + '/' + this.type + '.js');
+ Fusion.require('layers/' + this.type + '/' + this.type + '.js');
}
break;
default:
Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js 2008-11-12 21:10:10 UTC (rev 1662)
+++ trunk/lib/fusion.js 2008-11-12 21:28:01 UTC (rev 1663)
@@ -66,86 +66,86 @@
* declare global namespace object for Fusion library to use
*/
window.Fusion = {
-
+
/***************************************************************************
* Class: Fusion.Tools
- *
+ *
* A set of utility classes that provide common tools for applications
***************************************************************************/
Tool: {},
/***************************************************************************
* Class: Fusion.Widget
- *
+ *
* A set of classes that implement the functionlity required for applications
***************************************************************************/
Widget: {},
/***************************************************************************
* Class: Fusion.Event
- *
+ *
* A class to provide for event handling at application runtime
***************************************************************************/
Event: {lastEventId: 1},
/***************************************************************************
* Class: Fusion.Lib
- *
+ *
* A set of classes to provide core funtionality
***************************************************************************/
Lib: {},
/***************************************************************************
* Class: Fusion.Maps
- *
- * A set of classes that implement mapping functionality for various server
+ *
+ * A set of classes that implement layer functionality for various server
* technologies.
***************************************************************************/
- Maps: {},
+ Layers: {},
/***************************************************************************
* Class: Fusion.Constant
- *
+ *
* Application scope constants
***************************************************************************/
Constant: {},
-
+
applicationDefinition: null,
-
+
/**
* URL to the configuration file to use for this application. The
* configuration file must be located on the same domain as the
* application template.
*/
sConfigFileURL : "",
-
+
sWebAgentURL : "",
sWebTierURL : "",
- sRedirectScript : "",
+ sRedirectScript : "",
bForceRedirect : false,
sScriptLang : "",
locale : 'en',
Strings: {}, //locale specific strings
-
+
/** URL to the directory from which fusion.js was loaded */
fusionURL: null,
-
- /**
+
+ /**
* configuration object that holds the server configuration as
* loaded from fusion/config.xml
*/
configuration: null,
-
+
/* broker instance for communicating with the mapagent */
oBroker: null,
-
+
/** An array of scripts that are queued to be loaded */
aScripts : [],
/** An array of scripts that are currently being loaded */
aLoadingScripts: [],
/** The current state during initialization of the application */
loadState: null,
-
+
/** API loading has not begun */
UNLOADED: 0,
/** Load the configuration file for the application */
@@ -154,7 +154,7 @@
LOAD_WIDGETS: 2,
/** Loading is complete */
LOAD_COMPLETE: 3,
-
+
/** unit related stuff */
UNKNOWN: 0,
INCHES: 1,
@@ -200,12 +200,12 @@
111061.75033, /* 12 - DMS */
1.0 /* 13 - PIXELS */],
aUnitNames: ['Unknown','Inches', 'Feet', 'Yards', 'Miles', 'Nautical Miles',
- 'Millimeters', 'Centimeters', 'Meters', 'Kilometers',
+ 'Millimeters', 'Centimeters', 'Meters', 'Kilometers',
'Degrees', 'Decimal Degrees', 'Degrees Minutes Seconds', 'Pixels'],
- aUnitAbbr: ['unk', 'in', 'ft', 'yd', 'mi', 'nm',
- 'mm', 'cm', 'm', 'km',
+ aUnitAbbr: ['unk', 'in', 'ft', 'yd', 'mi', 'nm',
+ 'mm', 'cm', 'm', 'km',
'°', '°', '°', 'px'],
-
+
/**
* Function: initialize
*
@@ -215,7 +215,7 @@
*
* Optional paramters that can be passed to initialize are:
*
- * {String} applicationDefinition - a URL or resource ID
+ * {String} applicationDefinition - a URL or resource ID
* for an ApplicationDefinition file
* {String} sessionId - a session id to start the application
* with. Normally, applications are started without
@@ -226,13 +226,13 @@
options = options || {};
var sessionIdParam = this.getQueryParam('Session');
this.sessionId = sessionIdParam || (options.sessionId || null);
-
+
if (options.applicationDefinitionURL) {
- this.applicationDefinitionURL = options.applicationDefinitionURL;
+ this.applicationDefinitionURL = options.applicationDefinitionURL;
} else {
var queryAppDef = this.getQueryParam('ApplicationDefinition');
if (queryAppDef) {
- this.applicationDefinitionURL = queryAppDef;
+ this.applicationDefinitionURL = queryAppDef.split('+').join(' ');
this.appDefJson = null; //wipe out any preloaded AppDef in a single file build
} else {
this.applicationDefinitionURL = 'ApplicationDefinition.xml';
@@ -252,22 +252,22 @@
/*
* if the application has been loaded from the same host as
* fusion is installed in, then technically we don't need to
- * use the redirect script because we conform to the
+ * use the redirect script because we conform to the
* Same Origin Policy for XmlHttpRequest to work.
*/
var test = window.location.protocol+'//'+window.location.host;
var configUrl = 'config.json';
- if ( ( ((this.fusionURL.indexOf("http://") < 0) && (this.fusionURL.indexOf("https://") < 0)) ||
- (this.fusionURL.indexOf(test,0) == 0) ) && !(this.bForceRedirect)) {
+ //if (this.fusionURL.indexOf(test,0) == 0) {
+ if ( ((this.fusionURL.indexOf("http://") < 0) || (this.fusionURL.indexOf(test,0) == 0)) && !(this.bForceRedirect)) {
this.sRedirectScript = '';
} else {
this.sRedirectScript = 'redirect.php';
configUrl += '&method=get';
}
-
+
/*script language*/
this.sScriptLang = 'php';
-
+
if (Fusion.configuration) {
//config.json loaded via single file build
this.serverSet();
@@ -280,11 +280,11 @@
this.ajaxRequest(configUrl, options);
}
},
-
+
initializeLocale: function(locale) {
OpenLayers.Lang.setCode(locale ? locale : window._FusionLocale);
this.locale = OpenLayers.Lang.code;
-
+
//check if strings are defined for specified locale, if not, set them to the default locale
if (!OpenLayers.Lang[this.locale]) {
OpenLayers.Lang[this.locale] = OpenLayers.Lang[OpenLayers.Lang.defaultCode];
@@ -294,7 +294,7 @@
}
OpenLayers.Util.extend(OpenLayers.Lang[this.locale], Fusion.Strings[this.locale]);
},
-
+
/**
* Function: setLoadState
*
@@ -335,7 +335,7 @@
* queued and loaded before the load state is advanced.
*/
loadQueuedScripts: function() {
- //with the compressed version, all scripts are already laoded so just
+ //with the compressed version, all scripts are already laoded so just
//increment the load state
if (this.aScripts.length == 0) {
this.setLoadState(this.loadState+1);
@@ -354,12 +354,12 @@
for (var i=0; i<this.aLoadingScripts.length; i++) {
document.getElementsByTagName('head')[0].appendChild(this.aLoadingScripts[i]);
}
-
+
//if IE or Safari
this.checkLoadInterval = window.setInterval(
OpenLayers.Function.bind(this.checkLoadingScripts, this), 500);
},
-
+
/**
* Function: queueScript
*
@@ -367,7 +367,7 @@
* to the Fusion base url. The script will not actually be loaded until
* loadQueuedScripts is called.
*
- * Parameter: {String} url
+ * Parameter: {String} url
*
* The url of the script.
*/
@@ -390,7 +390,7 @@
*
* Called when a script fails to load for some reason.
*
- * Parameter: url
+ * Parameter: url
*
* {String} the url that failed to load
*
@@ -398,10 +398,10 @@
* so we need to decide how to inform the user and fail gracefully.
*/
scriptFailed: function(url) {
- Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
+ Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
OpenLayers.i18n('scriptFailed',{'script':url})));
},
-
+
/**
* Function: scriptLoaded
*
@@ -411,7 +411,7 @@
* If yes, then we loadQueuedScripts again, otherwise we advance
* the load state.
*
- * Parameter: url
+ * Parameter: url
*
* {String} the url of the script that was loaded.
*/
@@ -477,18 +477,18 @@
Fusion.setLoadState(Fusion.LOAD_WIDGETS);
}
},
-
+
/**
* Function: getConfigCB
*
* the server has returned the application configuration file that
* contains enough information to bootstrap the application.
*
- * Parameter {Object} r
+ * Parameter {Object} r
* an XMLHttpRequest object
*/
getConfigCB : function(r) {
- if (r.responseText) {
+ if (r.responseText) {
eval("this.configuration="+r.responseText);
this.serverSet();
} else {
@@ -496,14 +496,14 @@
alert(OpenLayers.i18n('configParseError'));
}
},
-
+
/**
* Function: serverSet
*
* the server has returned the application configuration file that
* contains enough information to bootstrap the application.
*
- * Parameter {Object} r
+ * Parameter {Object} r
* an XMLHttpRequest object
*/
serverSet : function() {
@@ -527,11 +527,11 @@
}
this.configuration.mapguide.webTierUrl = s;
this.configuration.mapguide.mapAgentUrl = s + 'mapagent/mapagent.fcgi';
-
+
//trigger loading stuff ...
this.setLoadState(this.LOAD_CONFIG);
},
-
+
/**
* Function: serverFailed
*
@@ -540,16 +540,16 @@
* happened.
*
* Parameter: {Object} r
- *
+ *
* the XMLHttpRequest object
*
* TODO: do something more useful in here?
*/
serverFailed: function(r) {
//console.log('error loading server configuration file');
- alert(OpenLayers.i18n('configLoadError'));
+ alert(OpenLayers.i18n('configLoadError'));
},
-
+
/**
* Function: ajaxRequest
*
@@ -557,7 +557,7 @@
* to the Fusion installation.
*
* Parameter: {String} scriptURL
- *
+ *
* the URL (relative to Fusion) to request
*
* Parameter: {Object} options
@@ -585,7 +585,7 @@
}
new OpenLayers.Ajax.Request( url, options);
},
-
+
/**
* Function: ajaxException
*
@@ -596,14 +596,14 @@
* Parameter: {Exception} e
*/
ajaxException: function(r, e) {
- this.reportError(new Fusion.Error(Fusion.Error.WARNING,
- OpenLayers.i18n('ajaxError', {'exception':e.message,
- 'filename':e.fileName,
+ this.reportError(new Fusion.Error(Fusion.Error.WARNING,
+ OpenLayers.i18n('ajaxError', {'exception':e.message,
+ 'filename':e.fileName,
'line':e.lineNumber,
'response': r.transport.responseText
})));
},
-
+
/**
* Function: convertXML
*
@@ -630,7 +630,7 @@
};
new OpenLayers.Ajax.Request(url, options);
},
-
+
xml2json: function(callback, r, json) {
if (json) {
var o;
@@ -638,7 +638,7 @@
callback(o);
} else {
if (r.status >= 400) {
- Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
+ Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
'xml2json: invalid XML document: ' + r.statusText + " : " + r.request.url));
return;
}
@@ -652,7 +652,7 @@
Fusion.ajaxRequest('common/'+sl+'/Xml2JSON.'+sl, options);
}
},
-
+
/**
* Function: getMapByName
*
@@ -671,7 +671,7 @@
}
return map;
},
-
+
/**
* Function: getMapById
*
@@ -691,7 +691,7 @@
}
return map;
},
-
+
/**
* Function: getMapByIndice
*
@@ -710,7 +710,7 @@
}
return map;
},
-
+
/**
* Function: getWidgetById
*
@@ -738,7 +738,7 @@
return null;
}
},
-
+
/**
* Function getWidgetsByType
*
@@ -757,7 +757,7 @@
}
return widgets;
},
-
+
getSearchDefinitions: function() {
if (this.applicationDefinition) {
return this.applicationDefinition.searchDefinitions;
@@ -765,7 +765,7 @@
return {};
}
},
-
+
getSearchCategories: function() {
if (this.applicationDefinition) {
return this.applicationDefinition.searchCategories;
@@ -773,7 +773,7 @@
return {};
}
},
-
+
getApplicationDefinitionURL: function() { return this.applicationDefinitionURL; },
/**
@@ -781,7 +781,7 @@
*
* returns the applicaiton's absolute URL minus the filename.html part
*/
- getApplicationURL: function() {
+ getApplicationURL: function() {
var path = window.location.pathname;
var idx = path.lastIndexOf('/');
if (idx>=0) {
@@ -789,26 +789,26 @@
}
return window.location.protocol + "//" + window.location.host + path;
},
-
+
getFusionURL: function() {return this.fusionURL;},
-
- getConfigurationItem: function(arch, key) {
- if (this.configuration[arch] && this.configuration[arch][key]) {
- return this.configuration[arch][key];
- }
- return null;
+
+ getConfigurationItem: function(arch, key) {
+ if (this.configuration[arch] && this.configuration[arch][key]) {
+ return this.configuration[arch][key];
+ }
+ return null;
},
-
+
getScriptLanguage: function() { return this.configuration.general.scriptLanguage; },
-
+
getRedirectScript: function() { return this.sRedirectScript; },
-
+
getBroker: function() { return this.oBroker; },
-
+
require: function(url) { this.queueScript(url); },
-
+
reportError: function(o) { this.triggerEvent(Fusion.Event.FUSION_ERROR, o); },
-
+
unitFromName: function(unit) {
switch(unit.toLowerCase()) {
case 'unknown':
@@ -867,7 +867,7 @@
Fusion.UNKNOWN;
}
},
-
+
unitSystem: function(unit) {
switch(unit) {
@@ -892,7 +892,7 @@
return 'device';
}
},
-
+
unitName: function(unit) {
if (unit >= Fusion.UNKNOWN && unit <= Fusion.PIXELS) {
return (Fusion.aUnitNames[unit]);
@@ -925,15 +925,15 @@
return false;
},
convert: function(unitsIn, unitsOut, value) {
- if (unitsIn >= Fusion.UNKNOWN && unitsIn < Fusion.PIXELS &&
+ if (unitsIn >= Fusion.UNKNOWN && unitsIn < Fusion.PIXELS &&
unitsOut >= Fusion.UNKNOWN && unitsOut < Fusion.PIXELS) {
return Fusion.fromMeter(unitsOut, Fusion.toMeter(unitsIn, value));
}
return false;
},
-
+
/**
- * initializes the meters per unit values when a new map is loaded. Some systems make different
+ * initializes the meters per unit values when a new map is loaded. Some systems make different
* assumptions for the conversion of degrees to meters so this makes sure both Fusion and
* OpenLayers are using the same value.
*
@@ -949,13 +949,13 @@
Fusion.aUnitPerMeter[Fusion.DEGREES] = inverse;
Fusion.aUnitPerMeter[Fusion.DECIMALDEGREES] = inverse;
Fusion.aUnitPerMeter[Fusion.DMX] = inverse;
-
+
var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
}
},
-
+
/**
* find the OpenLayers units identifier given the Fusion metersPerUnit value
*
@@ -989,7 +989,6 @@
var s=window.location.search;
if (s!='') {
s=s.substring( 1 );
- s=s.split('+').join(' ');
var p=s.split('&');
for (var i=0;i<p.length;i++) {
var q=p[i].split('=');
@@ -1010,7 +1009,7 @@
return '';
}
},
-
+
/**
* Property: _scriptName
* {String} Relative path of this script.
@@ -1032,7 +1031,7 @@
for (var i = 0; i < scripts.length; i++) {
var src = scripts[i].getAttribute('src');
if (src) {
- var index = src.lastIndexOf(scriptName);
+ var index = src.lastIndexOf(scriptName);
if (index > -1) {
Fusion._scriptObject = scripts[i];
var img = document.createElement('img');
@@ -1055,22 +1054,22 @@
/*********************************************************************************/
/* actual bootstrap execution code follows */
-
+
Fusion._singleFile = singleFile;
var host = Fusion._getScriptLocation();
Jx.aPixel = Fusion.aPixel;
-
+
//determine the language to use and add resource bundles to be loaded to the core scripts
var locale = navigator.language ?
- navigator.language.substring(0,2): //e.g. en-CA becomes just en
- navigator.userLanguage.substring(0,2);//only use the prefix part for now,
+ navigator.language.substring(0,2): //e.g. en-CA becomes just en
+ navigator.userLanguage.substring(0,2);//only use the prefix part for now,
var s = window.location.search.toLowerCase();
var idx = s.indexOf('locale=');
if (idx>0) {
locale = s.substring(idx+7,idx+9);
}
window._FusionLocale = locale;
-
+
if (!Fusion._singleFile) {
var coreScripts = ['lib/OpenLayers/OpenLayers.js',
'lib/jxlib.uncompressed.js',
@@ -1083,13 +1082,14 @@
'lib/CanvasTool.js',
'lib/RectTool.js',
'lib/Map.js',
+ 'layers/Layers.js',
'lib/Search.js',
'text/en/strings.json'];
if (locale != 'en') {
coreScripts.push('lib/OpenLayers/Lang/'+locale+'.js');
coreScripts.push('text/'+locale+'/strings.json');
}
-
+
var agent = navigator.userAgent;
var docWrite = (agent.match("MSIE") || agent.match("Safari"));
if (docWrite) {
@@ -1098,12 +1098,12 @@
for (var i = 0; i < coreScripts.length; i++) {
if (docWrite) {
allScriptTags[i] = "<script src='" + host + coreScripts[i] +
- "'></script>";
+ "'></script>";
} else {
var s = document.createElement("script");
s.src = host + coreScripts[i];
- var h = document.getElementsByTagName("head").length ?
- document.getElementsByTagName("head")[0] :
+ var h = document.getElementsByTagName("head").length ?
+ document.getElementsByTagName("head")[0] :
document.body;
h.appendChild(s);
}
More information about the fusion-commits
mailing list