MapGuide API Extensions v5.0

 

Download GUI Control

The SDF Download Control is a general purpose clipping tool that enables the user to:
 

  • choose whether to download all layers or selected layers,
  • define the coverage of the download: all objects, selected object or windowed object,
  • select to output all data to a single file or separate files for each layer,
  • output the vectors in latitude/longitude or the Mapping Coordinate System (MCS),
  • select the output file and format (SHP, SDF, DXF, HGIS POL).

This control requires the MapGuide SDF Component Toolkit DLL (sdfcomtk.dll) to be registered on the client's computer. The client must download the Toolkit from the Autodesk website (www.mapguide.com), install the Toolkit, and register the DLL by entering the following command in the Windows Run menu:

 C:\Windows\System\Regsvr32.exe  C:\Program Files\Autodesk\SdfComTk4\Bin\sdfcomtk.dll

Alternatively, you could permit the user to download the DLL from your website. Version 4.0 of the control uses SDF Component Toolkit v4.0; Version 5.0 requires SDF Component Toolkit v5.0.

The control appears as a clickable button:

HgisDownloadGUI

The button may be sized through the BoxWidth and BoxHeight parameters while the label is set through the ButtonLabel parameter. Clicking on the button pulls up the following menu:

HgisDownloadMenu

The control's features may be summarized as follows:

Function Description
Layers
Layer List Lists the layers that are in the MWF. Recorded for each layer are:
Name Click on a layer name to select that layer for clipping
Type Type of layer
Visible Indicates whether layer is visible at the current scale
Locked Indicates whether the vertices are accessible through the Viewewr API
Selectable Inidcates whether layer objects can be selected
Clipping Parameters
Coverage Defines the extent of the clipping:
  • All Objects - All Layers
  • All Objects - Selected Layers
  • Selected Objects - All Layers
  • Selected Objects - Selected Layers
  • Windowed Objects - All Layers
  • Windowed Objects - Selected Layers
Note that if either of the windowed objects options is selected, then only objects that intersect with the current display window are extracted. Objects are not clipped to the window; refer to the HgisClipPoly control for that capability.
Output Data The extracted data may be output to a single file, or separate files can be generated for each layer.
Coordinates The extracted data may be output in longitude/latitude coordinates or in Mapping Coordinate System (MCS) units, depending upon the output file format (HGIS POL supports MCS only).
Text Labels: Height Defines the label height of text layers, expressed in the same units as Coordinates. Text layer objects are output as labels to DXF files only; for other file types, the text layer objects are output as points.
File/Directory The full pathname of a file to which the data is to be output. The extension of the file determines the output format (.sdf, .dxf, .shp or .pol). If the data is to be output to separate files for each layer, then the filename will be stripped off to obtain the subdirectory name.
... Browse. Presents the Common File Dialog to permit the user to select an output file.
Command Buttons
Write to File(s) Initiates the download process. The current object and layer that is processed is presented in the taskbar located at the bottom of the control.
Close Initiates the download process. The current object and layer that is processed is presented in the taskbar located at the bottom of the control.

Loading the Control

Instructions for implementing the control on web pages are provided with the Toolkit documentation.

Methods

A complete list of the public methods is provided with the Toolkit documentation.

 © 2002, Hunter GIS