Changes to map

Added all option to all, editing sql query, added direction linkage