陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
      }
    }
  *]
}