From: Michael J. Rubinsky Date: Mon, 21 Jun 2010 21:22:41 +0000 (-0400) Subject: Allow passing a jsuri parameter to specify where to find the hordemap js files X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=855417e7380636447e305fb7c43e94c8c339e955;p=horde.git Allow passing a jsuri parameter to specify where to find the hordemap js files --- diff --git a/horde/js/hordemap/map.js b/horde/js/hordemap/map.js index 65f650358..5b33ad9a8 100644 --- a/horde/js/hordemap/map.js +++ b/horde/js/hordemap/map.js @@ -23,9 +23,10 @@ HordeMap = { * Initialize hordemap javascript * * @param object opts Hash containing: - * 'driver': HordeMap driver to use (Horde | SAPO) - * 'geocoder': Geocoder driver to use - * 'providers': default provider layers to add (Google, Yahoo etc...) + * 'driver': HordeMap driver to use (Horde | SAPO) + * 'geocoder': Geocoder driver to use + * 'providers': Default provider layers to add (Google, Yahoo etc...) + * 'jsuri': The uri to the hordemap directory * * 'conf': Any driver specific config settings such as: * 'language': @@ -39,8 +40,13 @@ HordeMap = { */ initialize: function(opts) { + var path; this._opts = opts; - var path = this._getScriptLocation(); + if(!opts.jsuri) { + path = this._getScriptLocation(); + } else { + path = opts.jsuri; + } this.conf = this._opts.conf; if (this._opts.driver == 'Horde') { this._addScript(path + 'OpenLayers.js');