hazard_viewer.js ~ improve the behavior of adding and removing layers to the map