Separated configuration to config.js.

This commit is contained in:
FrozenCow 2010-12-27 11:58:57 +01:00
parent c2d8df8e94
commit cbed5c3a01
3 changed files with 14 additions and 14 deletions

10
web/config.js Normal file
View File

@ -0,0 +1,10 @@
var setup = {
tileUrl: 'tiles/',
updateUrl: 'up/', // For Apache and lighttpd
// updateUrl: 'up/default.aspx?lasttimestamp=', // For IIS
updateRate: 2000, // Seconds the map should poll for updates. (Seconds) * 1000. The default is 2000 (every 2 seconds).
showPortraitsOnMap: true,
showPortraitsInPlayerList: true,
showPlayerNameOnMap: false
};

View File

@ -11,8 +11,9 @@
<link rel="shortcut icon" href="follow_off.png" type="image/png" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="map.js" ></script>
<script type="text/javascript" src="map.js"></script>
</head>
<body>
<div id="mcmap"></div>
@ -43,4 +44,4 @@
</div>
<div id="link"></div>
</body>
</html>
</html>

View File

@ -1,14 +1,3 @@
var setup = {
tileUrl: 'http://www.yourdomain.com/minecraft/tiles/',
updateUrl: 'http://www.yourdomain.com/minecraft/up/', // Or if using ASP.NET: http://www.yourdomain.com/minecraft/up/default.aspx?lasttimestamp=
updateRate: 2000, //Seconds the map should poll for updates. (Seconds) * 1000. The default is 2000 (every 2 seconds).
showPortraitsOnMap: true,
showPortraitsInPlayerList: true,
showPlayerNameOnMap: false
};
/* THERE SHOULD BE NO NEED FOR MANUAL CONFIGURATION BEYOND THIS POINT */
/**
* This constructor creates a label and associates it with a marker.
* It is for the private use of the MarkerWithLabel class.
@ -827,4 +816,4 @@ function makeRequest(url, func, type, fail, post, contenttype)
}
// assert('hi');
return originalArray;
}
}