| MGMap.viewDistanceEx |
|
boolean viewDistanceEx(MGPoint startPt, String units, boolean useMcs)
Enters View Distance mode and fires the onViewedDistanceEx event when complete.
When viewDistanceEx is invoked, the cursor changes, allowing the user to view distances by clicking points on the map. When the user exits View Distance mode, the onViewedDistanceEx event is fired. This method is similar to viewDistance, but it differs by beginning its measurement from startPt, instead of from a user-specified point.
Note that this method does not work during a busy state. For additional information about the busy state, refer to "Handling Busy State and Map Refresh" chapter in the Autodesk MapGuide Developer's Guide.
startPt - An MGPoint object consisting of MCS coordinates representing an optional starting point for the view distance command. This starting point is not necessarily in the current view.
units - The units used to quantify the distance. The following values are possible: CM (centimeters), M (meters), KM (kilometers), IN (inches), FT (feet), MI (miles), "" or null. "" and null use the current default units. Note that null does not work with the ActiveX Control.
useMcs - Specifies the coordinate system of the start point and the points returned by onViewedDistanceEx. True if MCS is to be used; False if lat\lon is to be used.
boolean - Returns True if successful; otherwise, returns False.
-1 (busy)
-3 (illegal argument)
setViewDistanceExObserver, getViewDistanceExObserver