From c4e1362274db9af61ca660aa143354a3b5cf659f Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Fri, 6 May 2011 23:18:46 +0200 Subject: [PATCH] Added another way to specify configuration file. --- web/config.js | 7 ++++--- web/js/map.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/config.js b/web/config.js index 44de8508..0b6ab591 100644 --- a/web/config.js +++ b/web/config.js @@ -1,8 +1,9 @@ var config = { tileUrl: 'tiles/', - updateUrl: 'up/', // For Apache and lighttpd -// updateUrl: 'up.php?path=', // For Apache and lighttpd without ability to natively proxy -// updateUrl: 'up.aspx?path=', // For IIS + updateUrl: 'up/', // For Apache and lighttpd +// updateUrl: 'up.php?path=', // For Apache and lighttpd without ability to natively proxy +// updateUrl: 'up.aspx?path=', // For IIS +// configurationUrl: 'standalone/dynmap_config.json', // For some standalone setups. tileWidth: 128, tileHeight: 128 }; \ No newline at end of file diff --git a/web/js/map.js b/web/js/map.js index 2bf153ed..0380c569 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -78,7 +78,7 @@ function Location(world, x, y, z) { function DynMap(options) { var me = this; me.options = options; - $.getJSON(me.options.updateUrl + 'configuration', function(configuration) { + $.getJSON(me.options.configurationUrl || (me.options.updateUrl + 'configuration'), function(configuration) { me.configure(configuration); me.initialize(); }, function(status, statusMessage) {