The invention relates to a method for regularly generating a disaster map based on NodeJs. The method comprises steps of a built-in
timer regularly generating a thematic task, meanwhile, an external request being received, whether a picture exists or not being judged, if yes, a disaster picture being returned to the request, and if not, a custom task being created; all the tasks being transmittedinto a task scheduling
queue and processed according to priorities; creating a sub-thread for each task by the main thread, starting a
headless browser in the sub-thread, creating a map canvas, and zooming a map to a task specified level; reading related data in the
database, drawing a graph, and loading the graph to the canvas; reading a related basic layer from a
file system and loading the related basic layer to the canvas; reading a related online
service layer from the online map service and loading the related online
service layer to the canvas; intercepting a task drawing area, and generating a disaster picture; saving the disaster picture to a
file system; and returning the disaster picture to the external request. The method is beneficial to providing disaster pictures for users,has low requirements on user networks and equipment, and is easy to operate and use.