How to make minimap gps line?

how to make mini map gps line like this

I say you can use a viewport frames and some pathfinding to do that.