Ejemplo n.º 1
0
        public static Task Offset(this ILocator locator, double dx, double dy)
        {
            var center = locator.MapToScreen(locator.Center.Lon, locator.Center.Lat);

            center.Offset(-dx, -dy);

            var newCenter = locator.ScreenToMap(center.X, center.Y);

            return(locator.Locate(locator.Scale, newCenter));
        }
Ejemplo n.º 2
0
        public bool RevisePointData(PointD position, int index)
        {
            if (!IsEffectedSelectedIndex(index))
            {
                return(false);
            }
            Point point        = _locator.MapToScreen(position.X, position.Y);
            var   lastPosition = _mapPoints[index];

            _mapPoints[index]      = position;
            RadarArea.Polygon      = _mapPoints.ToArray();
            _polygon.Points[index] = point;
            drawEllipse(_ellipses[index], point);
            updateBorder(position.X, position.Y);
            if (needUpdateBorder(lastPosition.X, lastPosition.Y))
            {
                updateAllBorder();
            }
            return(true);
        }