Completed
Push — master ( 9280bd...613dee )
by Yannick
28:56
created
js/map.3d.js.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -329,15 +329,15 @@
 block discarded – undo
329 329
     }
330 330
 
331 331
 <?php
332
-    if (isset($globalMapUseBbox) && $globalMapUseBbox) {
332
+	if (isset($globalMapUseBbox) && $globalMapUseBbox) {
333 333
 ?>
334 334
     var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php?coord="+bbox());
335 335
 <?php
336
-    } else {
336
+	} else {
337 337
 ?>
338 338
     var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php");
339 339
 <?php
340
-    }
340
+	}
341 341
 ?>
342 342
     loc_geojson.then(function(geojsondata) {
343 343
 	loc = new Cesium.CustomDataSource('location');
Please login to merge, or discard this patch.
Braces   +35 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,21 +5,30 @@  discard block
 block discarded – undo
5 5
 
6 6
 document.cookie =  'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
7 7
 <?php
8
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
9
-	else $MapType = $globalMapProvider;
8
+	if (isset($_COOKIE['MapType'])) {
9
+		$MapType = $_COOKIE['MapType'];
10
+	} else {
11
+		$MapType = $globalMapProvider;
12
+	}
10 13
 
11 14
 //	unset($_COOKIE['MapType']);
12 15
 	if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road') {
13
-		if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial';
14
-		else $MapType = 'OpenStreetMap';
16
+		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
17
+			$MapType = 'Bing-Aerial';
18
+		} else {
19
+			$MapType = 'OpenStreetMap';
20
+		}
15 21
 	}
16 22
 	if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) {
17 23
 		$MapType = 'OpenStreetMap';
18 24
 	}
19 25
 	if ($MapType == 'Mapbox') {
20
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
21
-		else $MapBoxId = $_COOKIE['MapTypeId'];
22
-?>
26
+		if ($_COOKIE['MapTypeId'] == 'default') {
27
+			$MapBoxId = $globalMapboxId;
28
+		} else {
29
+			$MapBoxId = $_COOKIE['MapTypeId'];
30
+		}
31
+		?>
23 32
 	var imProv = Cesium.MapboxImageryProvider({
24 33
 		credit: 'Map data © OpenStreetMap contributors, ' +
25 34
 	      'CC-BY-SA, ' +
@@ -124,13 +133,23 @@  discard block
 block discarded – undo
124 133
 */
125 134
 ?>
126 135
 <?php
127
-	}  elseif (isset($globalMapCustomLayer[$MapType])) {
136
+	} elseif (isset($globalMapCustomLayer[$MapType])) {
128 137
 		$customid = $MapType;
129 138
 ?>
130 139
 	var imProv = Cesium.createOpenStreetMapImageryProvider({
131 140
 		url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>',
132
-		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>,
133
-		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
141
+		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
142
+	print $globalMapCustomLayer[$customid]['maxZoom'];
143
+} else {
144
+	print '99';
145
+}
146
+?>,
147
+		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
148
+	print $globalMapCustomLayer[$customid]['minZoom'];
149
+} else {
150
+	print '0';
151
+}
152
+?>,
134 153
 		credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
135 154
 	});
136 155
 <?php
@@ -507,7 +526,12 @@  discard block
 block discarded – undo
507 526
 }
508 527
 
509 528
 update_locationsLayer();
510
-setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
529
+setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) {
530
+	print $globalMapRefresh*1000*2;
531
+} else {
532
+	print '60000';
533
+}
534
+?>);
511 535
 /*
512 536
 var handlera = new Cesium.ScreenSpaceEventHandler(viewer.canvas, false);
513 537
 handlera.setInputAction(
Please login to merge, or discard this patch.