/** * Parse geographic coordinates * @param string $string geographic coordinates * @param string $service Name of map service * @return boolean */ public function parse($string, $service = null) { $coord = GeoCoordinate::getLatLonFromString($string); if (is_array($coord) === false) { $coord = Geocoders::getCoordinates($string, $service); if (is_array($coord) === false) { $this->latitude = false; $this->longitude = false; return false; } if (isset($coord['bounds'])) { $this->bounds = $coord['bounds']; } } $this->lat = $coord['lat']; $this->lon = $coord['lon']; return true; }