Added another way to specify configuration file.

This commit is contained in:
FrozenCow 2011-05-06 23:18:46 +02:00
parent 5f32f8fb99
commit c4e1362274
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,9 @@
var config = { var config = {
tileUrl: 'tiles/', tileUrl: 'tiles/',
updateUrl: 'up/', // For Apache and lighttpd updateUrl: 'up/', // For Apache and lighttpd
// updateUrl: 'up.php?path=', // For Apache and lighttpd without ability to natively proxy // updateUrl: 'up.php?path=', // For Apache and lighttpd without ability to natively proxy
// updateUrl: 'up.aspx?path=', // For IIS // updateUrl: 'up.aspx?path=', // For IIS
// configurationUrl: 'standalone/dynmap_config.json', // For some standalone setups.
tileWidth: 128, tileWidth: 128,
tileHeight: 128 tileHeight: 128
}; };

View File

@ -78,7 +78,7 @@ function Location(world, x, y, z) {
function DynMap(options) { function DynMap(options) {
var me = this; var me = this;
me.options = options; me.options = options;
$.getJSON(me.options.updateUrl + 'configuration', function(configuration) { $.getJSON(me.options.configurationUrl || (me.options.updateUrl + 'configuration'), function(configuration) {
me.configure(configuration); me.configure(configuration);
me.initialize(); me.initialize();
}, function(status, statusMessage) { }, function(status, statusMessage) {