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

		if (empty($items)) {
			throw new MapperInstanceException('No map found to add a polyline to.');
		}

		$defaults = [
			'coordinates' => $coordinates,
			'geodesic' => false,
			'strokeColor' => '#FF0000',
			'strokeOpacity' => 0.8,
			'strokeWeight' => 2,
			'editable' => false
		];

		$item = end($items);
		$options = array_replace_recursive(
			$defaults,
			$options
		);

		$item->shape('polyline', $coordinates, $options);

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

		if (empty($items)) {
			throw new MapperInstanceException('No map found to add a polyline to.');
		}

		$defaults = [
			'coordinates' => $coordinates,
			'geodesic' => false,
			'strokeColor' => '#FF0000',
			'strokeOpacity' => 0.8,
			'strokeWeight' => 2,
			'editable' => false
		];

		$item = end($items);
		$options = array_replace_recursive(
			$defaults,
			$options
		);

		$item->shape('polyline', $coordinates, $options);

		return $this;
	}
public function polyline ( array $ coordinates = [ ] , array $ options = [ ] ) { $ items = $ this -> getItems ( ) ; if ( empty ( $ items ) ) { throw new MapperInstanceException ( 'No map found to add a polyline to.' ) ; } $ defaults = [ 'coordinates' => $ coordinates , 'geodesic' => false , 'strokeColor' => '#FF0000' , 'strokeOpacity' => 0.8 , 'strokeWeight' => 2 , 'editable' => false ] ; $ item = end ( $ items ) ; $ options = array_replace_recursive ( $ defaults , $ options ) ; $ item -> shape ( 'polyline' , $ coordinates , $ options ) ; return $ this ; }
Add a new map polyline.

@param array $coordinates
@param array $options

@throws MapperException

@return self
Add a new map polyline .