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); }
public void ZoomOut() { if (ZoomLocked) { return; } if (!_viewportInitialized) { return; } Map.Viewport.Resolution = ZoomHelper.ZoomOut(_map.Resolutions, Map.Viewport.Resolution); OnViewChanged(); }
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); }