// Summary:
        //     Hit test by screen point
        public async Task <DGObject> hitTestAsync(
            System.Windows.Point screenPoint,
            Esri.ArcGISRuntime.Controls.MapView mapView)
        {
            Graphic g = await HitTestAsync(mapView, screenPoint);

            DGObject obj = getObject(g as IGraphic);

            return(obj);
        }
        public GotoXYToolController(MapView mapView, MapViewModel mapViewModel)
        {
            _mapView = mapView;

            _gotoXyToolView = new GotoXYToolView { ViewModel = { mapView = mapView } };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                _gotoXyToolView.Owner = owner;
            }

            Mediator.Register(Constants.ACTION_GOTO_XY_COORDINATES, OnGotoXYCoordinates);
        }
        public BasemapGalleryController(MapView mapView)
        {
            _mapView = mapView;

            _basemapGalleryView = new BasemapGalleryView { ViewModel = { mapView = mapView } };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                _basemapGalleryView.Owner = owner;
            }

            InitializeArcGISPortal();

            Mediator.Register(Constants.ACTION_UPDATE_BASEMAP, DoUpdateBasemap);
        }
Пример #4
0
        public GotoXYToolController(MapView mapView, MapViewModel mapViewModel)
        {
            _mapView = mapView;

            _gotoXyToolView = new GotoXYToolView {
                ViewModel = { mapView = mapView }
            };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                _gotoXyToolView.Owner = owner;
            }

            Mediator.Register(Constants.ACTION_GOTO_XY_COORDINATES, OnGotoXYCoordinates);
        }
        // Summary:
        //     Select objects by point
        // Remarks:
        //     The function selects graphics at first,
        //     then it returns the corresponding DGObject.
        //     If a graphic has no corresponding DGObject, it will
        //     still be in a selected state.
        //     The selected object will be highlighted.
        public async Task <DGObject> selectObjectByPoint(
            System.Windows.Point screenPoint,
            Esri.ArcGISRuntime.Controls.MapView mapView)
        {
            Graphic g = await HitTestAsync(mapView, screenPoint);

            if (g != null)
            {
                g.IsSelected = true;
            }
            DGObject obj = getObject(g as IGraphic);

            if (obj != null)
            {
                highlightObject(obj, true);
            }
            return(obj);
        }
        public GotoXYToolController(MapView mapView, MapViewModel mapViewModel)
        {
            _mapView = mapView;

            _gotoXyToolView = new GotoXYToolView {PlacementTarget = mapView, ViewModel = {mapView = mapView}};

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                owner.LocationChanged += (sender, e) =>
                    {
                        _gotoXyToolView.HorizontalOffset += 1;
                        _gotoXyToolView.HorizontalOffset -= 1;
                    };
            }

            Mediator.Register(Constants.ACTION_GOTO_XY_COORDINATES, OnGotoXYCoordinates);
        }
Пример #7
0
        public BasemapGalleryController(MapView mapView)
        {
            _mapView = mapView;

            _basemapGalleryView = new BasemapGalleryView {
                ViewModel = { mapView = mapView }
            };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                _basemapGalleryView.Owner = owner;
            }

            InitializeArcGISPortal();

            Mediator.Register(Constants.ACTION_UPDATE_BASEMAP, DoUpdateBasemap);
        }
Пример #8
0
        public GotoXYToolController(MapView mapView, MapViewModel mapViewModel)
        {
            _mapView = mapView;

            _gotoXyToolView = new GotoXYToolView {
                PlacementTarget = mapView, ViewModel = { mapView = mapView }
            };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                owner.LocationChanged += (sender, e) =>
                {
                    _gotoXyToolView.HorizontalOffset += 1;
                    _gotoXyToolView.HorizontalOffset -= 1;
                };
            }

            Mediator.Register(Constants.ACTION_GOTO_XY_COORDINATES, OnGotoXYCoordinates);
        }
        public BasemapGalleryController(MapView mapView)
        {
            _mapView = mapView;

            _basemapGalleryView = new BasemapGalleryView { PlacementTarget = mapView, ViewModel = { mapView = mapView } };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                owner.LocationChanged += (sender, e) =>
                {
                    _basemapGalleryView.HorizontalOffset += 1;
                    _basemapGalleryView.HorizontalOffset -= 1;
                };
            }

            InitializeArcGISPortal();

            Mediator.Register(Constants.ACTION_UPDATE_BASEMAP, DoUpdateBasemap);
        }
Пример #10
0
        public BasemapGalleryController(MapView mapView)
        {
            _mapView = mapView;

            _basemapGalleryView = new BasemapGalleryView {
                PlacementTarget = mapView, ViewModel = { mapView = mapView }
            };

            var owner = Window.GetWindow(mapView);

            if (owner != null)
            {
                owner.LocationChanged += (sender, e) =>
                {
                    _basemapGalleryView.HorizontalOffset += 1;
                    _basemapGalleryView.HorizontalOffset -= 1;
                };
            }

            InitializeArcGISPortal();

            Mediator.Register(Constants.ACTION_UPDATE_BASEMAP, DoUpdateBasemap);
        }