MGMap.viewDistance   Go to object model Go to parent topic Go to previous topic Go to next topic
boolean viewDistance(String units)

Description

Enters View Distance mode and fires the onViewedDistance event when complete.

When viewDistance 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 onViewedDistance event is fired. This method is the equivalent of the View > Distance menu command in the user interface.

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.

Parameters

units - The units used to quantify the distance. The following values are possible: CM, M;, KM, IN, FT, MI, "" or null. "" and null do not work with the ActiveX Control. "" and null use the current default units.

Returns

boolean - Returns True if successful; otherwise, returns False.

Error Codes

-1 (busy)

-3 (illegal argument)

See Also

setViewDistanceObserver, getViewDistanceObserver