| @@ -184,7 +184,7 @@ | ||
| 184 | 184 | |
| 185 | 185 | /** | 
| 186 | 186 | * Access the map editing field for the purpose of adding guide points | 
| 187 | - * @return [LatLongField] instance of location editing field | |
| 187 | + * @return FormField instance of location editing field | |
| 188 | 188 | */ | 
| 189 | 189 |  	public function getMapField() { | 
| 190 | 190 |  		if (!isset($this->mapField)) { | 
| @@ -18,7 +18,7 @@ discard block | ||
| 18 | 18 | 'MapPinIcon' => 'Image' | 
| 19 | 19 | ); | 
| 20 | 20 | |
| 21 | - static $defaults = array ( | |
| 21 | + static $defaults = array( | |
| 22 | 22 | 'Lat' =>0, | 
| 23 | 23 | 'Lon' => 0, | 
| 24 | 24 | 'Zoom' => 4, | 
| @@ -145,7 +145,7 @@ discard block | ||
| 145 | 145 | |
| 146 | 146 | // add any KML map layers | 
| 147 | 147 |  		if (Object::has_extension($this->owner->ClassName, 'MapLayerExtension')) { | 
| 148 | -		  foreach($this->owner->MapLayers() as $layer) { | |
| 148 | +		  foreach ($this->owner->MapLayers() as $layer) { | |
| 149 | 149 | $map->addKML($layer->KmlFile()->getAbsoluteURL()); | 
| 150 | 150 | // we have a layer, so turn on autozoom | 
| 151 | 151 | $autozoom = true; | 
| @@ -155,7 +155,7 @@ discard block | ||
| 155 | 155 | |
| 156 | 156 | // add points of interest taking into account the default icon of the layer as an override | 
| 157 | 157 |  		if (Object::has_extension($this->owner->ClassName, 'PointsOfInterestLayerExtension')) { | 
| 158 | -			foreach($this->owner->PointsOfInterestLayers() as $layer) { | |
| 158 | +			foreach ($this->owner->PointsOfInterestLayers() as $layer) { | |
| 159 | 159 | $layericon = $layer->DefaultIcon(); | 
| 160 | 160 |  				if ($layericon->ID === 0) { | 
| 161 | 161 | $layericon = null; | 
| @@ -8,15 +8,15 @@ | ||
| 8 | 8 | |
| 9 | 9 |  	public static function parse_googlestreetview($arguments, $caption = null, $parser = null) { | 
| 10 | 10 | // each of latitude, longitude and heading are required at a bare minimum | 
| 11 | -		if(!isset($arguments['latitude'])){ | |
| 11 | +		if (!isset($arguments['latitude'])) { | |
| 12 | 12 | return ''; | 
| 13 | 13 | } | 
| 14 | 14 | |
| 15 | -		if(!isset($arguments['longitude'])){ | |
| 15 | +		if (!isset($arguments['longitude'])) { | |
| 16 | 16 | return ''; | 
| 17 | 17 | } | 
| 18 | 18 | |
| 19 | -		if(!isset($arguments['heading'])){ | |
| 19 | +		if (!isset($arguments['heading'])) { | |
| 20 | 20 | return ''; | 
| 21 | 21 | } | 
| 22 | 22 | |
| @@ -7,11 +7,11 @@ | ||
| 7 | 7 | |
| 8 | 8 |  	public static function parse_googlemap($arguments, $caption = null, $parser = null) { | 
| 9 | 9 | // each of latitude and longitude are required at a bare minimum | 
| 10 | -		if(!isset($arguments['latitude'])){ | |
| 10 | +		if (!isset($arguments['latitude'])) { | |
| 11 | 11 | return ''; | 
| 12 | 12 | } | 
| 13 | 13 | |
| 14 | -		if(!isset($arguments['longitude'])){ | |
| 14 | +		if (!isset($arguments['longitude'])) { | |
| 15 | 15 | return ''; | 
| 16 | 16 | } | 
| 17 | 17 | |
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | $gmap = MapUtil::get_map($this->owner, $this->MarkerTemplateValues); | 
| 28 | 28 | $w = $width ? $width : MapUtil::$map_width; | 
| 29 | 29 | $h = $height ? $height : MapUtil::$map_height; | 
| 30 | - $gmap->setSize($w,$h); | |
| 30 | + $gmap->setSize($w, $h); | |
| 31 | 31 | return $gmap; | 
| 32 | 32 | } | 
| 33 | 33 | |
| @@ -446,8 +446,8 @@ | ||
| 446 | 446 | } | 
| 447 | 447 | |
| 448 | 448 | /** | 
| 449 | - * Set the center of the gmap | |
| 450 | - **/ | |
| 449 | + * Set the center of the gmap | |
| 450 | + **/ | |
| 451 | 451 |  	public function setLatLongCenter($center) { | 
| 452 | 452 | $this->latLongCenter = $center; | 
| 453 | 453 | return $this; | 
| @@ -163,7 +163,7 @@ discard block | ||
| 163 | 163 | * | 
| 164 | 164 | * @param string $googleMapKey the googleMapKey | 
| 165 | 165 | * | 
| 166 | - * @return void | |
| 166 | + * @return MapAPI | |
| 167 | 167 | */ | 
| 168 | 168 | |
| 169 | 169 |  	public function setKey($googleMapKey) { | 
| @@ -171,6 +171,9 @@ discard block | ||
| 171 | 171 | return $this; | 
| 172 | 172 | } | 
| 173 | 173 | |
| 174 | + /** | |
| 175 | + * @param boolean $inclusion | |
| 176 | + */ | |
| 174 | 177 |  	public function setIncludeDownloadJavascript($inclusion) { | 
| 175 | 178 | self::$include_download_javascript = $inclusion; | 
| 176 | 179 | return $this; | 
| @@ -207,7 +210,7 @@ discard block | ||
| 207 | 210 | * @param int $gridSize grid size | 
| 208 | 211 | * @param int $maxZoom max zoom to cluster at | 
| 209 | 212 | * | 
| 210 | - * @return void | |
| 213 | + * @return MapAPI | |
| 211 | 214 | */ | 
| 212 | 215 | |
| 213 | 216 | public function setClusterer($useClusterer, $gridSize=50, $maxZoom=17, | 
| @@ -224,7 +227,7 @@ discard block | ||
| 224 | 227 | * | 
| 225 | 228 | * @param string $googleMapId the google div ID | 
| 226 | 229 | * | 
| 227 | - * @return void | |
| 230 | + * @return MapAPI | |
| 228 | 231 | */ | 
| 229 | 232 | |
| 230 | 233 |  	public function setDivId($googleMapId) { | 
| @@ -237,7 +240,7 @@ discard block | ||
| 237 | 240 | * | 
| 238 | 241 | * @param string $googleMapDirectionId GoogleMap Direction ID for the HTML DIV | 
| 239 | 242 | * | 
| 240 | - * @return void | |
| 243 | + * @return MapAPI | |
| 241 | 244 | */ | 
| 242 | 245 | |
| 243 | 246 |  	public function setDirectionDivId($googleMapDirectionId) { | 
| @@ -252,7 +255,7 @@ discard block | ||
| 252 | 255 | * @param int $width GoogleMap width | 
| 253 | 256 | * @param int $height GoogleMap height | 
| 254 | 257 | * | 
| 255 | - * @return void | |
| 258 | + * @return MapAPI | |
| 256 | 259 | */ | 
| 257 | 260 | |
| 258 | 261 |  	public function setSize($width, $height) { | 
| @@ -268,7 +271,7 @@ discard block | ||
| 268 | 271 | * @param int $iconWidth GoogleMap marker icon width | 
| 269 | 272 | * @param int $iconHeight GoogleMap marker icon height | 
| 270 | 273 | * | 
| 271 | - * @return void | |
| 274 | + * @return MapAPI | |
| 272 | 275 | */ | 
| 273 | 276 | |
| 274 | 277 |  	public function setIconSize($iconWidth, $iconHeight) { | 
| @@ -282,7 +285,7 @@ discard block | ||
| 282 | 285 | * | 
| 283 | 286 | * @param string $lang GoogleMap lang : fr,en,.. | 
| 284 | 287 | * | 
| 285 | - * @return void | |
| 288 | + * @return MapAPI | |
| 286 | 289 | */ | 
| 287 | 290 | |
| 288 | 291 |  	public function setLang($lang) { | 
| @@ -295,7 +298,7 @@ discard block | ||
| 295 | 298 | * | 
| 296 | 299 | * @param int $zoom GoogleMap zoom. | 
| 297 | 300 | * | 
| 298 | - * @return void | |
| 301 | + * @return MapAPI | |
| 299 | 302 | */ | 
| 300 | 303 | |
| 301 | 304 |  	public function setZoom($zoom) { | 
| @@ -308,7 +311,7 @@ discard block | ||
| 308 | 311 | * | 
| 309 | 312 | * @param int $infoWindowZoom GoogleMap information window zoom. | 
| 310 | 313 | * | 
| 311 | - * @return void | |
| 314 | + * @return MapAPI | |
| 312 | 315 | */ | 
| 313 | 316 | |
| 314 | 317 |  	public function setInfoWindowZoom($infoWindowZoom) { | 
| @@ -319,9 +322,8 @@ discard block | ||
| 319 | 322 | /** | 
| 320 | 323 | * Enable the zoom on the marker when you click on it | 
| 321 | 324 | * | 
| 322 | - * @param int $zoom GoogleMap zoom. | |
| 323 | 325 | * | 
| 324 | - * @return void | |
| 326 | + * @return MapAPI | |
| 325 | 327 | */ | 
| 326 | 328 | |
| 327 | 329 |  	public function setEnableWindowZoom($enableWindowZoom) { | 
| @@ -332,9 +334,9 @@ discard block | ||
| 332 | 334 | /** | 
| 333 | 335 | * Enable theautomatic center/zoom at the gmap load | 
| 334 | 336 | * | 
| 335 | - * @param int $zoom GoogleMap zoom. | |
| 336 | 337 | * | 
| 337 | - * @return void | |
| 338 | + * @param boolean $enableAutomaticCenterZoom | |
| 339 | + * @return MapAPI | |
| 338 | 340 | */ | 
| 339 | 341 | |
| 340 | 342 |  	public function setEnableAutomaticCenterZoom($enableAutomaticCenterZoom) { | 
| @@ -347,7 +349,7 @@ discard block | ||
| 347 | 349 | * | 
| 348 | 350 | * @param string $center GoogleMap center (an address) | 
| 349 | 351 | * | 
| 350 | - * @return void | |
| 352 | + * @return MapAPI | |
| 351 | 353 | */ | 
| 352 | 354 | |
| 353 | 355 |  	public function setCenter($center) { | 
| @@ -362,7 +364,7 @@ discard block | ||
| 362 | 364 | * | 
| 363 | 365 | * @param string $mapType Can be one of road,satellite,hybrid or terrain. Defaults to road | 
| 364 | 366 | * | 
| 365 | - * @return void | |
| 367 | + * @return MapAPI | |
| 366 | 368 | */ | 
| 367 | 369 | |
| 368 | 370 |  	public function setMapType($mapType) { | 
| @@ -408,7 +410,7 @@ discard block | ||
| 408 | 410 | * | 
| 409 | 411 | * @param boolean $displayDirectionFields display directions or not in the info window | 
| 410 | 412 | * | 
| 411 | - * @return void | |
| 413 | + * @return MapAPI | |
| 412 | 414 | */ | 
| 413 | 415 | |
| 414 | 416 |  	public function setDisplayDirectionFields($displayDirectionFields) { | 
| @@ -421,7 +423,7 @@ discard block | ||
| 421 | 423 | * | 
| 422 | 424 | * @param boolean $defaultHideMarker hide all the markers on the map by default | 
| 423 | 425 | * | 
| 424 | - * @return void | |
| 426 | + * @return MapAPI | |
| 425 | 427 | */ | 
| 426 | 428 | |
| 427 | 429 |  	public function setDefaultHideMarker($defaultHideMarker) { | 
| @@ -505,7 +507,7 @@ discard block | ||
| 505 | 507 | * @param string $category marker category | 
| 506 | 508 | * @param string $icon an icon url | 
| 507 | 509 | * | 
| 508 | - * @return void | |
| 510 | + * @return MapAPI | |
| 509 | 511 | */ | 
| 510 | 512 | |
| 511 | 513 |  	public function addMarkerByCoords($lat, $lng, $html='', $category='', $icon='') { | 
| @@ -529,7 +531,7 @@ discard block | ||
| 529 | 531 | * @param string $category marker category | 
| 530 | 532 | * @param string $icon an icon url | 
| 531 | 533 | * | 
| 532 | - * @return void | |
| 534 | + * @return MapAPI | |
| 533 | 535 | */ | 
| 534 | 536 | |
| 535 | 537 |  	public function addMarkerByAddress($address, $content='', $category='', $icon='') { | 
| @@ -549,7 +551,7 @@ discard block | ||
| 549 | 551 | * @param string $category marker category | 
| 550 | 552 | * @param string $icon an icon url | 
| 551 | 553 | * | 
| 552 | - * @return void | |
| 554 | + * @return MapAPI | |
| 553 | 555 | */ | 
| 554 | 556 | |
| 555 | 557 |  	public function addArrayMarkerByCoords($coordtab, $category='', $icon='') { | 
| @@ -631,7 +633,7 @@ discard block | ||
| 631 | 633 | * @param string $category marker category | 
| 632 | 634 | * @param string $icon an icon url | 
| 633 | 635 | * | 
| 634 | - * @return void | |
| 636 | + * @return MapAPI | |
| 635 | 637 | */ | 
| 636 | 638 | |
| 637 | 639 |  	public function addArrayMarkerByAddress($coordtab, $category='', $icon='') { | 
| @@ -660,7 +662,7 @@ discard block | ||
| 660 | 662 | * | 
| 661 | 663 | * @param string $url url of the kml file compatible with gmap and gearth | 
| 662 | 664 | * | 
| 663 | - * @return void | |
| 665 | + * @return MapAPI | |
| 664 | 666 | */ | 
| 665 | 667 | |
| 666 | 668 |  	public function addKML($url) { | 
| @@ -820,6 +822,10 @@ discard block | ||
| 820 | 822 | return $result; | 
| 821 | 823 | } | 
| 822 | 824 | |
| 825 | + /** | |
| 826 | + * @param string $templateName | |
| 827 | + * @param ArrayData $templateVariables | |
| 828 | + */ | |
| 823 | 829 |  	function processTemplateHTML($templateName, $templateVariables = null ) { | 
| 824 | 830 |  		if (!$templateVariables) { | 
| 825 | 831 | $templateVariables = new ArrayList(); | 
| @@ -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 | } | 
| @@ -15,19 +15,19 @@ discard block | ||
| 15 | 15 | // legacy handling for old parameters: $title, $heading, ... | 
| 16 | 16 | // instead of new handling: $name, $title, $heading, ... | 
| 17 | 17 | $args = func_get_args(); | 
| 18 | -				if(!isset($args[1]) || is_numeric($args[1])) { | |
| 18 | +				if (!isset($args[1]) || is_numeric($args[1])) { | |
| 19 | 19 | $title = (isset($args[0])) ? $args[0] : null; | 
| 20 | 20 | // Use "HeaderField(title)" as the default field name for a HeaderField; | 
| 21 | 21 | // if it's just set to title then we risk causing accidental duplicate-field creation. | 
| 22 | 22 | |
| 23 | 23 | // this means i18nized fields won't be easily accessible through fieldByName() | 
| 24 | - $name = 'MapField' . $title; | |
| 24 | + $name = 'MapField'.$title; | |
| 25 | 25 | $headingLevel = (isset($args[1])) ? $args[1] : null; | 
| 26 | 26 | $allowHTML = (isset($args[2])) ? $args[2] : null; | 
| 27 | 27 | $form = (isset($args[3])) ? $args[3] : null; | 
| 28 | 28 | } | 
| 29 | 29 | |
| 30 | - if($headingLevel) $this->headingLevel = $headingLevel; | |
| 30 | + if ($headingLevel) $this->headingLevel = $headingLevel; | |
| 31 | 31 | $this->allowHTML = $allowHTML; | 
| 32 | 32 | parent::__construct($name, $title, null, $allowHTML, $form); | 
| 33 | 33 | } | 
| @@ -52,9 +52,9 @@ discard block | ||
| 52 | 52 | |
| 53 | 53 |  				Requirements::css('mappable/css/mapField.css'); | 
| 54 | 54 | |
| 55 | - return '<div class="editableMap">' . $this->createTag( | |
| 55 | + return '<div class="editableMap">'.$this->createTag( | |
| 56 | 56 | "div", | 
| 57 | 57 | $attributes | 
| 58 | - ) . '</div>'; | |
| 58 | + ).'</div>'; | |
| 59 | 59 | } | 
| 60 | 60 | } | 
| @@ -27,7 +27,9 @@ | ||
| 27 | 27 | $form = (isset($args[3])) ? $args[3] : null; | 
| 28 | 28 | } | 
| 29 | 29 | |
| 30 | - if($headingLevel) $this->headingLevel = $headingLevel; | |
| 30 | +				if($headingLevel) { | |
| 31 | + $this->headingLevel = $headingLevel; | |
| 32 | + } | |
| 31 | 33 | $this->allowHTML = $allowHTML; | 
| 32 | 34 | parent::__construct($name, $title, null, $allowHTML, $form); | 
| 33 | 35 | } | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | $gmap = MapUtil::get_map(new ArrayList(array($this->owner)), $this->MarkerTemplateValues); | 
| 41 | 41 | $w = $width ? $width : MapUtil::$map_width; | 
| 42 | 42 | $h = $height ? $height : MapUtil::$map_height; | 
| 43 | - $gmap->setSize($w,$h); | |
| 43 | + $gmap->setSize($w, $h); | |
| 44 | 44 | $gmap->setZoom($zoom); | 
| 45 | 45 | $gmap->setEnableAutomaticCenterZoom(false); | 
| 46 | 46 |  		if ($this->owner->MapPinEdited) { | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | $urlparts['markers'] = "icon:$pin|$lat,$lng"; | 
| 90 | 90 | } | 
| 91 | 91 | |
| 92 | - $src = htmlentities($apiurl . '?' . http_build_query($urlparts)); | |
| 92 | + $src = htmlentities($apiurl.'?'.http_build_query($urlparts)); | |
| 93 | 93 | return '<img src="'.$src.'" width="'.$w.'" height="'.$h.'" alt="'.$this->owner->Title.'" />'; | 
| 94 | 94 | } | 
| 95 | 95 | |
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | /** | 
| 3 | - * Defines the interface for a mappable DataObject. Implementors of this interface | |
| 4 | - * must define the following functions in order to work with the {@link GoogleMapUtil} | |
| 5 | - * helper class. | |
| 6 | - * | |
| 7 | - * @author Uncle Cheese | |
| 8 | - * @package mappable | |
| 9 | - */ | |
| 3 | + * Defines the interface for a mappable DataObject. Implementors of this interface | |
| 4 | +	 * must define the following functions in order to work with the {@link GoogleMapUtil} | |
| 5 | + * helper class. | |
| 6 | + * | |
| 7 | + * @author Uncle Cheese | |
| 8 | + * @package mappable | |
| 9 | + */ | |
| 10 | 10 |  interface Mappable { | 
| 11 | 11 | |
| 12 | 12 | /** | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | |
| 60 | 60 |  	public function testSetSize() { | 
| 61 | 61 | $map = $this->getMap(); | 
| 62 | -		$map->setSize('432px','1234px'); | |
| 62 | +		$map->setSize('432px', '1234px'); | |
| 63 | 63 | $html = $map->forTemplate(); | 
| 64 | 64 |  		$this->assertContains('style="width:432px; height: 1234px;"', $html); | 
| 65 | 65 | } | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 |  	public function testSetCenter() { | 
| 111 | 111 | $map = $this->getMap(); | 
| 112 | 112 | $map->setIncludeDownloadJavascript(true); | 
| 113 | - $map->setCenter(-23.714,47.149); | |
| 113 | + $map->setCenter(-23.714, 47.149); | |
| 114 | 114 | $html = $map->forTemplate(); | 
| 115 | 115 | echo $html; | 
| 116 | 116 |  		$expected = "data-centre='{\"lat\":023.714,\"lng\":47.149}'"; | 
| @@ -121,7 +121,7 @@ discard block | ||
| 121 | 121 |  	public function testSetLatLongCenter() { | 
| 122 | 122 | $map = $this->getMap(); | 
| 123 | 123 | $map->setIncludeDownloadJavascript(true); | 
| 124 | - $map->setLatLongCenter(-23.714,47.149); | |
| 124 | + $map->setLatLongCenter(-23.714, 47.149); | |
| 125 | 125 | $html = $map->forTemplate(); | 
| 126 | 126 | echo $html; | 
| 127 | 127 |  		$expected = "data-centre='{\"lat\":023.714,\"lng\":47.149}'"; |