예제 #1
0
 //first time you build the map you add all the car and roads near you
 public UserMap(Vehicle vehicle, IDataServer dataServer)
 {
     _currentVechicle      = vehicle;
     _dataServer           = dataServer;
     CurrentCarGpsLocation = _currentVechicle.CurrentLocation;
     try
     {
         Roads = _dataServer.GetRoadsAroundLocation(CurrentCarGpsLocation);
     }
     catch (Exception)
     {
         //should add here logger/error handling
         throw;
     }
     try
     {
         Vechicles = _dataServer.GetVechicalesAroundLocation(CurrentCarGpsLocation);
     }
     catch (Exception)
     {
         //should add here logger/error handling
         throw;
     }
 }