コード例 #1
0
        private Map MappingMapModelToMap(MapModel mapModel)
        {
            Map map = new Map();
            map.longitude = mapModel.Longitude;
            map.latitude = mapModel.Latitude;

            return map;
        }
コード例 #2
0
 private void LoadMap(MapModel map)
 {
     mapPoints.Add(map);
     if (mapPoints.Count == mapIds.Count)
     {
         PreviewData();
     }
 }
コード例 #3
0
        private MapModel MappingMapToMapModel(Map map)
        {
            MapModel mapModel = new MapModel();
            mapModel.MapId = map.mapid;
            mapModel.Latitude = map.latitude;
            mapModel.Longitude = map.longitude;

            return mapModel;
        }
コード例 #4
0
ファイル: MapModel.cs プロジェクト: vlado-github/CropManager
 public void GetMapCompleted(MapModel mapModel)
 {
     ViewLoadMapCallback(mapModel);
 }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
 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);
 }
コード例 #7
0
        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);
        }