src/Cornford/Googlmapper/Mapper.php
public function marker($latitude, $longitude, array $options = [])
	{
		$items = $this->getItems();

		if (empty($items)) {
			throw new MapperInstanceException('No map found to add a marker to.');
		}
        $item = end($items);
        $parameters = $this->getOptions();
		$options = array_replace_recursive(
			['markers' => $parameters['markers']],
			$item->getOptions()['markers'],
			$options
		);

		$item->marker($latitude, $longitude, $options);

		return $this;
	}
public function marker($latitude, $longitude, array $options = [])
	{
		$items = $this->getItems();

		if (empty($items)) {
			throw new MapperInstanceException('No map found to add a marker to.');
		}
        $item = end($items);
        $parameters = $this->getOptions();
		$options = array_replace_recursive(
			['markers' => $parameters['markers']],
			$item->getOptions()['markers'],
			$options
		);

		$item->marker($latitude, $longitude, $options);

		return $this;
	}
public function marker ( $ latitude , $ longitude , array $ options = [ ] ) { $ items = $ this -> getItems ( ) ; if ( empty ( $ items ) ) { throw new MapperInstanceException ( 'No map found to add a marker to.' ) ; } $ item = end ( $ items ) ; $ parameters = $ this -> getOptions ( ) ; $ options = array_replace_recursive ( [ 'markers' => $ parameters [ 'markers' ] ] , $ item -> getOptions ( ) [ 'markers' ] , $ options ) ; $ item -> marker ( $ latitude , $ longitude , $ options ) ; return $ this ; }
Add a new map marker.

@param float $latitude
@param float $longitude
@param array $options

@throws MapperException

@return self
Add a new map marker .