-
Autodesk MapGuide ® What’s New in Release 6.
-
Copyright © 2004 Autodesk, Inc. All Rights Reserved This publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. AUTODESK, INC. MAKES NO WARRANTY, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, REGARDING THESE MATERIALS AND MAKES SUCH MATERIALS AVAILABLE SOLELY ON AN “AS-IS” BASIS. IN NO EVENT SHALL AUTODESK, INC.
-
Contents Part 1 Autodesk MapGuide Server and Author Enhancements . . . .1 Chapter 1 Introduction . . . .3 . . . . . . Installation Notes . . . . . . Upgrading From an Earlier Release . Major New Features . . . . . Chapter 2 Improved DWG Support . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Enhancements . . . . . . . Dialog Box Changes: Autodesk MapGuide Server Dialog Box Changes: Autodesk MapGuide Author How Queries Work in Autodesk Map . . . .
-
Using a Custom Spatial Query . . . . . . . . . . . . Sample 1: Running a Custom Query . . . . . . . . . Sample 2: Running a Custom Query Against an OLE Database Accessing the Oracle Linear Referencing System (LRS) . . . Using SQL Pass-Through Statements . . . . . . . . . . Tracking Enhanced Layer Features . . . . . . . . . . . Chapter 5 Oracle Spatial Data Provider Enhancements . Dialog Box Changes . . . . Registry Structure Changes . Manually Editing a UDL File . Chapter 6 . . . . . . . . . . . . .
-
setUrlSource Method . . . . . . . . UrlSource Property . . . . . . . . . getWhereSource Method . . . . . . . setWhereSource Method . . . . . . . WhereSource Property . . . . . . . . getSQLWhereClause Method . . . . . . setSQLWhereClause Method . . . . . . SQLWhereClause Property . . . . . . isLinkedToSecondaryTable Method. . . . LinkedToSecondaryTable Property . . . . getSecondaryDataSource Method . . . . setSecondaryDataSource Method . . . . SecondaryDataSource Property . . . . . getSecondaryTable Method .
-
getKeyColumn Method . . setKeyColumn Method . . KeyColumn Property . . getKeyColumnType Method setKeyColumnType Method KeyColumnType Property . getNameColumn Method . setNameColumn Method . NameColumn Property . . getUrlColumn Method . . setUrlColumn Method . . UrlColumn Property . . . getLayerFilter Method . . setLayerFilter Method . . LayerFilter Property . . . getSheetName Method . . setSheetName Method . . SheetName Property . . . Chapter 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
Part 1 Autodesk MapGuide Server and Author Enhancements The chapters in Part I document the changes and additions made to Autodesk MapGuide Server and Autodesk MapGuide Author to support the new features in this release.
-
2
-
1 Introduction This document describes new and changed features in In this chapter Autodesk MapGuide® Release 6.5.
-
Installation Notes For complete installation and licensing information, please refer to the Installation Instructions PDF file, which is available from the menu that appears when you insert the Autodesk MapGuide installation CD. For late-breaking installation updates and known issues, please refer to the Autodesk MapGuide Readme (MGReadme.htm) located on the Autodesk MapGuide installation CD and to the Autodesk MapGuide LiteView Readme (LVReadme.
-
2 Improved DWG Support This chapter describes the enhanced support for DWG files In this chapter provided in this release of Autodesk® MapGuide. Most of the ■ Summary of enhancements ■ Dialog box changes: Autodesk MapGuide Server ■ Dialog box changes: Autodesk MapGuide Author Server Admin program. Follow the procedures in this chapter ■ How queries work in Autodesk Map to learn the new methods of authoring layers directly from ■ Creating a layer from a query DWG files.
-
Summary of Enhancements This release of Autodesk MapGuide provides greatly improved support for DWG files, particularly those created in Autodesk Map. In previous releases, you could only bring in the entire DWG or certain layers from it. To extract geometry of a particular type from the DWG file, it was necessary to convert the polygons, points, or polylines to individual SDF files first. The new release gives you much greater flexibility in working with DWG files.
-
Dialog Box Changes: Autodesk MapGuide Server New arc parameters have been added to the Autodesk Data Link Properties dialog box. You access this dialog box by editing the properties of a DWG data source in the Autodesk MapGuide Server Admin program. Using the parameters, you can now specify how finely arcs are rendered as polylines when they are brought into Autodesk MapGuide (note that finer arcs slow performance).
-
Dialog Box Changes: Autodesk MapGuide Author The Map Layer Properties dialog box has been rearranged and updated to make it easier to use and to provide a logical interface for the new DWG features. Layer type appears in the title bar Map Server Agent URL has been moved to top of work area Name, URL, Where tab has been added. (See the illustration below.) For Filter Type, you can select Layer, Query, or Theme.
-
How Queries Work in Autodesk Map In Autodesk Map, queries are used to extract a subset of data from a series of DWG files. Queries can be saved in the DWG file. You can use these saved queries to create new layers in Autodesk MapGuide. The following diagram illustrates how a simple location query is created in Autodesk Map: Three DWGs are attached. Circle query retrieves all data within a circular area.
-
In the illustration on the facing page, the drawing file PROJECT.DWG has three drawings attached to it: PARCELS.DWG, SEWER_DATA.DWG, and WATER_DATA.DWG. When the the Circle query is executed, it extracts all the data that falls within a pre-defined circle from all three attached files. The example in the illustration is a very simple query, called a location query because it is based on a location in the drawing (in this case, a circular area).
-
You can also click the Query Category Browse button to select a particular query category. If there are many queries defined in the drawing, this can make the list more manageable. Filter type set to Query 9 Click OK. The data specified by the query is retrieved from the server and displayed in Autodesk MapGuide Author.
-
How Themes Work in Autodesk Map In Autodesk Map, themes are used to create thematic maps from data contained in, or linked to, a series of DWG files. You can use these themes to create new layers in Autodesk MapGuide. The following diagram illustrates how a simple theme is created in Autodesk Map: The DWG is attached. The database is connected. The theme uses the database table to change the width of pipe lines in the DWG.
-
In the illustration on the previous page, the drawing file PROJECT_THEME.DWG has the WATER_DATA.DWG drawing attached to it. The PROJECT_THEME.DWG drawing file is also linked to a database that contains information about the pipes that make up the city’s water system. A theme has been created to show the different pipe diameters. When the theme is executed, it reads the data from the database and redraws the thickness of the polylines in the drawing according to the diameter of the pipes.
-
You can also click the Theme Category Browse button to select a particular category of theme. If there are many themes defined in the drawing, this can make the list more manageable. Filter type set to Theme 9 Click OK. The data specified by the theme is retrieved from the server and displayed in Autodesk MapGuide Author.
-
Creating a Layer By Geometry Type You can create new layers of a particular geometry type, such as polyline, polygon, or point, directly from a DWG file. You create these layers in the usual way, by selecting the type of geometry that the layer contains; the only difference in using DWG files is that when you select the data source, you select Autodesk DWG. Note Text layers cannot be created directly from DWG files.
-
7 Optionally, select a key table and key column if you want to associate table data with the geometry on this layer. For more information, see the topic “About DWG Data Sources” in the Autodesk MapGuide Help. 8 For Filter Type, select either Layer, Query, or Theme. You can use any of the three filtering methods to specify the geometry that you want to bring into your map. When you are creating a geometry layer, make sure that the geometry you are bringing in consists of appropriate objects.
-
The geometry you specified is retrieved from the server and displayed in Autodesk MapGuide Author. Theming a DWG Layer You can theme new layers of a particular geometry type that you are bringing into Autodesk MapGuide Author from a DWG file. The steps to theme geometry from a DWG file are exactly the same as the steps to theme SDF geometry.
-
5 Click the Theme Column Browse button, and select the Theme Column. 6 Click OK to return to the Map Layer Properties dialog box. 7 Click Theme Defaults and then define the categories for your theme. 8 Click OK to return to the Map Layer Properties dialog box. 9 Click Change to modify any of the styles displayed in the list. 10 Click OK when you have finished.
-
The geometry is themed according to the styles you specified and displayed in Autodesk MapGuide Author. Using a Secondary Table You can use a secondary table to associate additional data with the geometry you are bringing into Autodesk MapGuide Author from a DWG file. The steps to use a secondary table with a DWG file are almost exactly the same as the steps to use a secondary table with SDF geometry. The Map Layer Properties dialog box looks slightly different, as shown in the following illustration.
-
Accessing Data Using a Link Template In Autodesk Map, a link template associates objects in the drawing with records in an external database. In this release of Autodesk MapGuide, you can access all the columns of any database table that is linked to the drawing by a link template. For information about the other kinds of database tables that you can link, see the topic “About DWG Data Sources” in the Autodesk MapGuide Help.
-
9 Optionally, click the Name, URL, Where tab, and select a link template for the Name and/or URL, if you want to access database columns linked to the DWG to label the geometry you are bringing into Autodesk MapGuide or to associate URLs. Link template selected here 10 Click OK. The selected link template associates the data table with the objects on the layer.
-
22
-
3 DWF Support This chapter describes the new support for the DWF™ file In this chapter format in this release of Autodesk MapGuide. DWF stands for ■ Summary of DWF support ■ Setting up a data source for DWF files ■ How DWFs are published in Autodesk Map ■ Creating a layer from a DWF file sheet ■ Saving a view as a DWF file Design Web Format™ and is usually pronounced “DWIF.
-
Summary of DWF Support You can think of a DWF file as a container for a design package that is comprised of various kinds of design information published in a print-ready drawing set. DWF is an open format that can be published by many different design applications. The DWF format has been created by Autodesk as a way for team members, who may be separated geographically and who may not all have the same software programs, to share and distribute design data.
-
Setting Up a Data Source for DWF Files A DWF data source points to the folder where the DWF files that you want to use are stored. The dialog boxes that you see when you set up a new data source for DWF files are almost identical to those you see when you set up a data source for DWG files (for more information, see the topic “Creating Autodesk DWG Data Sources” in the Autodesk MapGuide Author Help).
-
5 In the Autodesk Data Link Properties dialog box, select Autodesk MapGuide Data Extension For DWF, and then click the Connection tab. 6 On the Connection tab, click the Browse button next to DWF Search Path and navigate to the folder where the DWF files are located. Click the Advanced tab. 7 On the Advanced tab, select the SRS (Spatial Reference System) that you want to use for the DWF files in the data source.
-
8 Optionally, on the Advanced tab, set the arc parameters. For a description of these parameters, see “Dialog Box Changes: Autodesk MapGuide Server” on page 7. 9 Click OK. The new data source is added to the list in the Properties dialog box.
-
How DWFs are Published in Autodesk Map You can create DWFs in various Autodesk products. A DWF file consists of a number of sheets, each of which can contain a view of a different DWG or a different view of the same DWG, for example the map with different layers turned on or off. The following diagram illustrates how a DWF file is published from Autodesk Map. Views are set up in Autodesk Map and published to a multi-sheet DWF file. Sheet One Sheet Two PROJECT.
-
Creating a Layer from a DWF File Sheet DWFs are really intended to be used as background images, in much the same way that DWG files were used in previous releases. Because DWFs are essentially electronic plots, the level of precision depends on the plot settings. This is not an issue for most maps. However, if your application demands a higher degree of precision, you can increase the size of the virtual DWF paper by setting the appropriate DPI and paper size before you publish to DWF.
-
4 Click the Data Source Browse button, and select a DWF data source. 5 Click the Autodesk DWF Browse button, and select a DWF file. 6 Click the Sheet Name Browse button and select a sheet from the list. Select DWF file and sheet here. 7 Optionally, click the Layer Filter Browse button, and select a layer from the list. If you want to bring in the entire sheet, leave the Layer Name field blank. 8 Click OK. The DWF sheet is retrieved from the server and displayed in Autodesk MapGuide Author.
-
Displaying Friendly Names and URLs If you want to access database columns defined for the DWF, you can click the Name, URL tab and select a column for the Name and/or URL. You can use the content of the columns to display a “friendly name” for the features or to display URLs. The friendly name replaces the URL in the maptip. For example. “MapGuide” could replace “http://www.mapguide.com.” As with SDP data sources, FEATURE_URL is the keyword for accessing URLs in the DWF file.
-
Saving a View As a DWF File In Autodesk MapGuide Author, you can save any view of your map as a DWF file. Then, anyone on your extended team can review these files even though they don’t have a copy of Autodesk MapGuide Author. Team members can open the DWF in any of the Autodesk applications that support the DWF file format or in the free Autodesk® DWF™ Viewer. You save a view to a DWF file works in the same way that you send a file to a printer.
-
To create a DWF file from a view in Autodesk MapGuide Author 1 In Autodesk MapGuide Author, zoom to the view that you want to save. 2 From the File menu, choose Save As DWF. 3 In the Save DWF File As dialog box, navigate to the folder where you want to save the DWF file. 4 Enter a name for the file. 5 Click Save.
-
6 Optionally, test the output DWF file by opening it in Autodesk DWF Viewer. In this example, you see the standard page size used by default. You can also save views to DWF files from the Autodesk MapGuide Viewer ActiveX Control or Plug-In, if the DWF Writer has been downloaded and installed on that PC. To create a DWF file from a view in Autodesk MapGuide Viewer 1 In Autodesk MapGuide Viewer, zoom to the view that you want to save.
-
4 Enhanced Layer Functionality This chapter describes the new enhanced layer In this chapter functionality for layers that use spatial data provider ■ Summary of enhanced layer functionality (SDP) and OLE database data sources.
-
Summary of Enhanced Layer Functionality This release of Autodesk MapGuide provides powerful new tools that you can use to enhance the results of your work with layers. Specific new features included in this release are as follows: ■ ■ ■ ■ ■ ■ 36 | Chapter 4 Access to API for enhanced layer functionality. Provide access to the enhanced layer functionality API for a layer. See “Providing Access to the Enhanced Layer Functionality API” on page 37. Enhanced geometry functionality.
-
Providing Access to the Enhanced Layer Functionality API The API for the new enhanced layer functionality provides access to your spatial data provider (SDP) and OLE database data sources. To secure your data against unwanted changes, access to the enhanced layer functionality API for a layer is blocked by default. If you are adding enhanced layer functionality to your maps, you need to decide whether or not you want to provide developers with access to the API for enhanced layer functionality.
-
Note To provide access to the enhanced layer functionality API for maps created in earlier versions of Autodesk MapGuide, you need to open your existing maps in Autodesk MapGuide Author 6.5, check this new option for the layers to which you have applied the enhanced layer features, and then assign a passkey.
-
Using Geometry Functions Using new enhanced layer functionality, you can apply geometry functions to selected features on maps drawn from spatial data provider (SDP) data sources. For example, you can apply a geometry function to a point layer in a map that shows the locations of cell phone towers. This function could direct Oracle to apply a buffer of a size equivalent to the range of each tower.
-
Note Using parameters when applying a geometry function is optional. Supported Geometry Functions The following is a list of some of the supported geometry functions that are available with Oracle: ■ ■ ■ ■ ■ SDO_ARC_DENSIFY SDO_BUFFER SDO_CENTROID SDO_CONVEXHULL SDO_MBR Note Consult your Oracle documentation for a complete list of Oracle functions available in Oracle and for instructions on how to use them.
-
Sample 1: Applied geometry functions In this sample, when the Autodesk MapGuide Server processes the layer, SDO_GEOM.SDO_BUFFER(%GEOMCOL,2,1) becomes SDO_GEOM.SDO_BUFFER(GEOM,2,1) after the parameter has been updated. Assuming no spatial filtering is being done, the actual Autodesk MapGuide default spatial query used by the server would look like the following: SELECT ID, SDO_GEOM.
-
Applying Filters to Spatial Queries A spatial query returns potentially large volumes of geographic information pertaining to map features. By limiting the data returned by a query, a spatial filter reduces the query result set to a particular geography. Using spatial filters can protect against the unwanted return of much larger batches of data than you intended.
-
4 Click the Advanced Settings button. The Advanced Settings dialog box is displayed, as shown in the following illustration. Note that the Use Autodesk MapGuide Server Spatial Filter Setting option is selected by default.
-
5 To turn the spatial query filter off, clear the Use MapGuide Server’s Spatial Filter checkbox. Changing the Dimensions of the Autodesk MapGuide Spatial Filter The default client window size determines the size of the spatial filter you use to limit data returned by a spatial query.
-
4 On the Data Sources tab, click the Advanced Settings button. The Advanced Settings dialog box is displayed, as shown in the following illustration. 5 Select the Apply Clipping Adjustment To The Autodesk MapGuide Spatial Filter check box. When you select this option, Adjustment is available. Note The unit of measure (FOOT, MILE, and so on) of the spatial filter extents is shown next to the Adjustment text box, where you enter the number of units you are adjusting.
-
Using a Custom Spatial Query Custom queries consist of a set of user-defined SQL statements that you can use instead of the default Autodesk MapGuide spatial queries. Default spatial queries compile a server request statement from user-defined parameters. These parameters appear on the Data Sources tab of the Layer Properties dialog box in the Autodesk MapGuide Author. By replacing the default spatial query with a custom spatial query, the client passes a user-defined request statement to the server.
-
OLE DB Column Order (Text): Order Data Field Name 1 KEY 2 LAT 3 LON 4 NAME 5 URL 6 HEIGHT 7 ROTATION 8 HORIZONTAL ALIGNMENT 9 VERTICAL ALIGNMENT OLE DB Column Order (Point): Order Data Field Name 1 KEY 2 LAT 3 LON 4 NAME 5 URL Using a Custom Spatial Query | 47
-
Order Data Field Name 6 WIDTH 7 HEIGHT 8 ROTATION Before you create a custom spatial query, you should verify the content of the default Autodesk MapGuide spatial query. This will save you time if you discover that the default query may have returned the data you need. To verify the default spatial query 1 Open the map containing the layer to which you want to apply a spatial query. 2 Double-click the name of the layer in the list to the left of the map.
-
4 On the Data Sources tab, click the Advanced Settings button. The Advanced Settings dialog box is displayed, as shown in the following illustration. The spatial query that Autodesk MapGuide uses appears under Query List. Note that the Use MapGuide Server’s Spatial Filter option is selected and the default Autodesk MapGuide spatial query is specified in the Details column. You can accept this to run the standard query attached to the layer, or you can specify a custom query.
-
2 In the Type list, select Spatial Query - Custom, as shown in the following illustration. Autodesk MapGuide prompts you to enter the name of the custom spatial query in the Data area of the Edit Query dialog box. 3 In the Data area, enter the custom spatial query SQL statement to be executed. You can use the sample statements under Information to help you with the statement’s syntax, as shown in the preceding illustration. Note When using a custom spatial query, you must specify the correct column order.
-
Sample 1: Running a Custom Query In this sample custom query, the user is supplying parameters to customize a standard spatial query. The parameters simply provide the user with the convenience of using parameters instead of having to type in, in this case, geometry column and feature table names. This can be particularly helpful if such names appear multiple times within a spatial query.
-
Sample 2: Running a Custom Query Against an OLE Database This sample again illustrates the convenience of adding user-supplied parameters when running the a custom spatial query, this time against an OLE database. The parameters shown in the following Advanced Settings dialog box are entered instead of the user’s having to type literal values contained within columns and feature tables.
-
This custom spatial query becomes the following after the Autodesk MapGuide server has updated the parameters with the appropriate values: SELECT ID, LAT, LON FROM TRAFFIC_SIGNS WHERE (LAT > -90 AND LAT < 90 AND LON > -180 AND LON <180) Note Using parameters within a custom spatial query is optional. Accessing the Oracle Linear Referencing System (LRS) Autodesk MapGuide now provides access via the custom spatial query to Oracle’s Linear Referencing System (LRS).
-
Oracle VIEW is accessed as a Feature Table within Autodesk MapGuide, assuming that the Oracle VIEW has been added to the Oracle USER_SDO_GEOM_METADATA table. Sample Advanced Settings: Custom Spatial Query Including the LRS Function In this example, the Advanced Settings dialog box illustrates part of the custom query that uses an LRS function. In this case you are simply using the custom spatial query directly instead using Oracle VIEW, as in the preceding example.
-
Using SQL Pass-Through Statements The Autodesk MapGuide enhanced layer functionality supports the use of pre- and post-SQL statements with spatial queries, allowing you to execute these statements either before or after you perform a spatial query against a layer. Note To use pre- and post-SQL statements with spatial queries, you must access the database management system from within Autodesk MapGuide.
-
3 Click the Advanced Settings button. The Advanced Settings dialog box is displayed, as shown in the following illustration. Note that the Query List area includes the standard Autodesk MapGuide default query.
-
4 Click the New button. The Create New Query dialog box is displayed, as shown in the following illustration. 5 In the Data area, enter a SQL statement, and click OK. The new statement is displayed by default beneath the spatial query in the Advanced Settings dialog box, as show in the following illustration. At this point, the added SQL statement is a post-spatial query statement, and would be executed after the query is executed.
-
6 To make the added SQL statement a pre-spatial query statement that will run before the spatial query is executed, select the statement, and click the Up button to reposition the statement above the spatial query. 7 Optionally, continue to add statements, selecting them individually and clicking the Up or Down button to position a statement above or below the spatial query as desired. Note Only one spatial query statement — either the default or customized — is allowed per layer.
-
5 Oracle Spatial Data Provider Enhancements This chapter describes minor changes to the Provider for In this chapter Oracle® Spatial (sometimes abbreviated to Oracle SDP). You ■ Dialog box changes ■ Registry structure changes ■ Manually editing a UDL file can find a complete description of the provider in the Provider ® for Oracle Spatial Guide on your Autodesk MapGuide Release 6.5 CD.
-
Dialog Box Changes New arc parameters have been added to the Autodesk Data Link Properties dialog box. You access this dialog box by editing the properties of an Oracle data source in the Autodesk MapGuide Server Admin program, or by doubleclicking an Oracle UDL file. Using the parameters, you can now specify how finely arcs are rendered as polylines when they are brought into Autodesk MapGuide. Keep in mind that finer arcs slow performance.
-
Registry Structure Changes In previous releases of Autodesk MapGuide, there were four settings for the Provider for Oracle Spatial, which applied to any Oracle data source accessed by the server. All of these settings have been removed. Two of these (SegmentsPerArc and RadiansPerArcStroke) have been replaced by the arc parameters described in “Dialog Box Changes” on page 60, which means that you can now set these parameters indvidually for each data source.
-
62
-
6 Using Buzzsaw with Autodesk MapGuide Viewer This chapter explains how the Microsoft ActiveX Control In this chapter Viewer works with files that are stored in Buzzsaw®. ■ Accessing maps and MWF files from Buzzsaw Autodesk MapGuide Viewer and Buzzsaw interface in ■ Associating a Buzzsaw document with a map feature ■ Managing the Autodesk MapGuide and Buzzsaw Interface ■ Appendix: Buzzsaw code integration three ways.
-
Accessing Maps and MWF Files from Buzzsaw You can use Buzzsaw as a Web server where you can publish your Autodesk MapGuide applications so that others can access them. For more information about publishing maps to a Web server, see “Publishing a Map” in the Autodesk MapGuide User’s Guide. You can access the Autodesk MapGuide User’s Guide by clicking Programs ➤ Autodesk MapGuide Release 6.5 ➤ Documentation ➤ Autodesk MapGuide User’s Guide from the Start menu.
-
Sample URL Parameter Entry If the HTML that references an Autodesk MapGuide MWF looks like this:
-
Associating a Buzzsaw Document with a Map Feature After you have created a map in Autodesk MapGuide Author and published it to a Web site, you can add URLs that connect features in the map to documents stored in Buzzsaw. Autodesk MapGuide provides quick access to support documentation about a particular map feature.
-
5 After the URL information has been added to your data, open the map containing the feature with which you want the document stored in Buzzsaw to be associated. 6 Using both the Data Sources tab and the Name, URL, Where tab in the Map Layer Properties dialog box, assign a data source column that contains the desired URL for the document that you want to associate with a map feature. Use the data source column from the data that contains the URL information specified in Step 1.
-
Managing the Autodesk MapGuide and Buzzsaw Interface This section explains how to manage the integration of the Autodesk MapGuide and Buzzsaw interfaces. You can manage three aspects of this integration: ■ Avoiding Buzzsaw interface authentication. Eliminate the requirement to log on through a dialog box when opening a document in Buzzsaw. ■ Map state retention. Prevent the loss of the current map state when you use the Back button to return to the Autodesk MapGuide application from a Buzzsaw document.
-
Avoiding Buzzsaw Interface Authentication You can open documents associated with Autodesk MapGuide map features without having to enter a logon ID and password to access the appropriate Buzzsaw folder. To avoid Buzzsaw Interface Authentication 1 Display the Autodesk Mapguide project document in Buzzsaw, showing the list of HTML documents, as shown in the following illustration.
-
The HTML appears as shown in the following sample code, with the ObjectLinkTarget highlighted: Note The version number following the ActiveX control reference in the preceding code sample is for illustration purposes only. 5 Close the editor and save your changes. 6 In Buzzsaw, right-click the HTML document again in the Project File list, and click Update to display the Update Project Document dialog box. You will see the local drive path, ending with the HTML document you have updated.
-
Retaining the Current Map State Autodesk MapGuide and Buzzsaw Viewer integration is designed to ensure that your maps retain their most recent state when you leave them to access a document in Buzzsaw. Map state retention would help, for example, if you have spent a significant amount of time navigating the map, turning layers on and off, and zooming to display a particular feature on the map, such as a building or road.
-
■ MGMap.getLat ■ MGMap.getLon ■ MGMap.getWidth ■ MGMap.getUnits 3 Save the list of layers, groups, and their corresponding visibility by using the following APIs: ■ MgMap.getMapLayersEx ■ MgMap.getMapLayerGroups ■ MgMapLayer.getVisibility ■ MgMapLayerGroup.getVisibility 4 Save the feature selection state by using the following API: ■ MgMap.
-
Preventing the Non-Secure Site Warning Buzzsaw is a secure site, requiring any HTML pages to contain references to secure information. If a referenced document is considered potentially nonsecure, Buzzsaw displays the following message: You can prevent the display of this warning. To prevent the display of the non-secure site warning 1 Add the Autodesk MapGuide ActiveX Control cab file mgaxctrl.cab, located on the Autodesk Mapguide installation CD, in the ActiveXCab sub-folder, to Buzzsaw.
-
Appendix: Buzzsaw Code Integration The following code sample illustrates how to integrate Autodesk MapGuide and Buzzsaw so that you can avoid the need to authenticate the Buzzsaw interface, retain the current map state, and prevent the non-secure site warning message from appearing. See the preceding section for more information about managing these three elements of the interface. Note The URL parameters to the OBJECT tag have to be specified before the sample will work.
-
} } } } layerGroups.item(i).setVisibility(true); } else { layerGroups.item(i).setVisibility(false); } // Utility function to check to see if the string in variable name occurs in the // semicolon delimited string in variable names. // E.g. isNameIn("A;Bb;Cde", "Bb") => true // isNameIn("A;Bb;Cde", "B") => false function isNameIn(names, name) { var cname = name + ";"; var clen = names.length; } var cbegin = 0; while (cbegin < clen) { var cend = cbegin + cname.length; if (names.
-
+ selStringPARAM); // visible layers var layers = map.getMapLayersEx(); var visibleLayersCookie = ""; for (var i = 0; i < layers.size(); i++) { if (layers.item(i).getVisibility()) { visibleLayersCookie = visibleLayersCookie + escape(layers.item(i).getName()) + ";"; } } document.cookie = cookieNameMapStateLayers + "=" + escape(visibleLayersCookie); } } // visible groups var groups = map.getMapLayerGroups(); var visibleGroupsCookie = ""; for (var i = 0; i < groups.size(); i++) { if (groups.item(i).
-
if (dcookie.substring(cbegin, vbegin) == cname) { var vend = dcookie.indexOf (";", vbegin); if (vend == -1) vend = clen; return unescape(dcookie.substring(vbegin, vend)); } cbegin = dcookie.indexOf(" ", cbegin) + 1; if (cbegin == 0) break; } } return null; function setCookie (name, value, expires) { if (!expires) expires = new Date(); document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() + "; path=/"; } function delCookie (name) { var expireNow = new Date(); document.
-
78
-
Part II Changes and Additions to the MapGuide Viewer API The chapters in Part II document the changes and additions made to Autodesk MapGuide Viewer 6.5 API in order to support the new DWG Theming functionality, DWF Support, and Enhanced Layer functionality. Please note only the ActiveX Control and the Java Edition of the Viewer support the new DWG, DWF, and Enhanced Layer API Functionality.
-
80
-
7 DWG API Additions This chapter documents the new properties and methods In this chapter that have been added to the MGDwgDataSources object ■ in order to support the new DWG theming and query New methods and properties for the MGDwgDataSources object functionality in Autodesk MapGuide 6.5. For more information about new DWG support, see Chapter 2, “Improved DWG Support” on page 5.
-
MGDwgDataSources Object The MGDwgDataSources object implements methods and properties to support Autodesk drawing (DWG) data sources. Autodesk DWG is a worldwide-standard drawing file format across vertical industries, such as architectural design, and facilities planning and maintenance. For more information about the MGDwgDataSources object, see the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.
-
Error Codes -99 (null pointer) See Also FilterType FilterType Property Syntax FilterType Description Read only propety that returns the current filter type applied to the DWG data layer. A value of 0 indicates the layer filter type; a value of 1 indicates the query filter type; a value of 2 indicates a theme filter type.
-
See Also getFilterType getQueryName Method Syntax String getQueryName() Description Gets the name of the query that is assigned as the current DWG filter. In DWG layers, you can specify an Autodesk Map query as a filter for layer data. If FilterType is set as a query filter (value of 1), this method returns the name of the query used in the filter. If FilterType is not set as a query filter, this method returns NULL with the error code DoesNotApply.
-
setQueryName Method Syntax boolean setQueryName(String queryName) Description Sets the name of the query you want to assign as the DWG filter. It also automatically sets FilterType to a Query Filter (value of 1). For infomation about FilterType, see “FilterType Property” on page 83. In DWG layers, you can specify an AutoCAD Map query as a filter for layer data. Use this method to specify the name of the query to use as the filter.
-
QueryName Property Syntax QueryName Description Sets and gets the name of the query assigned as the DWG filter. It also automatically sets FilterType to a Query Filter (value of 1). For infomation about FilterType, see “FilterType Property” on page 83. In DWG layers, you can specify an AutoCAD Map query as a filter for layer data. Use this property to specify the name of the query to use as the filter. For information about the query filter type, see “How Queries Work in Autodesk Map” on page 9.
-
Description Gets the category of the query that is assigned as the DWG filter. In DWG layers, you can specify an AutoCAD Map query as a filter for layer data. If FilterType is set as a query filter (value of 1), this method returns the category of the query used in the filter. If FilterType is not set as a query filter, this method returns NULL with the error code DoesNotApply. For more information about FilterType, see “FilterType Property,” on page 83.
-
For information about setting the category of a query filter, see Step 8 under “How Queries Work in Autodesk Map,” on page 9. Parameters queryCategory – String representing the category of the query. Return Values boolean – Specifies whether or not the category of the query has been successfully set. True – Indicates that the category of the query has been set successfully. False – Indicates that the category of the query has not been set.
-
Parameters none Return Values String (read/write) – Represents the category of the query that is assigned as the filter. Error Codes -1 (Busy) – This error code is returned for the write operation. -15 (DoesNotApply) – This error code is returned for the read operation. See Also getQueryCategory, setQueryCategory, getQueryName, setQueryName, QueryName getThemeName Method Syntax String getThemeName() Description Gets the name of the theme that is assigned as the DWG filter.
-
Parameters none Return Values String – Represents the name of the theme that is assigned as the filter or an empty string. Error Codes -15 (DoesNotApply) See Also setThemeName, ThemeName, getThemeCategory, setThemeCategory, ThemeCategory setThemeName Method Syntax boolean setThemeName(String themeName) Description Sets the name of the theme that is assigned as the DWG filter. It also automatically sets FilterType to a Theme Filter (value of 2).
-
Parameters themeName – String representing the name of the theme that is assigned as the filter. Return Values boolean – Specifies whether or not the name of the theme has been successfully set. True – Indicates that the theme name has been set successfully. False – Indicates that the theme name has not been set.
-
Parameters none Return Values String (read/write) – Represents the name of the theme that is assigned as the filter. Error Codes -1 (Busy) – This error code is for the write operation. -15 (DoesNotApply) – This error code is returned for the read operation. See Also getThemeName, setThemeName, getThemeCategory, setThemeCategory, ThemeCategory getThemeCategory Method Syntax String getThemeCategory() Description Gets the category of the theme that is assigned as the DWG filter.
-
Parameters none Return Values String – Represents the category of the theme that is assigned as the filter or an empty string. Error Codes -15 (DoesNotApply) See Also setThemeCategory, ThemeCategory, getThemeName, setThemeName, ThemeName setThemeCategory Method Syntax boolean setThemeCategory(String themeCategory) Description Sets the category of the theme that you want to assign as the DWG filter. It also automatically sets FilterType to a Theme Filter (value of 2).
-
Parameters themeCategory – String representing the category of the theme that you want to assign as the filter. Return Values boolean – Specifies whether or not the category of the theme is successfully set. True – Indicates that the theme category has been set successfully. False – Indicates that the theme category has not been set.
-
Parameters none Return Values String (read/write) – Represents the category of the theme that is assigned as the filter. Error Codes -1 (Busy) – This error code is for the write operation. -15 (DoesNotApply) – This error code is returned for the read operation. See Also getThemeCategory, setThemeCategory, getThemeName, setThemeName, ThemeName getNameSource Method Syntax int getNameSource() Description Gets the source of the feature names for layers that are created from DWG data.
-
Parameters none Return Values Integer – Value indicating the source of the feature name. 0 – Autodesk DWG file 1 – Secondary table Error Codes none See Also setNameSource, NameSource setNameSource Method Syntax boolean setNameSource(int nameSource) Description Sets the source of feature names for layers that are created from DWG data. Feature names can be taken either from an Autodesk DWG file or a secondary table. A value of 0 sets the Autodesk DWG file as the name source.
-
1 – Sets the secondary table as the name source. Return Values boolean – Specifies whether or not the source of the feature names has been successfully set. True – Indicates that the name source has been set successfully. False – Indicates that the name source has not been set. Error Codes -1 (Busy) -15 (DoesNotApply) See Also getNameSource, NameSource NameSource Property Syntax NameSource Description Gets and sets the source of feature names for layers that are created from DWG data.
-
Parameters none Return Values integer (read/write) – Value indicating the source of feature names. 0 – Indicates the Autodesk DWG file as the name source. 1 – Indicates the secondary table as the name source. Error Codes -1 (Busy) – This error code is for the write operation. -15 (DoesNotApply) – This error code is for the write operation.
-
Parameters none Return Values integer – Value indicating the source of the feature URLs. 0 – Indicates Autodesk DWG files as the source. 1 – Indicates secondary tables as the source. Error Codes none See Also setUrlSource, UrlSource setUrlSource Method Syntax boolean setUrlSource(int urlSource) Description Sets the source of feature URLs for layers that are created from DWG data. These URLs enable users to go the a web page related to a map feature by double clicking the feature.
-
Parameters urlSource – Value indicating the URL source. 0 – Sets the Autodesk DWG file as the URL source. 1 – Sets the secondary table as the URL source. Return Values boolean – Specifies whether or not the source of the feature URLs has been successfully set. True – Indicates that the URL source has been set successfully. False – Indicates that the URL source has not been set.
-
For more information about information on getting and setting the source of feature URLs for a layer created from DWG data, see Step 9 under “Accessing Data Using a Link Template” on page 20. Parameters none Return Values integer (read/write) – Value indicating the URL source. 0 – Indicates Autodesk DWG files as the URL source. 1 – Indicates secondary tables as the URL source. Error Codes -1 (Busy) – This error code is for the write operation.
-
For more information about using secondary tables as the source for SQL WHERE clauses, see Step 9 under “Accessing Data Using a Link Template” on page 20. Parameters none Return Values integer – Value indicating the source for the SQL WHERE clause of the layer. 0 – Indicates an Autodesk DWG files as the SQL WHERE clause source. 1 – Indicates a secondary table as the SQL WHERE clause source.
-
Parameters whereSource – Value indicating the source of the SQL WHERE clause. 0 – Sets the Autodesk DWG file as the source for the SQL WHERE clause. 1 – Sets the secondary table as the SQL WHERE clause source. Return Values boolean – Specifies whether or not the source of the SQL WHERE clause has been successfully set. True – Indicates that the source has been set successfully. False – Indicates that the source has not been set.
-
For more information about using secondary tables as the source for SQL WHERE clauses, see Step 9 under “Accessing Data Using a Link Template” on page 20. Parameters none Return Values integer (read/write) – Value indicating the source for SQL WHERE clause. 0 – Indicates Autodesk DWG files as the source for the SQL WHERE clause. 1 – Indicates secondary tables as the source for the SQL WHERE clause. Error Codes -1 (Busy) – This error code is for the write operation.
-
Parameters none Return Values String – Represents the SQL WHERE clause. Error Codes -15 (DoesNotApply) See Also setSQLWhereClause, SQLWhereClause setSQLWhereClause Method Syntax boolean setSQLWhereClause(String sqlWhereClause) Description Sets the SQL WHERE clause for layers that are created from DWG data. This method sets the SQL WHERE clause only for polyline, polygon, and point layers created from DWG data. It does not set the SQL WHERE clause for Autodesk DWG layers.
-
False – Indicates that the SQL WHERE clause has not been set. Error Codes -1 (Busy) -15 (DoesNotApply) See Also getSQLWhereClause, SQLWhereClause SQLWhereClause Property Syntax SQLWhereClause Description Gets and sets the SQL WHERE clause for layers that are created from DWG data. This property gets and sets the SQL WHERE clause only for polyline, polygon, and point layers created from DWG data. It does not get or set the SQL WHERE clause for Autodesk DWG layers.
-
See Also getSQLWhereClause, setSQLWhereClause isLinkedToSecondaryTable Method Syntax Boolean isLinkedToSecondaryTable() Description Specifies whether or not the current layer is linked to a secondary table. A value of True indicates that a link exists. A value of False indicates that a link does not exist. In order to link to a secondary table, you need to call the setSecondaryDataSource, setSecondaryTable, and setSecondaryKeyColumn methods.
-
LinkedToSecondaryTable Property Syntax LinkedToSecondaryTable Description Specifies whether or not the current layer is linked to a secondary table. A value of True indicates that a link exists. A value of False indicates that a link does not exist. In order to link to a secondary table, you need to call the setSecondaryDataSource, setSecondaryTable, and setSecondaryKeyColumn methods. After you set these, you can call the setNameSource, setUrlSource, or setWhereSource methods to link to a secondary table.
-
getSecondaryDataSource Method Syntax String getSecondaryDataSource() Description Gets the secondary data source linked to the layers that are created from DWG data. This method gets the secondary data source only for polyline, polygon, and point layers created from DWG data. It does not get the secondary data source linked to Autodesk DWG layers. For more information about linking layers created from DWG data to secondary data sources, see “Accessing Data Using a Link Template” on page 20.
-
and point layers created from DWG data. It does not set the secondary data source linked to Autodesk DWG layers. For more information about linking layers that are created from DWG data to secondary data sources, see “Accessing Data Using a Link Template” on page 20. Parameters secondaryDataSource – String representing the name of the secondary data source. Return Values boolean – Specifies whether or not the secondary data source is successfully set.
-
For more information about linking layers that are created from DWG data to secondary data sources, see “Accessing Data Using a Link Template” on page 20. Parameters none Return Values String (read/write) – Represents the name of the secondary data source. Error Codes -1 (Busy) – This error code is for the write operation.
-
Parameters none Return Values String – Represents the name of secondary table linked to the layer. Error Codes -15 (DoesNotApply) See Also setSecondaryTable, SecondaryTable setSecondaryTable Method Syntax boolean setSecondaryDataSource(String secondaryDataSource) Description Sets the secondary table linked to layers that are created from DWG data. This method sets the secondary table linked only to polyline, polygon, and point layers. It does not set the secondary table linked to Autodesk DWG layers.
-
Error Codes -1 (Busy) -15 (DoesNotApply) See Also getSecondaryTable, SecondaryTable SecondaryTable Property Syntax SecondaryTable Description Gets and sets the secondary table linked to layers that are created from DWG data. This property gets and sets the secondary table linked only to polyline, polygon, and point layers. It does not get or set the secondary table linked to Autodesk DWG layers.
-
getSecondaryKeyColumn Method Syntax String getSecondaryKeyColumn() Description Gets the secondary key column linked to layers that are created from DWG data. This method gets the secondary key column linked only to polyline, polygon, and point layers. It does not get the secondary key column linked to Autodesk DWG layers. For more information about linking layers that are created from DWG data to secondary key columns, see “Accessing Data Using a Link Template” on page 20.
-
polygon, and point layers. It does not set the secondary key column linked to Autodesk DWG layers. For more information about linking layers that are created from DWG data to secondary key columns, see “Accessing Data Using a Link Template” on page 20. Parameters secondaryKeyColumn – String representing the name of the secondary key column that is linked to the layer. Return Values boolean – Specifies whether or not the secondary key column is successfully set.
-
For more information about linking layers that are created from DWG data to secondary key columns, see “Accessing Data Using a Link Template” on page 20. Parameters none Return Values String (read/write) – Represents the name of the secondary key column that is linked to the layer. Error Codes -1 (Busy) – This error code is for the write operation.
-
Parameters none Return Values boolean – Specifies whether or not closed polylines are treated as polygons. True – Indicates that closed polylines are treated as polygons. False – Indicates that closed polylines are not treated as polygons. They are treated as individual polylines and are displayed on a polyline layer.
-
Parameters treatClosedPolylinesAsPolygons – Boolean value specifying whether or not the layer treats closed polylines as polygons. True – Sets the layer to treat closed polylines as polygons. False – Sets the layer not to treat closed polylines as polygons. Return Values boolean – Specifies whether or not the value that determines if the layer treats closed polylines as polygons is successfully set.
-
For more information about how closed polylines are treated on polygon layers, see Chapter ? on page ?. Parameters none Return Values boolean (read/write) – Specifies whether or not to treat closed polylines as polygons. True – Indicates that the layer is set to treat closed polylines as polygons. False – Indicates that the layer is not set to treat closed polylines as polygons. They are treated as individual polylines and are displayed on a polyline layer.
-
Parameters none Return Values boolean – Specifies whether or not blocks are treated as points. True – Indicates that blocks are treated as points. False – Indicates that blocks are not treated as points. They are treated as individual polylines and polygons.
-
Parameters treatBlocksAsPoints – Boolean value specifying whether or not the layer treats blocks as points. True – Sets the layer to treat blocks as points. False – Sets the layer not to treat blocks as points. Return Values boolean – Specifies whether or not the value that determines if the layer treats blocks as points is successfully set. True – Indicates that the value specifying whether or not the layer treats blocks as points has been set.
-
For more information about how blocks are treated on point layers, see Chapter ? on page ?. Parameters none Return Values boolean (read/write) – Specifies whether or not the layer treats blocks as points. True – Indicates that the layer is set to treat blocks as points. False – Indicates that the layer is not set to treat blocks as points. Error Codes -1 (Busy) – This error code is for the write operation.
-
8 DWF API Additions This section documents the API changes that you can use In this chapter to access the new MWF layer properties and that support ■ MGMap object ■ MGMapLayer object ■ MGMapLayerSetup object ■ MGDwfDataSources object the new DWF functionality in Autodesk MapGuide 6.5. The DWF API changes include changes and additions to the methods and properties for the existing MGMap, MGMapLayer, and MGMapLayerSetup objects and the addition of a new MGDwfDataSource object.
-
MGMap Object MGMap is the top-level object of the API for the Autodesk MapGuide Viewer ActiveX Control, Plug-In, and Java Edition. For the ActiveX Control, MGMap is a COM interface. This object has one new method that you can use to save the current view of the MWF file in the Autodesk MapGuide Viewer to a DWF file. For more information about the MGMap object, see the Autodesk MapGuide Viewer API Help. You can access the Autodesk MapGuide Viewer API Help by clicking Autodesk MapGuide 6.
-
Error Codes -1 (busy) -2 (not ready) -3 (illegal argument) -16 (write permission denied) -19 (driver not detected) -20 (API disabled) -22 (write error) MGMapLayer The MGMapLayer object represents a layer on the map. Its getLayerType method and LayerType property return strings indicating the layer type. This method and property can now also return DWF as the layer type.
-
LayerType Property Returns String (read/write) – Represents the layer type. The following are valid layer types: Unknown, Point, Text, Polyline, Polygon, Raster, Buffer, GIS Design Server Theme, Autodesk DWG, Autodesk DWF, and Redline. For more information about the LayerType property, see the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide Viewer API Help on the Program menu.
-
For more information about the MGDataSources object, see “MGDwfDataSources Object” on page 128. Parameters none Returns MGDwfDataSources – The MGDwfDataSources object for this layer. See Also MGDwfDataSources MGDwfDataSources Property Syntax MGDwfDataSources Description Gets the MGDwfDataSources object for this layer. For more information about the MGDataSources object, see “MGDwfDataSources Object” on page 128.
-
getSourceType Method This is an existing method that returns the type of data source for the layer. In this release, this method now can return DWF as a data source type. For more information about the getSourceType method, see the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide Viewer API Help on the Program menu. Returns String – Represents the source type for the layer data.
-
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ DataSource (see page 131) getDwf (see page 132) setDwf (see page 132) Dwf (see page 133) getKeyColumn (see page 134) setKeyColumn (see page 135) KeyColumn (see page 136) getKeyColumnType (see page 136) setKeyColumnType (see page 138) KeyColumnType (see page 139) getNameColumn (see page 140) setNameColumn (see page 141) NameColumn (see page 142) getUrlColumn (see page 143) setUrlColumn (see page 143) UrlColumn (see page 144) getLayerFilter (see page 145) setLayerF
-
Returns String – Represents the name of the DWF data source. See Also setDataSource, DataSource setDataSource Method Syntax boolean setDataSource(String dataSource) Description Sets the name of the DWF data source that establishes a connection between Autodesk MapGuide Server and the Autodesk Data Link (ADL) data provider. If this method is successful, it sets the rebuild flag of the layer to True. For more informaion about the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help.
-
Error Codes -1 Busy See Also getDataSource, DataSource DataSource Property Syntax DataSource Description Gets and sets the name of the DWF data source that establishes a connection between Autodesk MapGuide Server and the Autodesk Data Link (ADL) data provider. If this property is modified successfully, it automatically sets the rebuild flag of the layer to True. For more information about the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help .
-
See Also getDataSource, setDataSource getDwf Method Syntax String getDwf() Description Gets the name of the Autodesk DWF file for the Autodesk DWF layer. For more information about using DWF files as data source for layers, see “Setting Up a Data Source for DWF Files” on page 25. Parameters none Returns String – Represents the name of the DWF file. See Also setDwf, Dwf setDwf Method Syntax boolean setDwf(String DWF) Description Sets the name of the Autodesk DWF file for the Autodesk DWF layer.
-
When you change the Autodesk DWF file, you may also need to update several other properties. These properties include: SheetName, KeyColumn, KeyColumnType, NameColumn, UrlColumn, and LayerFilter. Note If you do not include a path to the DWF file, this method assigns the first one it finds in the search path. For more information about using DWF files as data source for layers, see “Setting Up a Data Source for DWF Files” on page 25.
-
When you change the Autodesk DWF file, you may need to update several other properties. These properties include: SheetName, KeyTable, KeyColumn, KeyColumnType, NameTable, NameColumn, UrlTable, UrlColumn, and LayerFilter. Note If you do not include a path to the DWF file, this method assigns the first one it finds in the search path. For more information about using DWF files as data source for layers, see “Setting Up a Data Source for DWF Files” on page 25.
-
Returns String – Represents the name of the key column that contains the primary key for the map features. See Also setKeyColumn, KeyColumn setKeyColumn Method Syntax boolean setKeyColumn(String column) Description Sets the name of the column that contains the primary key for each map feature on the DWF layer. If this method is successful, it automatically sets the rebuild flag of the layer to True. For more information on the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help.
-
See Also getKeyColumn, KeyColumn KeyColumn Property Syntax String getKeyColumn() Description Gets and sets the name of the column that contains the primary key for each map feature on the DWF layer. For information about using key columns with DWF layers, see “Displaying Friendly Names and URLs” on page 31. Parameters none Returns String – Represents the name of the key column.
-
Description Gets the data type of the key column. You can set the data type to one of the following: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ String Numeric Decimal Integer SmallInt Float Double Date Time TimeStamp Boolean UnsignedInteger UnsignedSmallInt Byte UnsignedByte The API uses string values. The MWX data type (XML files) uses enumerated constants in the form of string expressions. It is recommended that you do not use Float or Double data types because of the inherent inaccuracies in comparing them.
-
setKeyColumnType Method Syntax boolean setKeyColumnType(String keyColumnType) Description Sets the data type of the key column. You can set the data type to one of the following: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ String Numeric Decimal Integer SmallInt Float Double Date Time TimeStamp Boolean UnsignedInteger UnsignedSmallInt Byte UnsignedByte It is recommended that you do not use Float or Double data types because of the inherent inaccuracies in comparing them.
-
Returns boolean – Specifies whether or not the data type of the key column is successfully set. True – Indicates that the data type of the key column is successfully set. False – Indicates that the data type of the key column is not set. Error Codes -1 Busy -3 Illegal Argument See Also getKeyColumnType, KeyColumnType KeyColumnType Property Syntax KeyColumnType Description Gets and sets the data type of the key column.
-
It is recommended that you do not use Float or Double types because of the inherent inaccuracies in comparing them. If this property is modified successfully, it automatically sets the rebuild flag of the layer to True. For more information on the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide Viewer API Help on the Program menu.
-
Parameters none Returns String – Represents the name of the column containing the names of the map features on the DWF layer. See Also setNameColumn, NameColumn setNameColumn Method Syntax boolean setNameColumn(String column) Description Sets the name of the column that contains the name of each map feature on the Autodesk DWF layer. If this method is successful, it sets the rebuild flag of this layer to True.
-
Error Codes -1 Busy See Also getNameColumn, NameColumn NameColumn Property Syntax NameColumn Description Gets and sets the name of the column that contains the name for each map feature on the Autodesk DWF layer. Returns an empty string if this property does not apply. If this property is modified successfully, it automatically sets the rebuild flag of the layer to True. For more information on the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help.
-
getUrlColumn Method Syntax String getUrlColumn() Description Gets the name of the column that contains the URL associated with each map feature on the Autodesk DWF layer. These URLs enable users to go to a Web page that is related to a map feature simply by double-clicking that feature. Typically, you store HTTP URLs in this column, but you could also specify commands with other protocols, such as FTP URLs, or JavaScript commands.
-
setRebuild in the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide Viewer API Help on the Program menu. These URLs enable the user to go to a Web page that is related to a map feature simply by double-clicking that feature. Typically, you store HTTP URLs in this column, but you could also specify commands with other protocols, such as FTP URLs, or even JavaScript commands.
-
Description Gets and sets the name of the column that contains the URLs associated with each map feature on the Autodesk DWF layer. If this method is successful, it sets the rebuild flag of the layer to True. Returns an empty string if this property does not apply. For more information on the rebuild flag, see setRebuild in the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.
-
Description Gets the layer filter that specifies which layers to extract from the specified Autodesk DWF file. Note The layer filter is a comma-delimited string. For more information about using DWF files as data sources, see “Setting Up a Data Source for DWF Files” on page 25. Parameters none Returns String – Represents the layer filter.
-
Parameters layerFilter – String (comma-delimited) representing the names of the layers to extract from the DWF file. For example, if a DWF sheet conists of 4 layers (blue, red, green, and yellow), and you only want to extract the red layer, you pass the “red” as the parameter to setLayerFilter. An empty layer filter string ("") applies all filter layers. Returns boolean – Specifies whether or not the layer filter is successfully set. True – Indicates that the filter is successfully set.
-
Parameters none Returns String (read/write) – Represents the layer filter. Error Codes -1 Busy See Also getLayerFilter, setLayerFilter getSheetName Method Syntax String getSheetName() Description Gets the name of the DWF sheet that contains the map features on this Autodesk DWF layer. DWF files consist of a number of sheets, each of which can contain a view of a different DWG file or a different view of the same DWG file, for example a layout with different layers turned on or off.
-
See Also setSheetName, getSheetName setSheetName Method Syntax boolean setSheetName(String sheetName) Description Sets the name of the DWF sheet that contains the map features on this Autodesk DWF layer. DWF files consist of a number of sheets, each of which can contain a view of a different DWG file or a different view of the same DWG file, for example a layout with different layers turned on or off. If this method is successful, it sets the rebuild flag of the layer to True.
-
See Also getSheetName, SheetName SheetName Property Syntax SheetName Description Sets the name of the DWF sheet that contains the map features on this Autodesk DWF layer. DWF files consist of a number of sheets, each of which can contain a view of a different DWG file or a different view of the same DWG file, for example a layout with different layers turned on or off. If this property is modified successfully, it automatically sets the rebuild flag of the layer to True.
-
9 Enhanced Layer Functionality API Additions This chapter documents the API changes that support the In this chapter new enhanced layer functionality in Autodesk MapGuide ■ Accessing the enhanced layer functionality API 6.5.
-
Accessing the Enhanced Layer Functionality API The enhanced layer functionality API is only available to layers that use a spatial data provider (SDP) or OLE database data source. To protect data sources against unwanted changes, map authors must provide passkey access for a layer before you can access the API for enhanced layer functionality. Map authors set up access to the API via the Map Layer Properties dialog box in Autodesk MapGuide Author.
-
MGMapLayerSetup Object The MGMapLayerSetup object provides run-time access to map layer setup through methods that you can use to change data source names and alter the way map features are linked to databases. For more information about the MGMapLayerSetup object, see the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide Viewer API Help on the Program menu.
-
Parameters none Returns String – Represents the geometry function that is applied to layer features. Returns an empty string if there is no geometry function. Error Codes -5 (Security Violation) -15 (Does not apply) -18 (Custom Spatial Query) See Also setGeometryFunction setGeometryFunction Method Syntax boolean setGeometryFunction(String function) Description Sets the geometry function text to apply to the geometry column of the SDP layer.
-
False – Indicates that the geometry function has not been set. Error Codes -5 (Security Violation) -15 (Does not apply) -18 (Custom Spatial Query) See Also getGeometryFunction getClipAdjust Method Syntax double getClipAdjust() Description Gets the clipping adjustment that is applied to the spatial filter of the layer.
-
Error Codes -5 (Security Violation) -15 (Does not apply) See Also setClipAdjust setClipAdjust Method Syntax boolean setClipAdjust(double adjust) Description Sets the clipping adjustment to apply to the spatial filter of the layer. You us the clipping adjustment to change the extents of the filter by increasing or decreasing the dimensions of the bounding box so that it is bigger or smaller than the default client window size.
-
Error Codes -1 (Busy) -5 (Security Violation) -15 (Does not apply) See Also getClipAdjust getClipEnabled Method Syntax boolean getClipEnabled() Description Specifies whether or not the Autodesk MapGuide spatial filtering is being applied to the layer. A value of True indicates that spatial filtering is enabled. A value of False indicates that spatial filtering is not enabled. A spatial filter reduces the geographic information returned by a spatial query to a particular geography.
-
See Also setClipEnabled setClipEnabled Method Syntax boolean setClipEnabled(boolean enabled) Description Sets a value that specifies whether or not to apply the MapGuide spatial filtering to the layer. A value of True applies spatial filtering to the layer. A value of False does not apply spatial filtering to the layer. A spatial filter reduces the geographic information, which is returned by a spatial query, to a particular geography.
-
See Also getClipEnabled getPreSQLStatements Method Syntax MGCollection getPreSQLStatements() Description Gets the pre-SQL statements that are applied to the layer. Pre-SQL statements are executed before Autodesk MapGuide performs a spatial query. You can use them to further customize your query results. For more information about applying pre-SQL statements to queries, see “Using SQL Pass-Through Statements” on page 55.
-
Description Adds the specified SQL statement to the end of the list of pre-SQL statements that are applied to the layer. Pre-SQL statements are executed before Autodesk MapGuide performs a spatial query. You can use them to further customize your query results. For more information about applying pre-SQL statements to queries, see “Using SQL Pass-Through Statements” on page 55. Parameters sql – String representing the SQL statement to add to the end of the list.
-
Pre-SQL statements are executed before Autodesk MapGuide performs a spatial query. You can use them to further customize your query results. For more information about applying pre-SQL statements to queries, see “Using SQL Pass-Through Statements” on page 55. Parameters None Returns boolean – Specifies whether or not the list of pre-SQL statements has been successfully cleared. True – Indicates that the list of pre-SQL statement was successfully cleared.
-
Parameters none Returns MGCollection – A list of strings representing the post-SQL statements that are applied to the query. Error Codes -5 (Security Violation) -15 (Does not apply) See Also addPostSQLStatement, clearPostSQLStatements addPostSQLStatement Method Syntax boolean addPostSQLStatement(String sql) Description Adds the specified SQL statement to the end of the list of post-SQL statements that is applied to the layer.
-
True – Indicates that the SQL statement was successfully added to the end of the list. False – Indicates that the SQL statement was not added to the end of the list. Error Codes -1 (Busy) clearPostSQLStatements Method Syntax boolean clearPostSQLStatements() Description Clears the list of post-SQL statements so that are not applied to the layer. Post-SQL statements are executed after Autodesk MapGuide performs a spatial query. You can use them to further customize your query results.
-
See Also getPostSQLStatements, addPostSQLStatement getSpatialQuery Method Syntax String getSpatialQuery() Description Gets the custom spatial query that is applied to the layer. A custom spatial query consists of user-defined SQL statements that you can use instead of the default Autodesk MapGuide spatial queries. You can use custom spatial queries if the parameters of the default spatial queries don’t include the restraints you need for your data.
-
Description Sets the custom spatial query to apply to the layer. Custom spatial queries consist of a set of user-defined SQL statements that you can use instead of the default Autodesk MapGuide spatial queries. You can use custom spatial queries if the parameters of the default spatial queries don’t include the restraints you need for your data. For more information about custom spatial queries, see “Using a Custom Spatial Query” on page 46.
-
queries. Custom spatial queries consist of complex and nested SQL statements, making it impossible to determine which column contains the specified attribute. For example, the following SQL statement is confusing. SELECT (SELECT B.F_ID FROM ALLTYPES B WHERE B.F_ID=A.F_ID), A.F_ID || ' - ' || A.F_NAME, A.F_ID, A.F_GEOM, A.F_NAME FROM ALLTYPES A The key column is (SELECT B.F_ID FROM ALLTYPES B WHERE B.F_ID=A.F_ID).
-
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ setSymbolAngleColumn getSymbolWidthColumn setSymbolWidthColumn getSymbolHeightColumn setSymbolHeightColumn getTextHeightColumn setTextHeightColumn getTextAngleColumn setTextAngleColumn getTextHorizAlignColumn setTextHorizAlignColumn getTextVertAlignColumn setTextVertAlignColumn For more information about these methods, see the Autodesk MapGuide Viewer API Help. You can access the MapGuide Viewer API Help by clicking Autodesk MapGuide 6.
-
168
-
Index Numerics -18 Custom Spatial Query error code defined 165 A acadmap.
-
F I file formats DWF 23 DWG 5 MWF 4 filters applying to spatial queries 42 changing dimensions 44 turning on/off 42 ini file (acadmap.
-
getSecondaryTable 111 getSheetName 148 getSourceType 128 getSpatialQuery 164 getSQLWhereClause 104 getThemeCategory 92 getThemeName 89 getTreatBlocksAsPoints 119 getTreatClosedPolylinesAsPolygons 116 getUrlColumn 143 getUrlSource 98 getWhereSource 101 isLinkedToSecondaryTable 107 saveAsDwf 124 setClipAdjust 156 setClipEnabled 158 setDataSource 130 setDwf 132 setGeometryFunction 154 setKeyColumn 135 setKeyColumnType 138 setLayerFilter 146 setNameColumn 141 setNameSource 96 setQueryCategory 87 setQueryName 85
-
WhereSource property 103 MGMap Object additions to 124 MGMapLayer object additions to 125 getLayerType method 125 LayerType property 126 MGMapLayerSetup Object additions to 153 addPostSQLStatements method 162 addPreSQLStatements method 159 clearPostSQLStatements method 163 clearPreSQLStatements method 160 getClipAdjust method 155 getClipEnabled method 157 getGeometryFunction method 153 getPostSQLStatements method 161 getPreSQLStatements method 159 getSpatialQuery method 164 new error code 166 setClipAdjust
-
setClipAdjust method 156 setClipEnabled method 158 setDataSource method 130 setDwf method 132 setGeometryFunction 154 setKeyColumn method 135 setKeyColumnType method 138 setLayerFilter method 146 setNameColumn method 141 setNameSource method 96 setQueryCategory method 87 setQueryName method 85 setSecondaryDataSource method 109 setSecondaryKeyColumn method 114 setSecondaryTable method 112 setSheetName method 149 setSpatialQuery method 164 setSQLWhereClause method 105 setSymbolAngleColumn method 166 setSymbol
-
174