Пример #1
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();
            }
        }
 private MapPoint GetLocation(MapControl map, DmFile file)
 {
     return(map.CoordPointToScreenPoint(new GeoPoint(file.Latitude, file.Longitude)));
 }