@@ -43,10 +43,10 @@ |
||
43 | 43 | foreach ($records as $record) { |
44 | 44 | $dob = new DataObject(); |
45 | 45 | //number_format((float)$number, 2, '.', ''); |
46 | - $dob->Latitude = number_format((float) $record['Lat'], 3, '.', ''); |
|
47 | - $dob->Longitude = number_format((float) $record['Lon'], 3, '.', ''); |
|
46 | + $dob->Latitude = number_format((float)$record['Lat'], 3, '.', ''); |
|
47 | + $dob->Longitude = number_format((float)$record['Lon'], 3, '.', ''); |
|
48 | 48 | $dob->Name = $record['Name']; |
49 | - $dob->Distance = number_format((float) $record['distance'], 2, '.', ''); |
|
49 | + $dob->Distance = number_format((float)$record['distance'], 2, '.', ''); |
|
50 | 50 | $mapurl = "http://maps.google.com?q={$dob->Latitude},{$dob->Longitude}"; |
51 | 51 | $dob->MapURL = $mapurl; |
52 | 52 | $dirurl = "http://maps.google.com?saddr={$latitude},{$longitude}&daddr={$dob->Latitude},{$dob->Longitude}"; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | // given millions of possible POIs an index is handy |
11 | 11 | private static $indexes = array( |
12 | 12 | 'OpenStreetMapID' => true, |
13 | - ); |
|
13 | + ); |
|
14 | 14 | |
15 | 15 | /* The openstreetmap id is only for scripting purposes */ |
16 | 16 | public function updateCMSFields(FieldList $fields) |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | Member::currentUser()->logOut(); |
15 | 15 | } |
16 | 16 | $link = $nearPage->Link(); |
17 | - error_log('POI PAGE LINK:'.$link); |
|
17 | + error_log('POI PAGE LINK:' . $link); |
|
18 | 18 | |
19 | 19 | $url = $link; |
20 | - error_log('TRYING URL '.$url); |
|
20 | + error_log('TRYING URL ' . $url); |
|
21 | 21 | $response = $this->get($url); |
22 | 22 | $this->assertEquals(200, $response->getStatusCode()); |
23 | 23 | |
24 | 24 | // location is MBK |
25 | - $url = $link.'find?lat=13.7444513&lng=100.5290196'; |
|
25 | + $url = $link . 'find?lat=13.7444513&lng=100.5290196'; |
|
26 | 26 | $response = $this->get($url); |
27 | 27 | $this->assertEquals(200, $response->getStatusCode()); |
28 | 28 | $expected = array( |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $this->assertExactMatchBySelector('table#nearestPOIs td.name', $expected); |
40 | 40 | |
41 | 41 | // location is victory monument |
42 | - $url = $link.'find?lat=13.7650776&lng=100.5369724'; |
|
42 | + $url = $link . 'find?lat=13.7650776&lng=100.5369724'; |
|
43 | 43 | $response = $this->get($url); |
44 | 44 | $this->assertEquals(200, $response->getStatusCode()); |
45 | 45 | $expected = array( |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function testShowGuideMarkers() |
22 | 22 | { |
23 | 23 | $layer = $this->objFromFixture('PointsOfInterestLayer', 'BTS'); |
24 | - error_log('LAYER: '.$layer->Name); |
|
24 | + error_log('LAYER: ' . $layer->Name); |
|
25 | 25 | $pois = $layer->PointsOfInterest(); |
26 | 26 | $poi = $pois->first(); |
27 | 27 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function updateBasicMap(&$map, &$autozoom) { |
51 | 51 | if (Object::has_extension($this->owner->ClassName, 'PointsOfInterestLayerExtension')) { |
52 | - foreach($this->owner->PointsOfInterestLayers() as $layer) { |
|
52 | + foreach ($this->owner->PointsOfInterestLayers() as $layer) { |
|
53 | 53 | $layericon = $layer->DefaultIcon(); |
54 | 54 | if ($layericon->ID === 0) { |
55 | 55 | $layericon = null; |