Esempio n. 1
0
 private void AddStopToMap(Stop stop)
 {
     PinViewModel pin = new PinViewModel(stop)
     {
         IsFav = App.ViewModel.Favourites.Contains(stop.stop_id)
     };
     App.ViewModel.Pins.Add(pin);
     if (stopsOnMap.ContainsKey(stop.stop_id))
     {
         stopsOnMap[stop.stop_id] = stop;
     }
     else
     {
         stopsOnMap.Add(stop.stop_id, stop);
     }
 }
Esempio n. 2
0
 private void AddUserPushpin()
 {
     if (userPushpin == null)
     {
         userPushpin = new PinViewModel("me")
         {
             IsCustom = true
         };
         stopMap.Center = geoWatch.Position.Location;
     }
     userPushpin.Location = geoWatch.Position.Location;
     App.ViewModel.SearchPins.Add(userPushpin);
 }
Esempio n. 3
0
 void stopMap_Hold(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Point p = e.GetPosition(stopMap);
     GeoCoordinate geo = new GeoCoordinate();
     geo = stopMap.ViewportPointToLocation(p);
     PinViewModel pin = new PinViewModel("")
     {
         IsCustom = true,
         Location = geo,
         Source = new BitmapImage(new Uri("/Images/appbar.compas.rest.png", UriKind.Relative))
     };
     App.ViewModel.SearchPins.Add(pin);
 }