point = array("x" => $x, "y" => $y); } public function toGml2 () { $str = ""; $str .= $this->point["x"] . "," . $this->point["y"]; $str .= ""; return $str; } public function toGml3 () { $str = ""; $str .= $this->point["x"] . " " . $this->point["y"]; $str .= ""; return $str; } public function isEmpty () { return ($this->point ? false : true); } public function toGeoJSON () { $str = ""; if ($this->point) { $str .= "{\"type\": \"Point\", \"coordinates\":"; if ($this->isLatLonSrs($this->srs)) { $str .= "[".$this->point["y"].",".$this->point["x"]."]"; } else { $str .= "[".$this->point["x"].",".$this->point["y"]."]"; } $str .= "}"; } else { $e = new mb_exception("GMLPoint: toGeoJSON: this point is null."); } return $str; } public function getBbox () { $p = new Mapbender_point( $this->point["x"], $this->point["y"], $this->srs ); return new Mapbender_bbox($p, $p, $this->srs); } } ?>