Esempio n. 1
0
        private void mapControl1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            MapControl mapControl = sender as MapControl;
            MapHitInfo hitInfo    = mapControl.CalcHitInfo(e.Location);

            XtraMessageBox.Show(String.Format("hitInfo.InMapPolygon = {0}", hitInfo.InMapPolygon));
        }
Esempio n. 2
0
        void Default_DragDrop(object sender, PhotoDragDropEventArgs e)
        {
            if (e.Control != MapControl)
            {
                return;
            }
            MapHitInfo hitInfo = MapControl.CalcHitInfo(e.Location);
            GeoPoint   point   = (GeoPoint)MapControl.ScreenPointToCoordPoint(hitInfo.HitPoint);

            HitPoint = point;
            SplashScreenManager.ShowForm(FindForm(), typeof(WaitForm), true, true);
            SplashScreenManager.Default.SendCommand(DmWaitFormCommand.SetCaption, "Map");
            SplashScreenManager.Default.SendCommand(DmWaitFormCommand.SetDescription, "Retreiving geo location info ...");
            SplashScreenManager.Default.SendCommand(DmWaitFormCommand.SetUndefined, true);
            GeoCode.RequestLocationInformation(point, PhotoDragDpopHelper.Default.Photos);
        }
Esempio n. 3
0
        private void mapControl1_Click(object sender, EventArgs e)
        {
            MapHitInfo hitInfo = MapControl.CalcHitInfo(PointToClient(Control.MousePosition));

            if (hitInfo.HitObjects == null || hitInfo.HitObjects.Length == 0 || !(hitInfo.HitObjects[0] is PhotoMapItem))
            {
                HidePopupViewer(false);
            }
            else
            {
                HidePopupViewer(true);
                PhotoMapItem item  = ((PhotoMapItem)hitInfo.HitObjects[0]);
                MapPoint     point = MapControl.CoordPointToScreenPoint(item.Location);
                PopupViewer.Files = item.Files;
                this.flyoutPanel1.ShowBeakForm(MapControl.PointToScreen(new Point((int)point.X, (int)point.Y)), false, this, new Point(0, 40));
                PopupViewer.Focus();
            }
        }