/** * Function: loadProjCode * Loads projection class code dynamically if required. * Projection code may be included either through a script tag or in * a built version of proj4php * * An exception occurs if the projection is not found. */ public function loadProjCode($projName) { if (array_key_exists($projName, Proj4php::$proj)) { $this->initTransforms(); return; } //the filename for the projection code $filename = dirname(__FILE__) . '/projCode/' . $projName . '.php'; try { Proj4php::loadScript($filename); $this->loadProjCodeSuccess($projName); } catch (Exception $e) { $this->loadProjCodeFailure($projName); } }