title: Representing a map and running A* on it
body: <p>My question is mainly about map representation and I would like your opinions.</p>
  
  <p>Having a map represented by a bunch of roads and a connection between them - let's say road A is connected to B,C,D on one edge but there are only turns possible from A to C and D.
  Let's say I represent this by a graph where each road is an edge and each road meeting/end is a vertex. </p>
  
  <p>I want to run an A* or any other on such representation but... moving from node to node in the graph I strictly need to know where did I come from... I mean - from what direction. The next vertexes I can move to depend on the open turns that I have. </p>
  
  <p>I can keep where I came from but I also want this to be as generic as possible and the simple graph solution doesn't provide me a knowledge where do I come from.</p>
  
  <p>Could you please advice me how would you approach this one?</p>
  
  <p>Thanks!</p>