It looks to me that R2 had downloaded a map of the galaxy. I didn’t get the impression that the map was leading to anything in particular. There is an orange line there, but it doesn’t necessarily mean that the map was specifically one to the Jedi temple. It could just be that R2 was highlighting the only known hyperspace route into the uncharted region.
The best I can come up with is that the Empire was trying to map the galaxy and hadn’t gotten around to mapping that last section at the time of ANH. Then Luke goes and finds the Jedi temple and leaves the newly discovered piece with Lor San Tekka, or Tekka manages to reconstruct a map to the temple from esoteric religious sources.