changed asynchrone method to callback function in convertMapLocations function