add the api and algorithm plotting function for map activity