public UserNodeUserControl(string baseUri, UserNode userNode, ICommunicator communicator)
        {
            InitializeComponent();

            _baseUri = baseUri;
            _userNode = userNode;
            _communicator = communicator;

            Loaded += new RoutedEventHandler(UserNodeUserControl_Loaded);

            if (_moveIcon == null)
            {
                string uri = String.Concat(_baseUri, "Content/", "images/", "move.png");
                _moveIcon = new BitmapImage(new Uri(uri));
            }
        }
        void MapPresenter.IView.InitializeUser(UserNode userNode)
        {
            textBlockUserName.Text = userNode.Name;
            //create a user node and add it to the bing map with the highest zindex 
            _userNodeUserControl = new UserNodeUserControl(_baseUri, userNode, this);
            _userNodeUserControl.SetValue(MapLayer.PositionProperty,
                new Location(Convert.ToDouble(userNode.Latitude),
                             Convert.ToDouble(userNode.Longitude)));

            _userNodeUserControl.SetValue(Canvas.ZIndexProperty, 10);

            mapUndeadEarth.Children.Add(_userNodeUserControl);
        }
 private UserNode GetUserNode(Guid? userId)
 {
     UserNode userNode;
     if (!userId.HasValue)
     {
         userNode = null;
     }
     else
     {
         IUser currentUser = _userRetriever.GetUserById(userId.Value);
         if (currentUser == null)
         {
             userNode = null;
         }
         else
         {
             userNode = new UserNode
             {
                 Id = currentUser.Id,
                 ZoneId = currentUser.ZoneId,
                 Latitude = currentUser.Latitude,
                 Longitude = currentUser.Longitude,
                 Name = currentUser.DisplayName
             };
         }
     }
     return userNode;
 }