This is kind of hard to explain...
I have an image (campus map), for example I have coordinates of A and B relative to the image, I need to generate a path from A to B using the roads in the map, kinda like google directions but not that complex. I created a table of locations and their coordinates in the database like this:
id | coord_x | coord_y | location
1 | 45 | 150 | Library
2 | 61 | 80 | Cafeteria
I'm confused in the road part, I mean I can create a straight line from A to B but I need to use the road as path (like google directions). I don't know how I will save the roads in the database and how I will calculate the path, need help pls...