There is another a better way to do this that does not require using --javascript--delay (and has the advantage of not requiring you to set a delay time before you know what the required delay will actually be).
Add a callback to the 'tileloaded' event:
google.maps.event.addListenerOnce(map, 'tilesloaded', function(){
window.status = 'ready_to_print';
});
Then call wkhtmltopdf with the --window.status option set to 'ready_to_print' e.g.
wkhtmltopdf --window-status ready_to_print map.html map.pdf
obviously you can change the string 'ready_to_print' to be whatever you want so long as window.status does not already equal that value when wkhtmltopdf is called and before the above code fires.
A similar approach can be used with google charts, though the appropriate event goes by a different name.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…