[mapguide-commits] r6824 - branches/2.4/MgDev/Desktop/MapViewer
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Jun 27 05:01:50 PDT 2012
Author: jng
Date: 2012-06-27 05:01:50 -0700 (Wed, 27 Jun 2012)
New Revision: 6824
Modified:
branches/2.4/MgDev/Desktop/MapViewer/IMapViewer.cs
branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs
Log:
mg-desktop: Small cleanup and expose the new public properties in the IMapViewer interface
Modified: branches/2.4/MgDev/Desktop/MapViewer/IMapViewer.cs
===================================================================
--- branches/2.4/MgDev/Desktop/MapViewer/IMapViewer.cs 2012-06-27 11:51:39 UTC (rev 6823)
+++ branches/2.4/MgDev/Desktop/MapViewer/IMapViewer.cs 2012-06-27 12:01:50 UTC (rev 6824)
@@ -140,6 +140,21 @@
MgMapViewerProvider GetProvider();
/// <summary>
+ /// Gets or sets the minimum allowed zoom scale for this viewer
+ /// </summary>
+ int MinScale { get; set; }
+
+ /// <summary>
+ /// Gets or sets the maximum allowed zoom scale for this viewer
+ /// </summary>
+ int MaxScale { get; set; }
+
+ /// <summary>
+ /// The amount of time (in ms) to wait to re-render after a mouse wheel scroll
+ /// </summary>
+ int MouseWheelDelayRenderInterval { get; set; }
+
+ /// <summary>
/// Gets or sets the factor by which to multiply the scale to zoom in
/// </summary>
double ZoomInFactor { get; set; }
Modified: branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs
===================================================================
--- branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs 2012-06-27 11:51:39 UTC (rev 6823)
+++ branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs 2012-06-27 12:01:50 UTC (rev 6824)
@@ -1139,7 +1139,7 @@
private double CalculateScale(double mcsW, double mcsH, int devW, int devH)
{
var mpu = this.MetersPerUnit;
- var mpp = 0.0254 / _map.DisplayDpi;
+ var mpp = GetMetersPerPixel(_map.DisplayDpi);
if (devH * mcsW > devW * mcsH)
return mcsW * mpu / (devW * mpp); //width-limited
else
@@ -1575,7 +1575,7 @@
//Update current extents
double mpu = this.MetersPerUnit;
double scale = _map.ViewScale;
- double mpp = 0.0254 / _map.DisplayDpi;
+ double mpp = GetMetersPerPixel(_map.DisplayDpi);
var pt = _map.ViewCenter;
var coord = pt.Coordinate;
@@ -2412,7 +2412,8 @@
private void ResetMouseWheelPaintTransforms()
{
- delayRenderTimer.Stop();
+ if (delayRenderTimer != null)
+ delayRenderTimer.Stop();
mouseWheelSx = null;
mouseWheelSy = null;
mouseWheelTx = null;
More information about the mapguide-commits
mailing list