-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config.js
44 lines (40 loc) · 1.28 KB
/
Config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var tourMLEndpoint = 'http://localhost/tap/node/7/tourml.xml';
//check for query parameters
var queryParameters = function() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}();
//if tourml query parameter exists override the config
if (queryParameters["tourml"] !== undefined) {
tourMLEndpoint = queryParameters["tourml"];
}
//remove query parameters from url so backbone is good to go
var qPosition = window.location.href.indexOf('?');
if (qPosition > 0) {
var url = window.location.href.slice(0, qPosition);
// set the url
window.history.replaceState(null, null, url);
//window.location.hash = url;
}
var TapConfig = {
//customize these variables for your install
tourMLEndpoint: tourMLEndpoint,
trackerID: '',
geo: {},
social: {},
tourSettings: {
'default': {
'defaultNavigationController': 'StopListView',
'enabledNavigationControllers': ['KeypadView', 'StopListView', 'MapView']
}
},
navigationControllers: {},
viewRegistry: {},
primaryRouter: "Default"
};