MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This method will update the CurrentExtent by using the ZoomIntoCenter operation.</summary>
/// <overloads>
/// This overload allows you to pass in the height and width in screen coordinates,
/// as well as a world point.
/// </overloads>
/// <returns>None.</returns>
/// <remarks>
/// The CurrentExtent will be adjusted for the ratio of the screen. You
/// do not need to call GetDrawingExtent afterwards.
/// </remarks>
/// <param name="percentage">This parameter is the percentage by which you want to zoom in.</param>
/// <param name="worldPoint">This parameter is the world point you want the extent to be centered on.</param>
/// <param name="screenWidth">This parameter is the width in screen coordinates.</param>
/// <param name="screenHeight">This parameter is the height in screen coordinates.</param>
This method will update the CurrentExtent by using the ZoomIntoCenter operation.
This method will update the CurrentExtent by using the ZoomIntoCenter operation .
public void ZoomIntoCenter(int percentage, PointShape worldPoint, float screenWidth, float screenHeight)
        {
            ValidatorHelper.CheckInputValueIsInRange(percentage, "percentage", 0, RangeCheckingInclusion.ExcludeValue, 100, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckObjectIsNotNull(worldPoint, "worldPoint");
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckExtentIsValid(currentExtent, "currentExtent");
            currentExtent = ZoomIntoCenter(currentExtent, percentage, worldPoint, screenWidth, screenHeight);
        }
public void ZoomIntoCenter ( int percentage , PointShape worldPoint , float screenWidth , float screenHeight ) { ValidatorHelper . CheckInputValueIsInRange ( percentage , " " , 0 , RangeCheckingInclusion . ExcludeValue , 100 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckObjectIsNotNull ( worldPoint , " " ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckExtentIsValid ( currentExtent , " " ) ; currentExtent = ZoomIntoCenter ( currentExtent , percentage , worldPoint , screenWidth , screenHeight ) ; }
This method will update the CurrentExtent by using the ZoomIntoCenter operation.
This method will update the CurrentExtent by using the ZoomIntoCenter operation .
None
percentage
int
This parameter is the percentage by which you want to zoom in.
This parameter is the percentage by which you want to zoom in .
worldPoint
PointShape
This parameter is the world point you want the extent to be centered on.
This parameter is the world point you want the extent to be centered on .
screenWidth
float
This parameter is the width in screen coordinates.
This parameter is the width in screen coordinates .
screenHeight
float
This parameter is the height in screen coordinates.
This parameter is the height in screen coordinates .
overloads
This overload allows you to pass in the height and width in screen coordinates,
as well as a world point.
This overload allows you to pass in the height and width in screen coordinates as well as a world point .
remarks
The CurrentExtent will be adjusted for the ratio of the screen. You
do not need to call GetDrawingExtent afterwards.
The CurrentExtent will be adjusted for the ratio of the screen . You do not need to call GetDrawingExtent afterwards .