Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/GMapMarkerImage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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().')';
}
Expand All @@ -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().')';
}
Expand All @@ -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;
Expand Down