Fixed scope of map in AddLayersDirective