public function addPolyline($from, $to, array $options = []) {
		if (is_array($from)) {
			$from = 'new google.maps.LatLng(' . (float)$from['lat'] . ', ' . (float)$from['lng'] . ')';
		} else {
			throw new Exception('not implemented yet, use array of lat/lng');
			//$from = '\'' . h($from) . '\'';
		}
		if (is_array($to)) {
			$to = 'new google.maps.LatLng(' . (float)$to['lat'] . ', ' . (float)$to['lng'] . ')';
		} else {
			throw new Exception('not implemented yet, use array of lat/lng');
			//$to = '\'' . h($to) . '\'';
		}

		$defaults = $this->_runtimeConfig['polyline'];
		$options += $defaults;

		$id = 'p' . static::$markerCount++;

		$polyline = "var start = $from;";
		$polyline .= "var end = $to;";
		$polyline .= "
				var poly = [
					start,
					end
				];
				var {$id}Polyline = new google.maps.Polyline({
					path: poly,
					strokeColor: '" . $options['color'] . "',
					strokeOpacity: " . $options['opacity'] . ",
					strokeWeight: " . $options['weight'] . "
				});
				{$id}Polyline.setMap(" . $this->name() . ");
			";
		$this->map .= $polyline;
	}
public function addPolyline($from, $to, array $options = []) {
		if (is_array($from)) {
			$from = 'new google.maps.LatLng(' . (float)$from['lat'] . ', ' . (float)$from['lng'] . ')';
		} else {
			throw new Exception('not implemented yet, use array of lat/lng');
			//$from = '\'' . h($from) . '\'';
		}
		if (is_array($to)) {
			$to = 'new google.maps.LatLng(' . (float)$to['lat'] . ', ' . (float)$to['lng'] . ')';
		} else {
			throw new Exception('not implemented yet, use array of lat/lng');
			//$to = '\'' . h($to) . '\'';
		}

		$defaults = $this->_runtimeConfig['polyline'];
		$options += $defaults;

		$id = 'p' . static::$markerCount++;

		$polyline = "var start = $from;";
		$polyline .= "var end = $to;";
		$polyline .= "
				var poly = [
					start,
					end
				];
				var {$id}Polyline = new google.maps.Polyline({
					path: poly,
					strokeColor: '" . $options['color'] . "',
					strokeOpacity: " . $options['opacity'] . ",
					strokeWeight: " . $options['weight'] . "
				});
				{$id}Polyline.setMap(" . $this->name() . ");
			";
		$this->map .= $polyline;
	}
public function addPolyline ( $ from , $ to , array $ options = [ ] ) { if ( is_array ( $ from ) ) { $ from = 'new google.maps.LatLng(' . ( float ) $ from [ 'lat' ] . ', ' . ( float ) $ from [ 'lng' ] . ')' ; } else { throw new Exception ( 'not implemented yet, use array of lat/lng' ) ; //$from = '\'' . h($from) . '\''; } if ( is_array ( $ to ) ) { $ to = 'new google.maps.LatLng(' . ( float ) $ to [ 'lat' ] . ', ' . ( float ) $ to [ 'lng' ] . ')' ; } else { throw new Exception ( 'not implemented yet, use array of lat/lng' ) ; //$to = '\'' . h($to) . '\''; } $ defaults = $ this -> _runtimeConfig [ 'polyline' ] ; $ options += $ defaults ; $ id = 'p' . static :: $ markerCount ++ ; $ polyline = "var start = $from;" ; $ polyline .= "var end = $to;" ; $ polyline .= "
				var poly = [
					start,
					end
				];
				var {$id}Polyline = new google.maps.Polyline({
					path: poly,
					strokeColor: '" . $ options [ 'color' ] . "',
					strokeOpacity: " . $ options [ 'opacity' ] . ",
					strokeWeight: " . $ options [ 'weight' ] . "
				});
				{$id}Polyline.setMap(" . $ this -> name ( ) . ");
			" ; $ this -> map .= $ polyline ; }
Add a polyline

This method adds a line between 2 points

@param array|string $from Location as array(fixed lat/lng pair) or string (to be geocoded at runtime)
@param array|string $to Location as array(fixed lat/lng pair) or string (to be geocoded at runtime)
@param array $options
- color (#FFFFFF ... #000000)
- opacity (0.1 ... 1, defaults to 1)
- weight in pixels (defaults to 2)
@see https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline
@return void
Add a polyline