wkt, strpos($this->wkt, "(") + 1, -1); $coords = explode(",", $coords_string); $this->coords = array(); for ($i = 0; $i < count($coords); $i++) { $infos = array(); $coord = $coords[$i]; $infos = explode(" ", $coord); $this->coords[] = new map_coord($infos[0], $infos[1]); } $this->coords_uptodate = true; } protected function build_wkt() { $this->wkt = $this->get_hold_type() . "("; $tmp_wkt = ""; foreach ($this->coords as $coord) { if ($tmp_wkt != "") $tmp_wkt .= ","; $tmp_wkt.= $coord->get_decimal_lat() . " " . $coord->get_decimal_long(); } $this->wkt.= $tmp_wkt . ")"; $this->wkt_uptodate = true; } } // end of map_hold_linestring