bugfix showAlert, add method setLayer(), bind events layeradd/remove