reimplemented collectCoords function in maps controller