MGMap.zoomGotoLocation   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

boolean zoomGotoLocation(String category, String location, double scale)

Description

Zooms to the specified category, location, and scale.

This method overrides the autoRefresh flag and always refreshes the map. Subsequent method calls adhere to the original setting of the autoRefresh flag.

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" in the Autodesk MapGuide Developer's Guide.. Also note that zoomGotoLocation does not work when called from event-handling code for onViewChanging or onMapLoaded. If you call zoomGotoLocation from these events, the method will fail and will set the error code to -14 (refresh disabled).

Parameters

category - Category to zoom to.

location - Location to zoom to.

scale - Map scale factor to zoom to if the feature is a point. If the feature is not a point, the map will zoom to the extents of the feature.

Returns

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

Error Codes

-1 (busy)

-3 (illegal argument)

-14 (refresh disabled)

See Also

zoomGotoDlg