public function staticPaths(array $pos = []) {
		$defaults = [
			'color' => 'blue',
			'weight' => 5 // pixel
		];

		// not a 2-level array? make it one
		if (!isset($pos[0])) {
			$pos = [$pos];
		}

		$res = [];
		foreach ($pos as $p) {
			$options = $p + $defaults;

			$markers = $options['path'];
			unset($options['path']);

			// prepare color
			if (!empty($options['color'])) {
				$options['color'] = $this->_prepColor($options['color']);
			}

			$path = [];
			foreach ($options as $key => $value) {
				$path[] = $key . ':' . urlencode($value);
			}
			foreach ($markers as $key => $pos) {
				if (is_array($pos)) {
					// lat/lng?
					$pos = $pos['lat'] . ',' . $pos['lng'];
				}
				$path[] = $pos;
			}
			$res[] = implode('|', $path);
		}
		return $res;
	}
public function staticPaths(array $pos = []) {
		$defaults = [
			'color' => 'blue',
			'weight' => 5 // pixel
		];

		// not a 2-level array? make it one
		if (!isset($pos[0])) {
			$pos = [$pos];
		}

		$res = [];
		foreach ($pos as $p) {
			$options = $p + $defaults;

			$markers = $options['path'];
			unset($options['path']);

			// prepare color
			if (!empty($options['color'])) {
				$options['color'] = $this->_prepColor($options['color']);
			}

			$path = [];
			foreach ($options as $key => $value) {
				$path[] = $key . ':' . urlencode($value);
			}
			foreach ($markers as $key => $pos) {
				if (is_array($pos)) {
					// lat/lng?
					$pos = $pos['lat'] . ',' . $pos['lng'];
				}
				$path[] = $pos;
			}
			$res[] = implode('|', $path);
		}
		return $res;
	}
public function staticPaths ( array $ pos = [ ] ) { $ defaults = [ 'color' => 'blue' , 'weight' => 5 // pixel ] ; // not a 2-level array? make it one if ( ! isset ( $ pos [ 0 ] ) ) { $ pos = [ $ pos ] ; } $ res = [ ] ; foreach ( $ pos as $ p ) { $ options = $ p + $ defaults ; $ markers = $ options [ 'path' ] ; unset ( $ options [ 'path' ] ) ; // prepare color if ( ! empty ( $ options [ 'color' ] ) ) { $ options [ 'color' ] = $ this -> _prepColor ( $ options [ 'color' ] ) ; } $ path = [ ] ; foreach ( $ options as $ key => $ value ) { $ path [ ] = $ key . ':' . urlencode ( $ value ) ; } foreach ( $ markers as $ key => $ pos ) { if ( is_array ( $ pos ) ) { // lat/lng? $ pos = $ pos [ 'lat' ] . ',' . $ pos [ 'lng' ] ; } $ path [ ] = $ pos ; } $ res [ ] = implode ( '|' , $ path ) ; } return $ res ; }
Prepare paths for staticMap

@param array $pos PathElementArrays
- elements: [required] (multiple array(lat=>x, lng=>y) or just a address strings)
- color: red/blue/green (optional, default blue)
- weight: numeric (optional, default: 5)
@return array Array of paths: e.g: color:0x0000FF80|weight:5|37.40303,-122.08334|37.39471,-122.07201|37.40589,-122.06171{|...}
Prepare paths for staticMap