private Map MappingMapModelToMap(MapModel mapModel) { Map map = new Map(); map.longitude = mapModel.Longitude; map.latitude = mapModel.Latitude; return map; }
private void LoadMap(MapModel map) { mapPoints.Add(map); if (mapPoints.Count == mapIds.Count) { PreviewData(); } }
private MapModel MappingMapToMapModel(Map map) { MapModel mapModel = new MapModel(); mapModel.MapId = map.mapid; mapModel.Latitude = map.latitude; mapModel.Longitude = map.longitude; return mapModel; }
public void GetMapCompleted(MapModel mapModel) { ViewLoadMapCallback(mapModel); }
private void LoadMapIds(List<int> ids) { mapIds = ids; GetMapCompleted handler = new GetMapCompleted(LoadMap); MapModel mapModel = new MapModel(); foreach (int mapId in ids) { mapModel.GetMapById(new Action<MapModel>(handler), mapId); } }
private void SaveBtn_Click(object sender, RoutedEventArgs e) { //insert map - get id MapModel mapModel = new MapModel(); SaveMapCallback handler = new SaveMapCallback(SaveMapCompleted); mapModel.SaveMap(new Action<List<int>>(handler), fieldPoints); }
private void GestureListener_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e) { Point p = e.GetPosition(mapMain); GeoCoordinate geo = new GeoCoordinate(); geo = mapMain.ViewportPointToLocation(p); mapMain.Center = geo; Pushpin pin = new Pushpin(); pin.Background = new SolidColorBrush(Colors.Orange); pin.Location = geo; MapModel mapModel = new MapModel(); mapModel.Latitude = geo.Latitude; mapModel.Longitude = geo.Longitude; fieldPoints.Add(mapModel); mapMain.Children.Add(pin); }