@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | parent::init(); |
| 84 | 84 | // google maps api key |
| 85 | 85 | $key = Config::inst()->get(GoogleGeocoder::class, 'map_api_key'); |
| 86 | - Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key); |
|
| 86 | + Requirements::javascript('https://maps.google.com/maps/api/js?key='.$key); |
|
| 87 | 87 | |
| 88 | 88 | // prevent init of map if no query |
| 89 | 89 | $request = Controller::curr()->getRequest(); |
@@ -94,8 +94,7 @@ discard block |
||
| 94 | 94 | if ($locations) { |
| 95 | 95 | $featuredInList = ($locations->filter('Featured', true)->count() > 0); |
| 96 | 96 | $defaultCoords = $this->getAddressSearchCoords() ? |
| 97 | - $this->getAddressSearchCoords() : |
|
| 98 | - new ArrayData([ |
|
| 97 | + $this->getAddressSearchCoords() : new ArrayData([ |
|
| 99 | 98 | "Lat" => 0, |
| 100 | 99 | "Lng" => 0, |
| 101 | 100 | ]); |
@@ -109,7 +108,7 @@ discard block |
||
| 109 | 108 | if ($limit < 1) { |
| 110 | 109 | $limit = -1; |
| 111 | 110 | } |
| 112 | - $load = 'fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,'; |
|
| 111 | + $load = 'fullMapStart: true, storeLimit: '.$limit.', maxDistance: true,'; |
|
| 113 | 112 | |
| 114 | 113 | $listTemplatePath = $this->getListTemplate(); |
| 115 | 114 | $infowindowTemplatePath = $this->getInfoWindowTemplate(); |
@@ -121,7 +120,7 @@ discard block |
||
| 121 | 120 | unset($vars['url']); |
| 122 | 121 | $url = ''; |
| 123 | 122 | if (count($vars)) { |
| 124 | - $url .= '?' . http_build_query($vars); |
|
| 123 | + $url .= '?'.http_build_query($vars); |
|
| 125 | 124 | } |
| 126 | 125 | $link = Controller::join_links($this->Link(), 'xml.xml', $url); |
| 127 | 126 | |
@@ -248,8 +247,8 @@ discard block |
||
| 248 | 247 | if ($this->getShowRadius()) { |
| 249 | 248 | $radiusVar = $this->data()->config()->get('radius_var'); |
| 250 | 249 | |
| 251 | - if ($radius = (int)$request->getVar($radiusVar)) { |
|
| 252 | - $locations = $locations->filterByCallback(function ($location) use (&$radius) { |
|
| 250 | + if ($radius = (int) $request->getVar($radiusVar)) { |
|
| 251 | + $locations = $locations->filterByCallback(function($location) use (&$radius) { |
|
| 253 | 252 | return $location->Distance <= $radius; |
| 254 | 253 | }); |
| 255 | 254 | } |