How to create a walking route plan app that allows you to specify the range and time [closed]

I’m creating a web app for walking using Google’s JavaScript Map API. However, I’m having trouble because I don’t know how to suggest a route with a specified time and range. I would appreciate it if you could let me know if you know.

① Encircle a certain area on the map with a freehand circle (convert to Polygon)
② User selects the required time (30, 60, 90 minutes)
③ Display a walking route that passes through preset spots based on the specified range and time.

I was able to create a Polygon on the map in ①, but I don’t know how to implement ② and ③.

A predetermined spots has its latitude and longitude registered in a CSV file.