| MGMap.setWidth |
|
void setWidth(double width, String units)
Sets the current width of the map in the specified unit of measure.
The map will refresh centered at the same position but will display at the new width.
This method always refreshes the map when the autoRefresh flag is set to True or when called from the onViewChanging or onMapLoaded events.
Note that this method does not work during a busy state. Also, note that because of the floating-point calculation inaccuracy in operating systems, if you set the width of the map using setWidth before calling getWidth, the value returned by getWidth may be inaccurate, especially if the width is set to a very high number.
width - New width of the map. The value must be greater than 0.
units - One of MI, FT, KM, M, "" or null. "" and null only work with the Autodesk MapGuide Viewer Plug-In and the Autodesk MapGuide Viewer, Java Edition. They use the current default units.
-1 (busy)
-3 (illegal argument)