MapSuiteGisEditor/WpfDesktopExtension/Shares/MapEngine.cs
/// <summary>This method returns the distance in world units between two screen points by using the CurrentExtent as a reference.</summary>
/// <overloads>This overload allows you to pass in ScreenPointF as the points.</overloads>
/// <returns>This method returns the distance in world units between two screen points.</returns>
/// <remarks>None</remarks>
/// <param name="screenPoint1">This is the screen point you want to measure from.</param>
/// <param name="screenPoint2">This is the screen point you want to measure to.</param>
/// <param name="screenWidth">This parameter is the width of the screen.</param>
/// <param name="screenHeight">This parameter is the height of the screen.</param>
/// <param name="mapUnit">This parameter specifies the MapUnit used in the current map.</param>
/// <param name="distanceUnit">This is the geographic unit you want the result to show in.</param>
This method returns the distance in world units between two screen points by using the CurrentExtent as a reference.
This method returns the distance in world units between two screen points by using the CurrentExtent as a reference .
public double GetWorldDistanceBetweenTwoScreenPoints(ScreenPointF screenPoint1, ScreenPointF screenPoint2, float screenWidth, float screenHeight, GeographyUnit mapUnit, DistanceUnit distanceUnit)
        {
            ValidatorHelper.CheckInputValueIsLargerThan(screenWidth, "screenWidth", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckInputValueIsLargerThan(screenHeight, "screenHeight", 0, RangeCheckingInclusion.ExcludeValue);
            ValidatorHelper.CheckGeographyUnitIsValid(mapUnit, "mapUnit");
            ValidatorHelper.CheckDistanceUnitIsValid(distanceUnit, "distanceUnit");
            ValidatorHelper.CheckExtentIsValid(currentExtent, "currentExtent");
            return GetWorldDistanceBetweenTwoScreenPoints(currentExtent, screenPoint1, screenPoint2, screenWidth, screenHeight, mapUnit, distanceUnit);
        }
public double GetWorldDistanceBetweenTwoScreenPoints ( ScreenPointF screenPoint1 , ScreenPointF screenPoint2 , float screenWidth , float screenHeight , GeographyUnit mapUnit , DistanceUnit distanceUnit ) { ValidatorHelper . CheckInputValueIsLargerThan ( screenWidth , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckInputValueIsLargerThan ( screenHeight , " " , 0 , RangeCheckingInclusion . ExcludeValue ) ; ValidatorHelper . CheckGeographyUnitIsValid ( mapUnit , " " ) ; ValidatorHelper . CheckDistanceUnitIsValid ( distanceUnit , " " ) ; ValidatorHelper . CheckExtentIsValid ( currentExtent , " " ) ; return GetWorldDistanceBetweenTwoScreenPoints ( currentExtent , screenPoint1 , screenPoint2 , screenWidth , screenHeight , mapUnit , distanceUnit ) ; }
This method returns the distance in world units between two screen points by using the CurrentExtent as a reference.
This method returns the distance in world units between two screen points by using the CurrentExtent as a reference .
This method returns the distance in world units between two screen points.
This method returns the distance in world units between two screen points .
screenPoint1
ScreenPointF
This is the screen point you want to measure from.
This is the screen point you want to measure from .
screenPoint2
ScreenPointF
This is the screen point you want to measure to.
This is the screen point you want to measure to .
screenWidth
float
This parameter is the width of the screen.
This parameter is the width of the screen .
screenHeight
float
This parameter is the height of the screen.
This parameter is the height of the screen .
mapUnit
GeographyUnit
This parameter specifies the MapUnit used in the current map.
This parameter specifies the MapUnit used in the current map .
distanceUnit
DistanceUnit
This is the geographic unit you want the result to show in.
This is the geographic unit you want the result to show in .
overloads
This overload allows you to pass in ScreenPointF as the points.
This overload allows you to pass in ScreenPointF as the points .
remarks
None