Thanks for the help. I succesfully created the city map.
But, I may need some more help.
The real task on the map is that:
We have 2 different person at different places. The building IDs will be entered by user.
these two persons have different goals(buildings to go). There is a restriction. these two person cannot get closer more than a distance(entered by user).
With given 2 initial bulding IDs and 2 goals and 1 restriction, the program must tell us that, may the goals be achieved or not.
for the map that I had given before examples are here.