| MGMap Object |
|
MGMap is the top-level object of the API for the Autodesk MapGuide ActiveX Control, Plug-In, and Java Edition. For the ActiveX Control, MGMap is a COM interface.
Java Development for Autodesk MapGuide Viewer Plug-In: For Autodesk MapGuide Viewer Plug-In, MGMap is a concrete class that resides in the mapguide package, located in the npmapv32.zip file in the Netscape Plugins folder.
Java Development for Autodesk MapGuide Viewer, Java Edition: For Autodesk MapGuide Viewer, Java Edition, MGMap is a Java interface that resides in the com.autodesk.mgjava package, which is located in the mgjava.cab file (for Windows systems only) and the mgjava.jar file (for all platforms). MGMap is implemented by the concrete classes MGMapApplet and MGMapComponent.
The following is an example of accessing an MGMap object. If your embedded map has the name myMap, the code to access it in a simple, frameless HTML page will look something like this:
// name is "getMap()", but it can be anything you like
function getMap()
{
if (navigator.appName() == "Netscape")
return document.myMap; // access map with Navigator
else
return window.myMap; // access map with IE
}
If your application has multiple frames, the code to access the map in a frame called "Left" will look something like this:
{
if (navigator.appName() == "Netscape")
return parent.Left.document.myMap;
else
return parent.Left.myMap;
}
|
Displays the Autodesk MapGuide About dialog box, which shows information about Autodesk MapGuide Viewer. |
|
|
Downloads and adds the specified Map Layer File (.mlf) to the map. |
|
|
Downloads and adds the specified Map Layer Files to the map. |
|
|
Copies the current view of the map to the clipboard as an Enhanced Windows Metafile. |
|
|
Copies the URL of the displayed map to the clipboard. |
|
|
Adds a layer of the specified type to the map. |
|
|
Creates a new map layer group and adds it to the map. |
|
|
Creates and returns an object of the specified type. |
|
|
Enables the user to define a circle on the map by clicking and dragging the mouse. |
|
|
Enables the user to draw a line on the map by clicking and dragging the mouse. |
|
|
Enables the user to define a point on the map by clicking the mouse. |
|
|
Enables the user to use the mouse to define a polygon on the map, then fires the event onDigitizedPolygon upon completion. |
|
|
Enables the user to use the mouse to define a polygon on the map, then fires the event onDigitizedPolygon upon completion. |
|
|
Enables a user to use the mouse to define a polyline on the map, then fires the event onDigitizedPolyline upon completion. |
|
|
Enables a user to use the mouse to define a polyline on the map, then fires the event onDigitizedPolyline upon completion. |
|
|
Enables the user to define a rectangle on the map by clicking and dragging the mouse, then fires the onDigitizedRectangle event upon completion. |
|
|
Disables Autodesk MapGuide Viewer from throwing exceptions. |
|
|
Disables the Autodesk MapGuide Viewer from sending printing events to the associated event handler during a print process. |
|
|
Disables the firing of the onSelectionChanged event during calls to the MGMapLayer methods removeObject, removeObjects, and removeAllObjects. |
|
|
Enables Autodesk MapGuide Viewer exception throwing. |
|
|
Enables the Autodesk MapGuide Viewer to send printing events to the associated event handler during a print process. |
|
|
Enables the firing of the onSelectionChanged event during calls to the MGMapLayer methods removeObject, removeObjects, and removeAllObjects. |
|
|
Gets the Autodesk MapGuide Viewer API version. |
|
|
Gets the number of seconds before the next HTML page associated with a map feature from the AutoLinkLayer will be displayed in the AutoLinkTarget window. |
|
|
Gets the name of the layer that uses the AutoLink feature. |
|
|
Gets the name of the target window where Autodesk MapGuide will display the HTML pages associated with map features on the AutoLinkLayer. |
|
|
Returns a boolean value that indicates whether or not the automatic refresh feature is enabled. |
|
|
Gets an object that contains buffering properties, such as the distance from the selected features to draw the buffers. |
|
|
Returns a reference to the Java object that observes busy state change events, or null if no observer has been established. |
|
|
Gets the name of the default target window where Autodesk MapGuide will display HTML documents, including autolinks, errors, feature links, reports, and URL lists. |
|
|
Gets the current type of display units being used to display the map width, as seen in the status bar. |
|
|
Returns a reference to the Java object being used to observe double-click events, or null if no observer has been established. |
|
|
Gets the name of the target window where Autodesk MapGuide will display error messages. |
|
|
Gets the height of the map. |
|
|
|
|
|
Returns a reference to the MGError object of the most recent Autodesk MapGuide Viewer API method call or property access. |
|
|
Gets the latitude (Y) value in decimal degrees of the center of the map area currently displayed. |
|
|
Gets the longitude (X) value in decimal degrees of the center of the map area currently displayed. |
|
|
Gets the extents for the map or current map view. |
|
|
Gets the specified map layer. |
|
|
Gets the specified map layer group. |
|
|
Gets an MGCollection object containing all the map layer groups defined in the map. |
|
|
Returns a Vector (or MGCollection) object containing all the map layers defined in the map. |
|
|
Gets an MGCollection object containing all the map layers defined in the map. |
|
|
Returns a reference to an MGMapLoadedObserver object or null if no observer has been established. |
|
|
Gets the conversion factor to convert from the current Mapping Coordinate System (MCS) to meters. |
|
|
|
|
|
Gets the name of the map, as set in the Preferences dialog box in Autodesk MapGuide Author, or with setName. |
|
|
Gets the name of the target window where Autodesk MapGuide will display the URL associated with a map feature. |
|
|
Gets an object containing properties used by Autodesk MapGuide to print maps. |
|
|
Returns a reference to the Java object being used to observe printing events. |
|
|
Gets an object containing all properties for drawing redline features. |
|
|
Gets the name of the target window where Autodesk MapGuide will display reports from View Reports command. |
|
|
Gets the current map display scale in terms of 1:scale. |
|
|
Gets the currently selected map features. |
|
|
Returns a reference to the Java object being used to observe selection change events, or null if no observer has been established. |
|
|
Gets the selection mode, which controls how map features are selected when a feature is not fully contained in the selection area. |
|
|
Gets a collection of strings representing the symbols available for use as symbol attributes. |
|
|
Gets the customer tracking ID associated with a map. |
|
|
Gets the current units that will be used when getting or setting the MapWidth property, or when using getWidth or setWidth without specifying the Units parameter. |
|
|
Gets the URL of the map that is currently displayed by Autodesk MapGuide Viewer. |
|
|
Returns True if Autodesk MapGuide will generate an HTML document that lists the names and URLs associated with a map feature as the user pauses the mouse pointer over that feature. |
|
|
Gets the name of the target window where Autodesk MapGuide will display the names and URLs associated with a map feature as the user pauses the mouse pointer over that feature. |
|
|
Gets the version string of the Autodesk MapGuide Viewer. |
|
|
Returns a reference to the Java object being used to observe view change events, or null if no observer has been established. |
|
|
Returns a reference to the Java object that observes when a map is about to be refreshed, or null if no such observer has been established. |
|
|
Returns a reference to the Java object that observes view distance events, or null if no such observer has been established. |
|
|
Returns a reference to the Java object that observes view distance events, or null if no such observer has been established. |
|
|
Returns a string indicating whether the current Autodesk MapGuide Viewer is the ActiveX Control, Java Edition, or the Autodesk MapGuide Viewer Plug-In. |
|
|
Gets the current width of the map in the specified unit of measure. |
|
|
Returns True if Autodesk MapGuide Viewer is busy loading or drawing the map. |
|
|
Converts the specified lat/lon coordinate pair to a point using the map coordinate system (MCS) defined for the MWF by the map author. |
|
|
Converts the specified Mapping Coordinate System (MCS) coordinate pair to lat/lon coordinates. |
|
|
Displays the Page Setup dialog box, where the user can specify preferences for printing the map. |
|
|
Switches to Pan mode. |
|
|
Displays the Preferences dialog box, where the user can specify the map units, selection mode, and options for the status bar. |
|
|
Uses the page setup properties, then displays the Print dialog box. |
|
|
Redraws the specified portion of the map. |
|
|
Redraws the map legend. |
|
|
Refreshes (redraws) the map. |
|
|
Removes the specified map layer from the map. |
|
|
Removes the specified map layer group from the map. |
|
|
Saves the map to a local MWF. |
|
|
Displays the Select Map Features dialog box, where the user can select map features by name from a specific map layer. |
|
|
Switches to Select mode. |
|
|
Selects all map features that fall within the specified polygon. |
|
|
Selects all map features that fall within the specified polygon. |
|
|
Enters the select polygon mode. |
|
|
Selects all map features that fall within the specified radius. |
|
|
Selects Select Radius mode. |
|
|
Selects features from the specified map layers that fall within the currently selected polygon map features. |
|
|
Displays the Select Within dialog box, where the user chooses the map layer containing the features that will be selected if they fall within the currently selected features. |
|
|
Sets the number of seconds before the next HTML page associated with a map feature from the AutoLinkLayer will be displayed in the AutoLinkTarget window. |
|
|
Sets the name of the layer that will use the AutoLink feature. |
|
|
Sets the name of the target window where Autodesk MapGuide will display the HTML pages associated with map features on the AutoLinkLayer. |
|
|
Enables or disables the automatic refresh flag. |
|
|
Activates the Java object that observes the Autodesk MapGuide Viewer busy state. |
|
|
Sets the name of the default target window where Autodesk MapGuide will display HTML documents. |
|
|
Sets the Java object for observing double-click events. |
|
|
Sets the name of the target window where Autodesk MapGuide will display error messages. |
|
|
|
|
|
Activates the Java object that observes when Autodesk MapGuide loads MWFs, enabling the onMapLoaded event. |
|
|
Sets the name of the current map. |
|
|
Sets the name of the target window where Autodesk MapGuide will display the URL associated with a map feature. |
|
|
Sets the Java object that observes printing events. |
|
|
Sets the name of the target window where Autodesk MapGuide will display reports from View Reports command. |
|
|
Sets the current map display scale in terms of 1:scale. |
|
|
Sets the Java object for observing selection change events. |
|
|
Sets the selection mode, which controls how map features are selected when a feature is not fully contained in the selection area. |
|
|
Sets the customer tracking ID associated with a map. |
|
|
Sets the URL of the map to display. |
|
|
Enables or disables automatic generation of an HTML document listing the names and URLs of map features associated with URLs. |
|
|
Sets the name of the target window where Autodesk MapGuide will display the names and URLs associated with a map feature as the user pauses the mouse pointer over that feature. |
|
|
Sets the Java object for observing view change events. |
|
|
Sets the Java object for observing view change events. |
|
|
Sets the Java object for observing view distance events. |
|
|
Sets the Java object for view distance events. |
|
|
Sets the current width of the map in the specified unit of measure. |
|
|
Aborts any downloading or redrawing that is currently taking place. Used for ActiveX Control and Plug-In Viewers only. |
|
|
Aborts any downloading or redrawing that is currently taking place. Used for Java Edition only. |
|
|
Creates buffers around the selected map features. |
|
|
Displays the View Buffer dialog box, where the user specifies the settings for creating the buffers. |
|
|
Enters View Distance mode and fires the onViewedDistance event when complete. |
|
|
Enters View Distance mode and fires the onViewedDistanceEx event when complete. |
|
|
Invokes the specified report as authored in the map window. |
|
|
Displays the View Reports dialog box, where the user selects the report to display. |
|
|
Displays the Zoom Goto dialog box, where the user specifies the zoom width as well as either a place (location), an address, or a ZIP code to zoom to. |
|
|
Zooms to the specified category, location, and scale. |
|
|
Enters ZoomIn mode. |
|
|
Zooms to the full extent of the map window as defined in the map window properties. |
|
|
Enters the ZoomOut mode. |
|
|
Sets the current view of the map back to the previous view of the map. |
|
|
Zooms to the specified map center (lat/lon) and scale. |
|
|
Displays the Zoom Scale dialog box, where the user enters the scale to zoom to. |
|
|
Zooms to an extent covering the selected map features. |
|
|
Zooms to the specified map center and width. |
|
|
Displays the Zoom Width dialog box, where the user enters the width of the map window to zoom to. |
Note that direct access to properties is only available in Autodesk MapGuide Viewer ActiveX Control. In Autodesk MapGuide Viewer Plug-In and Autodesk MapGuide Viewer, Java Edition APIs, get/set methods provide access to an object's properties. For compatibility, the ActiveX Control API supports the same get/set methods as the Autodesk MapGuide Viewer Plug-In and the Autodesk MapGuide Viewer, Java Edition APIs.
|
Gets the API version for Autodesk MapGuide ActiveX Control. |
|
|
Gets or sets the number of seconds before the next HTML page associated with a map feature from an AutoLinkLayer will be displayed in the AutoLinkTarget window. |
|
|
Gets or sets the name of the layer that you want to use as the AutoLink layer. |
|
|
Gets or sets the name of the target window where Autodesk MapGuide will display the HTML pages associated with map features on AutoLinkLayers as the user pauses the mouse pointer over those map features. |
|
|
Gets or sets the automatic refresh flag. |
|
|
An object that contains buffering properties, such as the distance from the selected features to the edge of the buffers. |
|
|
True if Autodesk MapGuide Viewer is busy loading or drawing a map. |
|
|
Gets or sets the name of the default target window where Autodesk MapGuide will display HTML documents. |
|
|
Gets the current display units, either M (meters), KM (kilometers), FT (feet), or MI (miles), as seen in the map width on the status bar. |
|
|
Gets or sets the name of the target window where Autodesk MapGuide will display error messages. |
|
|
Gets the full URL of the map that is currently displayed by Autodesk MapGuide, including parameters specifying the current location and any non-default options. |
|
|
|
|
|
The MGError object that contains the error value and message for the most recent API error. |
|
|
Gets or sets the latitude (Y) value in decimal degrees of the center of the map area currently displayed. |
|
|
Gets or sets the width of the legend. In order to change this property at runtime, it must be non-zero when the MGMap object is created. |
|
|
Gets or sets the longitude (X) value in decimal degrees of the center of the map area currently displayed. |
|
|
The height of the map. This value is expressed in the units set with the MapUnits property. |
|
|
A collection containing all the map layer groups defined in the map. |
|
|
A collection containing all the map layers defined in the map. |
|
|
Gets or sets the name of the map. |
|
|
Gets or sets the current map display scale in terms of 1:scale. |
|
|
Gets or sets the current units that will be used when getting or setting the MapWidth property, either M (meters), KM (kilometers), FT (feet), or MI (miles). |
|
|
Gets or sets the current map width. |
|
|
The conversion factor used to convert from the current Mapping Coordinate System (MCS) to meters. |
|
|
|
|
|
Gets or sets the name of the target window where Autodesk MapGuide will display the URL associated with a map feature. |
|
|
An object that contains properties used for printing maps. |
|
|
Gets an object containing all properties for drawing redline features. |
|
|
Gets or sets the name of the target window where Autodesk MapGuide will display reports from View Reports command. |
|
|
The currently selected map features. |
|
|
Gets or sets the selection mode, either Centroid or Intersection. |
|
|
Gets or sets the state of the status bar, either Off or On. |
|
|
Gets a collection of strings representing the symbols available for use as point attributes. |
|
|
Gets or sets the state of the toolbar, either Off, On, or Big. |
|
|
The customer tracking ID associated with a map. |
|
|
Gets or sets the URL of the map that is currently displayed by Autodesk MapGuide. |
|
|
Specifies whether Autodesk MapGuide will generate an HTML document that lists the names and URLs (if any) that are associated with the selected map feature(s). |
|
|
Gets or sets the name of the target window where Autodesk MapGuide will display the names and URLs of map features associated with URLs. |
|
|
The version string of Autodesk MapGuide Viewer. |
|
|
A string indicating whether the Autodesk MapGuide Viewer is the Autodesk MapGuide Viewer ActiveX Control, the Autodesk MapGuide Viewer Plug-In, or the Autodesk MapGuide Viewer, Java Edition. |