src/Cornford/Googlmapper/Models/Map.php
public function shape($type, $coordinates, array $options = [])
	{
		$parameters = [
			'coordinates' => $coordinates
		];

		$parameters = array_replace_recursive(
			$this->options,
			$parameters,
			$options
		);

		switch ($type) {
			case 'polyline':
				$this->shapes[] = new Polyline($parameters);
				break;
			case 'polygon':
				$this->shapes[] = new Polygon($parameters);
				break;
			case 'rectangle':
				$this->shapes[] = new Rectangle($parameters);
				break;
			case 'circle':
				$this->shapes[] = new Circle($parameters);
				break;
		}

	}
public function shape($type, $coordinates, array $options = [])
	{
		$parameters = [
			'coordinates' => $coordinates
		];

		$parameters = array_replace_recursive(
			$this->options,
			$parameters,
			$options
		);

		switch ($type) {
			case 'polyline':
				$this->shapes[] = new Polyline($parameters);
				break;
			case 'polygon':
				$this->shapes[] = new Polygon($parameters);
				break;
			case 'rectangle':
				$this->shapes[] = new Rectangle($parameters);
				break;
			case 'circle':
				$this->shapes[] = new Circle($parameters);
				break;
		}

	}
public function shape ( $ type , $ coordinates , array $ options = [ ] ) { $ parameters = [ 'coordinates' => $ coordinates ] ; $ parameters = array_replace_recursive ( $ this -> options , $ parameters , $ options ) ; switch ( $ type ) { case 'polyline' : $ this -> shapes [ ] = new Polyline ( $ parameters ) ; break ; case 'polygon' : $ this -> shapes [ ] = new Polygon ( $ parameters ) ; break ; case 'rectangle' : $ this -> shapes [ ] = new Rectangle ( $ parameters ) ; break ; case 'circle' : $ this -> shapes [ ] = new Circle ( $ parameters ) ; break ; } }
Add a map shape to the shapes bag.

@param string $type
@param array  $coordinates
@param array  $options

@return void
Add a map shape to the shapes bag .