@@ -89,10 +89,10 @@ |
||
89 | 89 | // the item currently has no location |
90 | 90 | $attributes['data-useMapBounds'] = true; |
91 | 91 | } |
92 | - $content = '<div class="editableMapWrapper">' . $this->create_tag( |
|
92 | + $content = '<div class="editableMapWrapper">'.$this->create_tag( |
|
93 | 93 | "div", |
94 | 94 | $attributes |
95 | - ) . '</div>'; |
|
95 | + ).'</div>'; |
|
96 | 96 | |
97 | 97 | $this->FieldList()->push(new LiteralField('locationEditor', $content)); |
98 | 98 |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @param string $googleMapKey the googleMapKey |
155 | 155 | */ |
156 | 156 | |
157 | - public function __construct($googleMapKey='') { |
|
157 | + public function __construct($googleMapKey = '') { |
|
158 | 158 | $this->googleMapKey = $googleMapKey; |
159 | 159 | } |
160 | 160 | |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | * @return void |
211 | 211 | */ |
212 | 212 | |
213 | - public function setClusterer($useClusterer, $gridSize=50, $maxZoom=17, |
|
214 | - $clustererLibraryPath='/mappable/javascript/google/markerclusterer.js') { |
|
213 | + public function setClusterer($useClusterer, $gridSize = 50, $maxZoom = 17, |
|
214 | + $clustererLibraryPath = '/mappable/javascript/google/markerclusterer.js') { |
|
215 | 215 | $this->useClusterer = $useClusterer; |
216 | 216 | $this->gridSize = $gridSize; |
217 | 217 | $this->maxZoom = $maxZoom; |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | * @return void |
509 | 509 | */ |
510 | 510 | |
511 | - public function addMarkerByCoords($lat, $lng, $html='', $category='', $icon='') { |
|
511 | + public function addMarkerByCoords($lat, $lng, $html = '', $category = '', $icon = '') { |
|
512 | 512 | $m = array( |
513 | 513 | 'latitude' => $lat, |
514 | 514 | 'longitude' => $lng, |
@@ -532,9 +532,9 @@ discard block |
||
532 | 532 | * @return void |
533 | 533 | */ |
534 | 534 | |
535 | - public function addMarkerByAddress($address, $content='', $category='', $icon='') { |
|
535 | + public function addMarkerByAddress($address, $content = '', $category = '', $icon = '') { |
|
536 | 536 | $point = $this->geocoding($address); |
537 | - if ($point!==null) { |
|
537 | + if ($point !== null) { |
|
538 | 538 | $this->addMarkerByCoords($point[2], $point[3], $content, $category, $icon); |
539 | 539 | } else { |
540 | 540 | // throw new Exception('Adress not found : '.$address); |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | * @return void |
553 | 553 | */ |
554 | 554 | |
555 | - public function addArrayMarkerByCoords($coordtab, $category='', $icon='') { |
|
555 | + public function addArrayMarkerByCoords($coordtab, $category = '', $icon = '') { |
|
556 | 556 | foreach ($coordtab as $coord) { |
557 | 557 | $this->addMarkerByCoords($coord[0], $coord[1], $coord[2], $category, $icon); |
558 | 558 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | * @return void |
635 | 635 | */ |
636 | 636 | |
637 | - public function addArrayMarkerByAddress($coordtab, $category='', $icon='') { |
|
637 | + public function addArrayMarkerByAddress($coordtab, $category = '', $icon = '') { |
|
638 | 638 | foreach ($coordtab as $coord) { |
639 | 639 | $this->addMarkerByAddress($coord[0], $coord[1], $category, $icon); |
640 | 640 | } |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | * @return void |
652 | 652 | */ |
653 | 653 | |
654 | - public function addDirection($from, $to, $idpanel='') { |
|
654 | + public function addDirection($from, $to, $idpanel = '') { |
|
655 | 655 | $this->contentMarker .= 'addDirection("'.$from.'","'.$to.'","'.$idpanel.'");'; |
656 | 656 | } |
657 | 657 | |
@@ -715,9 +715,9 @@ discard block |
||
715 | 715 | $linesJson = stripslashes($this->jsonRemoveUnicodeSequences($this->lines)); |
716 | 716 | $kmlJson = stripslashes($this->jsonRemoveUnicodeSequences($this->kmlFiles)); |
717 | 717 | } else { |
718 | - $jsonMarkers = stripslashes(json_encode($this->markers,JSON_UNESCAPED_UNICODE)); |
|
719 | - $linesJson = stripslashes(json_encode($this->lines,JSON_UNESCAPED_UNICODE)); |
|
720 | - $kmlJson = stripslashes(json_encode($this->kmlFiles,JSON_UNESCAPED_UNICODE)); |
|
718 | + $jsonMarkers = stripslashes(json_encode($this->markers, JSON_UNESCAPED_UNICODE)); |
|
719 | + $linesJson = stripslashes(json_encode($this->lines, JSON_UNESCAPED_UNICODE)); |
|
720 | + $kmlJson = stripslashes(json_encode($this->kmlFiles, JSON_UNESCAPED_UNICODE)); |
|
721 | 721 | } |
722 | 722 | |
723 | 723 | |
@@ -727,8 +727,8 @@ discard block |
||
727 | 727 | $this->latLongCenter : $this->geocoding($this->center); |
728 | 728 | |
729 | 729 | // coordinates for centre depending on which method used |
730 | - if ($geocodeCentre[0]=="200") { // success |
|
731 | - $latlngCentre = array('lat'=>$geocodeCentre[2],'lng' => $geocodeCentre[3]); |
|
730 | + if ($geocodeCentre[0] == "200") { // success |
|
731 | + $latlngCentre = array('lat'=>$geocodeCentre[2], 'lng' => $geocodeCentre[3]); |
|
732 | 732 | } else { // Paris |
733 | 733 | $latlngCentre = array('lat'=>48.8792, 'lng' => 2.34778); |
734 | 734 | } |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | return $result; |
821 | 821 | } |
822 | 822 | |
823 | - function processTemplateHTML($templateName, $templateVariables = null ) { |
|
823 | + function processTemplateHTML($templateName, $templateVariables = null) { |
|
824 | 824 | if (!$templateVariables) { |
825 | 825 | $templateVariables = new ArrayList(); |
826 | 826 | } |