Complete function of MapManager of AddLayer and RemoveLayer