| @@ 75-79 (lines=5) @@ | ||
| 72 | */ | |
| 73 | public function addMarker(array $position, $animation = false, $title = null) | |
| 74 | 	{ | |
| 75 | if (!is_string($animation) && !is_bool($animation)) | |
| 76 | 		{ | |
| 77 | 			throw new InvalidArgumentException("Animation must be string or boolean, $animation (" . | |
| 78 | gettype($animation) . ") was given"); | |
| 79 | } | |
| 80 | if (!is_string($title) && $title != null) | |
| 81 | 		{ | |
| 82 | 			throw new InvalidArgumentException("Title must be string or null, $title (".gettype($title).") was given"); | |
| @@ 80-83 (lines=4) @@ | ||
| 77 | 			throw new InvalidArgumentException("Animation must be string or boolean, $animation (" . | |
| 78 | gettype($animation) . ") was given"); | |
| 79 | } | |
| 80 | if (!is_string($title) && $title != null) | |
| 81 | 		{ | |
| 82 | 			throw new InvalidArgumentException("Title must be string or null, $title (".gettype($title).") was given"); | |
| 83 | } | |
| 84 | $this->markers[] = array( | |
| 85 | 'position' => $position, | |
| 86 | 'title' => $title, | |
| @@ 352-357 (lines=6) @@ | ||
| 349 | 			throw new InvalidArgumentException("the 'clickable' option only applies to static map"); | |
| 350 | } | |
| 351 | ||
| 352 | if (!is_bool($clickable) && !is_callable($clickable)) | |
| 353 | 		{ | |
| 354 | throw new InvalidArgumentException( | |
| 355 | 				"clickable must be boolean or callable, $clickable (".gettype($clickable).") was given" | |
| 356 | ); | |
| 357 | } | |
| 358 | ||
| 359 | 		if (is_callable($clickable)) { | |
| 360 | $this->clickable = $clickable; | |