Commit 07809065 authored by ahocevar's avatar ahocevar
Browse files

Merge pull request #15 from proj4js/no-async

Removing remaining async code
parents ad9a7756 81c5122e
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -16,12 +16,6 @@
 */
proj4.Proj = proj4.Class({

  /**
   * Property: readyToUse
   * Flag to indicate if initialization is complete for this Proj object
   */
  readyToUse: true,   
  
  /**
   * Property: title
   * The title to describe the projection
@@ -159,7 +153,6 @@ proj4.Proj = proj4.Class({
    }
      proj4.extend(this, proj4.Proj[this.projName]);
      this.init();
      this.readyToUse = true;
      if( this.queue ) {
        var item;
        while( (item = this.queue.shift()) ) {
+1 −14
Original line number Diff line number Diff line
@@ -28,12 +28,6 @@ $Id: Proj.js 2956 2007-07-09 12:17:52Z steven $
 * -combined and -compressed versions of Proj4js includes all projection class
 * code by default.
 *
 * Note that dynamic loading of defs and code happens ascynchrously, check the
 * Proj.readyToUse flag before using the Proj object.  If the defs and code
 * required by your application are loaded through script tags, dynamic loading
 * is not required and the Proj object will be readyToUse on return from the 
 * constructor.
 * 
 * All coordinates are handled as points which have a .x and a .y property
 * which will be modified in place.
 *
@@ -66,14 +60,7 @@ proj4.defaultDatum = 'WGS84'; //default datum
    */
proj4.transform = function(source, dest, point) {
  var wgs84;
  if (!source.readyToUse) {
    this.reportError("proj4 initialization for:"+source.srsCode+" not yet complete");
    return point;
  }
  if (!dest.readyToUse) {
    this.reportError("proj4 initialization for:"+dest.srsCode+" not yet complete");
    return point;
  }

  function checkNotWGS(source,dest){
    return ((source.datum.datum_type === proj4.common.PJD_3PARAM || source.datum.datum_type === proj4.common.PJD_7PARAM) && dest.datumCode !== "WGS84");
  }