コード例 #1
0
 private Locateable AsLocateable(Ham.SpatialBase.Point webMercatorPoint, Color color)
 {
     return(new Locateable(MapProjects.WebMercatorToGeodeticWgs84(webMercatorPoint))
     {
         Element = new Circle(1, new SolidColorBrush(color))
     });
 }
コード例 #2
0
        public CoordinateMarker(double mercatorX, double mercatorY, bool changeToDms = false)
        {
            InitializeComponent();

            this._current = coordinates.Geodetic;

            this.ChangeToDms = changeToDms;

            this.MercatorLocation = new IRI.Ham.SpatialBase.Point(mercatorX, mercatorY);

            //this.X = mercatorX;

            //this.Y = mercatorY;
        }
コード例 #3
0
        private Ham.SpatialBase.Point FromWebMercator(Ham.SpatialBase.Point webMercatorPoint)
        {
            var geodetic = IRI.Ham.CoordinateSystem.MapProjection.MapProjects.WebMercatorToGeodeticWgs84(webMercatorPoint);

            if (IsUTMEditingMode)
            {
                this.CurrentEditingZone = IRI.Ham.CoordinateSystem.MapProjection.MapProjects.FindZone(geodetic.X);

                return(IRI.Ham.CoordinateSystem.MapProjection.MapProjects.GeodeticToUTM(geodetic));
            }
            else if (IsGeodeticWgs84EditingMode)
            {
                return(geodetic);
            }
            else
            {
                throw new NotImplementedException();
            }
        }
コード例 #4
0
        private void Add(Locateable mainLocateable)
        {
            var index = _mainLocateables.IndexOf(mainLocateable);

            if (index == 0)
            {
                return;
            }

            var point = new Ham.SpatialBase.Point((mainLocateable.X + _mainLocateables[index - 1].X) / 2.0, (mainLocateable.Y + _mainLocateables[index - 1].Y) / 2.0);

            var newMainLocateable = AsLocateable(point, Colors.Green);

            newMainLocateable.OnPositionChanged += mainLocateable_OnPositionChanged;

            newMainLocateable.Element.MouseRightButtonDown += (sender, e) =>
            {
                mainElement_MouseRightButtonDown(newMainLocateable, e);
            };

            var newControl1 = AsLocateable(point, Colors.Gray);

            newControl1.OnPositionChanged += controlLocateable_OnPositionChanged;

            var newControl2 = AsLocateable(point, Colors.Gray);

            newControl2.OnPositionChanged += controlLocateable_OnPositionChanged;

            _mainLocateables.Insert(index, newMainLocateable);

            mercatorPolyline.Insert(index, point);

            _controlLocateables.Insert(2 * index - 1, newControl2);

            _controlLocateables.Insert(2 * index - 1, newControl1);

            Refresh();
        }
コード例 #5
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void ZoomToGoogleScale(int googleScale, Ham.SpatialBase.Point center)
 {
     this.RequestZoomToGoogleScale?.Invoke(center, googleScale);
 }
コード例 #6
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void Zoom(double mapScale, Ham.SpatialBase.Point center)
 {
     this.RequestZoomToPoint?.Invoke(center, mapScale);
 }
コード例 #7
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void ZoomToLevelAndCenter(int zoomLevel, Ham.SpatialBase.Point centerMapPoint, Action callback = null, bool withAnimation = true)
 {
     this.RequestZoomToLevelAndCenter?.Invoke(zoomLevel, centerMapPoint, callback, withAnimation);
 }
コード例 #8
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void PanTo(Ham.SpatialBase.Point point, Action callback)
 {
     this.RequestPanTo?.Invoke(point, callback);
 }
コード例 #9
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void FlashPoint(Ham.SpatialBase.Point point)
 {
     this.RequestFlashPoint?.Invoke(point);
 }
コード例 #10
0
ファイル: MapPresenter.cs プロジェクト: MohammadUT/IRI.Japey
 public void UpdateCurrentEditingPoint(Ham.SpatialBase.Point webMercatorPoint)
 {
     MapPanel.UpdateCurrentEditingPoint(webMercatorPoint);
 }