コード例 #1
0
ファイル: MapVM.cs プロジェクト: Lakovshchikov/DoSS
 private void SetLocationThread()
 {
     ToWGS84();
     SelectedPlaceCoord = GetPlaceProp.GetPlaceCoordMethod(Coord.Substring(0, 9), Coord.Substring(12, 9));
     _Place             = GetPlaceProp.Get_Place(SelectedPlaceCoord.Features[0].Attrs.Id);
     MainViewModel.UpdateInfo();
     MainViewModel.Img_Uri = MainViewModel.UpdateImgUri(MainViewModel.BBox_Left_Top, MainViewModel.BBox_Right_Bottom, MainViewModel.MapViewModel._Place, ((int)MainViewModel.MyWindow.GridMap.ActualWidth).ToString(), ((int)MainViewModel.MyWindow.GridMap.ActualHeight).ToString());
     CreatePictureMarker(OverLay, MainViewModel.Img_Uri).Wait();
 }
コード例 #2
0
ファイル: MapVM.cs プロジェクト: Lakovshchikov/DoSS
        private List <Place> ReseachImage()
        {
            List <Place> ls         = new List <Place>();
            DatePoint    BlackPoint = ImageWorks.FindBlackPoint(GrayImagePKKwithBorder);

            while (BlackPoint._x != -1)
            {
                var location    = MyMapView.ScreenToLocation(new Point(BlackPoint._x, BlackPoint._y));
                var coord       = CoordinateFormatter.ToLatitudeLongitude(location, LatitudeLongitudeFormat.DecimalDegrees, 6);
                var _placeCoord = GetPlaceProp.GetPlaceCoordMethod(coord.Substring(0, 9), coord.Substring(12, 9));
                int cnt         = _placeCoord.Features[0].Attrs.Cn.Count(c => c == ':');
                if (_placeCoord.Features[0].Attrs.Address != null)
                {
                    var place1 = GetPlaceProp.Get_Place(_placeCoord.Features[0].Attrs.Id);
                    ls.Add(place1);
                }
                LineFill(BlackPoint._x, BlackPoint._y);
                BlackPoint = ImageWorks.FindBlackPoint(GrayImagePKKwithBorder);
            }
            ls = ls.GroupBy(s => s.Feature.Attrs.Cn).Select(g => g.First()).ToList();
            return(ls);
        }