Dynamically Avoiding Routes in Tour Guide App

I’m working on a tour guide project where users can leave comments about road conditions. I want to dynamically adjust the route based on these comments, avoiding certain coordinates (e.g., accidents). How can I implement this using map.js?

avoid routes on the base of specific coordinates