示例#1
0
 private double DetermineNewResolution(int mouseWheelDelta, double currentResolution)
 {
     if (mouseWheelDelta > 0)
     {
         return(ZoomHelper.ZoomIn(_map.Resolutions, currentResolution));
     }
     if (mouseWheelDelta < 0)
     {
         return(ZoomHelper.ZoomOut(_map.Resolutions, currentResolution));
     }
     return(currentResolution);
 }
示例#2
0
        public void ZoomOut()
        {
            if (ZoomLocked)
            {
                return;
            }
            if (!_viewportInitialized)
            {
                return;
            }

            Map.Viewport.Resolution = ZoomHelper.ZoomOut(_map.Resolutions, Map.Viewport.Resolution);

            OnViewChanged();
        }
示例#3
0
        private double DetermineNewResolution(int mouseWheelDelta, double currentResolution)
        {
            if (mouseWheelDelta > 0)
            {
                var resolution = ZoomHelper.ZoomIn(_map.Resolutions, currentResolution);

                return(ViewportLimiter.LimitResolution(resolution, Viewport.Width, Viewport.Height,
                                                       _map.Limits.ZoomMode, _map.Limits.ZoomLimits, _map.Resolutions, _map.Envelope));
            }
            if (mouseWheelDelta < 0)
            {
                var resolution = ZoomHelper.ZoomOut(_map.Resolutions, currentResolution);

                return(ViewportLimiter.LimitResolution(resolution, Viewport.Width, Viewport.Height,
                                                       _map.Limits.ZoomMode, _map.Limits.ZoomLimits, _map.Resolutions, _map.Envelope));
            }
            return(currentResolution);
        }