From f820a5120f0d49bcc417b8feb3a19deb4a53961d Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Mon, 26 May 2014 19:33:02 +0200 Subject: [PATCH] Fatal error using anchor + unable to use 0 values --- lib/GMapMarkerImage.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/GMapMarkerImage.class.php b/lib/GMapMarkerImage.class.php index 7468c7b..c6d933f 100755 --- a/lib/GMapMarkerImage.class.php +++ b/lib/GMapMarkerImage.class.php @@ -214,7 +214,7 @@ public function setAnchor($x, $y) public function sizeToJs() { $size = 'null'; - if (!empty($this->size['width']) && !empty($this->size['height'])) + if (!empty($this->size['width']) || !empty($this->size['height'])) { $size = 'new google.maps.Size('.$this->getWidth().','.$this->getHeight().')'; } @@ -231,7 +231,7 @@ public function sizeToJs() public function originToJs() { $origin = 'null'; - if (!empty($this->origin['x']) && !empty($this->origin['y'])) + if (!empty($this->origin['x']) || !empty($this->origin['y'])) { $origin = 'new google.maps.Point('.$this->getOriginX().','.$this->getOriginY().')'; } @@ -248,9 +248,9 @@ public function originToJs() public function anchorToJs() { $anchor = 'null'; - if (!empty($this->anchor['x']) && !empty($this->anchor['y'])) + if (!empty($this->anchor['x']) || !empty($this->anchor['y'])) { - $anchor = $this->getName().'new google.maps.Point('.$this->getAnchorX().','.$this->getAnchorY().')'; + $anchor = 'new google.maps.Point('.$this->getAnchorX().','.$this->getAnchorY().')'; } return $anchor;