-
Notifications
You must be signed in to change notification settings - Fork 2
/
dynamic.js.php
19 lines (16 loc) · 975 Bytes
/
dynamic.js.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
// This script dynamically generates JavaScript containing certain configuration
// entries needed for clientside processing.
include("./include/inc.php");
header("Content-Type: text/javascript; charset=utf-8");
?>
var TILE_URI = <?php echo json_encode(getConfig("map_tile_uri")); ?>;
var ATTRIBUTION = <?php echo json_encode(getConfig("map_attribution")); ?>;
var DEFAULT_ZOOM = <?php echo json_encode(getConfig("default_zoom")); ?>;
var MAX_ZOOM = <?php echo json_encode(getConfig("max_zoom")); ?>;
var MAX_POINTS = <?php echo json_encode(getConfig("max_shown_pts")); ?>;
var VELOCITY_DELTA_TIME = <?php echo json_encode(getConfig("v_data_points")); ?>;
var TRAIL_COLORS = <?php echo json_encode(getConfig("trail_colors")); ?>;
var VELOCITY_UNIT = <?php echo json_encode(getConfig("velocity_unit")); ?>;
var OFFLINE_TIMEOUT = <?php echo json_encode(getConfig("offline_timeout")); ?>;
var REQUEST_TIMEOUT = <?php echo json_encode(getConfig("request_timeout")); ?>;