added main function to the maps api