Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method FollowUpCallToMapServer (LibOSM_LibraryCall librarycall) 
 | 
{ 
 | 
  #keys: '1[103544.0.740733783]' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Administrator Mar-12-2012 (created) 
 | 
    gettilescall := librarycall.astype( LibOSM_GetTilesCall ); 
 | 
    library := this.LibOSM_OSMGISLibrary(); 
 | 
     
 | 
    intermediatecallsneeded := gettilescall.IntermediateCallsNeeded(); 
 | 
    successfulintermediatecalls := gettilescall.SuccessfulIntermediateCalls(); 
 | 
    failedintermediatecalls := gettilescall.FailedIntermediateCalls(); 
 | 
    lastintermediatecall := gettilescall.LastIntermediateCall(); 
 | 
    if ( successfulintermediatecalls + failedintermediatecalls = intermediatecallsneeded ) 
 | 
    { 
 | 
      // All the tile responses have been processed 
 | 
      library.GetTilesEpilogue(); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      // There are still tile requests whose replies haven't been processed yet, or tile requests that need to be sent 
 | 
      assert( lastintermediatecall <= intermediatecallsneeded - 1, 
 | 
              "Out of range - last intermediate call:", lastintermediatecall, 
 | 
              ", intermediate calls needed:", intermediatecallsneeded ); 
 | 
      if ( lastintermediatecall < intermediatecallsneeded - 1 ) 
 | 
      { 
 | 
        // There are still tile requests that need to be sent 
 | 
        gettilescall.LastIntermediateCall( lastintermediatecall + 1 ); 
 | 
        gettilescall.GetTile( gettilescall.LastIntermediateCall() ); 
 | 
      } 
 | 
      else 
 | 
      { 
 | 
        // All the necessary tile requests have been sent, it's just that not all replies have been received yet 
 | 
      } 
 | 
    } 
 | 
  *] 
 | 
} 
 |