function addPolyLineByCoords($lon1,$lat1,$lon2,$lat2,$id=false,$color='',$weight=0,$opacity=0) {
		if($id !== false && isset($this->_polylines[$id]) && is_array($this->_polylines[$id])){
			$_polyline = $this->_polylines[$id];
		}else{
			//only set color,weight,and opacity if new polyline
			$_polyline = array(
				"color"=>$color,
				"weight"=>$weight,
				"opacity"=>$opacity
			);
		}
		if(!isset($_polyline['coords']) || !is_array($_polyline['coords'])){
			$_polyline['coords'] = array(
				"0"=> array("lat"=>$lat1, "long"=>$lon1),
				"1"=> array("lat"=>$lat2, "long"=>$lon2)
			);
		}else{
			$last_index = sizeof($_polyline['coords'])-1;
			//check if lat1/lon1 point is already on polyline
			if($_polyline['coords'][$last_index]["lat"] != $lat1 || $_polyline['coords'][$last_index]["long"]  != $lon1){
				$_polyline['coords'][] = array("lat"=>$lat1, "long"=>$lon1);
			}
			$_polyline['coords'][] = array("lat"=>$lat2, "long"=>$lon2);
		}
        if($id === false){
            $this->_polylines[] = $_polyline;
            $id = count($this->_polylines) - 1;
        }else{
			$this->_polylines[$id] = $_polyline;
        }
        $this->adjustCenterCoords($lon1,$lat1);
        $this->adjustCenterCoords($lon2,$lat2);
        // return index of polyline
        return $id;
    }