Make sampleTerrain wait for the terrainProvider to be ready.