Changes between Version 6 and Version 7 of FdoWmsNotes


Ignore:
Timestamp:
Feb 14, 2008, 4:12:12 PM (16 years ago)
Author:
amorsell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FdoWmsNotes

    v6 v7  
    11
    2 = Overriding WMS Settings for MapGuide Open Source Consumption =
    3 
    4 Configuration of WMS feature sources within MapGuide Open Source is generally done using one of the commercial (such as Autodesk MapGuide Studio) or open source (such as Webstudio) GUI's.  Unfortunately, these GUI's currently do not allow the overriding of configuration information used in the WMS requests.  Examples of these configuration options include:
     2= Overriding WMS Settings for !MapGuide Open Source Consumption =
     3'''If you wish, you can download a PDF version of this document at the bottom of the page.'''
     4
     5Configuration of WMS feature sources within !MapGuide Open Source is generally done using one of the commercial (such as Autodesk !MapGuide Studio) or open source (such as Webstudio) GUI's.  Unfortunately, these GUI's currently do not allow the overriding of configuration information used in the WMS requests.  Examples of these configuration options include:
    56
    67 * Image transparency
     
    89 * Image background color
    910 * Coordinate system
    10  * Displaying of multiple WMS layers in a single MapGuide layer
     11 * Displaying of multiple WMS layers in a single !MapGuide layer
    1112
    1213= Configuration Document =
    1314
    14 This section describes how to create the configuration document for the MapGuide WMS feature source.
     15This section describes how to create the configuration document for the !MapGuide WMS feature source.
    1516
    1617== Get the Capabilities Document ==
    17 Before anything can be done, you should get the capabilities document for the WMS service. This document contains the list of all the layers and possible values that can be used for the configuration parameters. To do this: Start a web browser and go to the location http://<WMSServiceAddress>?service=wms&request=GetCapabilities
     18Before anything can be done, you should get the capabilities document for the WMS service. This document contains the list of all the layers and possible values that can be used for the configuration parameters. To do this: Start a web browser and go to the location http://<WMSServiceAddress>?service=wms&request=!GetCapabilities
    1819
    1920== Basic Configuration Document ==
     
    7879
    7980Substitute %!LayerName% with the name of the WMS layer that you want to display. For example, if the following entry occurs in WMS capabilities document:
    80 <Layer queryable="1" opaque="0" noSubsets="0">
    81     <Name>theLayerName</Name>
    82     <Title>The layer title</Title>
    83 </Layer>
     81 <Layer queryable="1" opaque="0" noSubsets="0">
     82   <Name>theLayerName</Name>[[BR]]
     83   <Title>The layer title</Title>
     84 </Layer>
    8485then substitute %!LayerName% with theLayerName.
    8586
    8687At the end of the document are the following configuration parameters that can be adjusted as appropriate:
    8788 * Format – used to specify the image type.  The possible values here are in the WMS capabilities document in the GetMap section.  Do not include the “image/” part of the format here.  That is, if the desired format is specified in the WMS capabilities document as “image/png”, put “png” in the configuration document.
    88  * Transparent – if the WMS Service supports transparency then specifying true here will make the background of the returned image transparent.  This transparency is preserved in MapGuide so any layers that this WMS layer is placed over will show through the transparent regions.
     89 * Transparent – if the WMS Service supports transparency then specifying true here will make the background of the returned image transparent.  This transparency is preserved in !MapGuide so any layers that this WMS layer is placed over will show through the transparent regions.
    8990 * !BackgroundColor – if the WMS Service supports specifying background colors, set the RGB value (e.g., 0xFFFFFF=white, 0x000000=black, 0x0000FF=blue, 0xFF0000=red, 0x00FF00=green), here for the color.
    9091 * Time – time value of the desired WMS layers.
     
    9596Once the substitutions have been made save the file.
    9697
    97 == Multiple WMS Layers in a Single MapGuide Layer ==
    98 To get multiple WMS layers in a single MapGuide layer, it is enough to specify multiple Layer tags in the configuration document.  When the resulting feature class (i.e., name substituted for %!FeatureClassName%) is specified in a layer, the layer will display all of the specified WMS layers. The following XML snippet shows how the multiple layers are specified:
     98== Multiple WMS Layers in a Single !MapGuide Layer ==
     99To get multiple WMS layers in a single !MapGuide layer, it is enough to specify multiple Layer tags in the configuration document.  When the resulting feature class (i.e., name substituted for %!FeatureClassName%) is specified in a layer, the layer will display all of the specified WMS layers. The following XML snippet shows how the multiple layers are specified:
    99100
    100101{{{
     
    123124
    124125== Specifying Multiple Feature Classes ==
    125 A WMS service typically serves multiple layers. Using the basic configuration document approach above it is a lot of work to expose the layers because one feature source per WMS layer would need to be created. The following describes how to specify more than one feature class per MapGuide WMS feature source; a feature class corresponds to a set of WMS layers that can be displayed in a single MapGuide layer. Note that for each feature class, multiple WMS layers could also be specified as described in the Multiple WMS Layers in a Single MapGuide Layer section.
     126A WMS service typically serves multiple layers. Using the basic configuration document approach above it is a lot of work to expose the layers because one feature source per WMS layer would need to be created. The following describes how to specify more than one feature class per !MapGuide WMS feature source; a feature class corresponds to a set of WMS layers that can be displayed in a single !MapGuide layer. Note that for each feature class, multiple WMS layers could also be specified as described in the Multiple WMS Layers in a Single !MapGuide Layer section.
    126127
    127128Three sections need to be replicated in order to create another feature class. The replicated sections are in bold below.  The sequence of the sections is important.
     
    221222}}}
    222223
    223 = Creating a MapGuide WMS Feature Source =
    224 This section describes how to create a MapGuide WMS feature source that will be associated with the configuration document.
     224= Creating a !MapGuide WMS Feature Source =
     225This section describes how to create a !MapGuide WMS feature source that will be associated with the configuration document.
    225226== Creating the Feature Source Document ==
    226227To create the feature source document, copy the follow XML to a text editor:
     
    243244
    244245Save the file.
    245 == Creating the Feature Source in MapGuide ==
    246 The next step is to upload the feature source document onto the MapGuide site.  The steps to do this are as follows:
    247  1. Start a web browser and go to the location http://<machinename>/mapguide/mapagent/index.html, where machinename is the location in which MapGuide is installed.
     246== Creating the Feature Source in !MapGuide ==
     247The next step is to upload the feature source document onto the !MapGuide site.  The steps to do this are as follows:
     248 1. Start a web browser and go to the location http://<machinename>/mapguide/mapagent/index.html, where machinename is the location in which !MapGuide is installed.
    248249 2. Click on the SetResource link in the left frame. A SETRESOURCE form will appear in the right frame.
    249250 3. In the Resource ID field, type the name of the resource that you want to create. Make sure that the name ends with .FeatureSource. The resource name is case-sensitive.
     
    251252 5. Leave the Header field blank.
    252253 6. Click Submit on the SETRESOURCE form.
    253  7. If you have not authenticated yet with the MapGuide site, a login dialog will appear.  Enter the credentials of a MapGuide author or administrator user.
     254 7. If you have not authenticated yet with the !MapGuide site, a login dialog will appear.  Enter the credentials of a !MapGuide author or administrator user.
    254255
    255256After completing the steps above, a blank web page will take the place of the SETRESOURCE form.
     
    257258= Attaching the Configuration Document =
    258259This section describes how to attach the configuration document created above to the feature source.
    259  1. Start a web browser and go to the location http://<machinename>/mapguide/mapagent/index.html, where machinename is the location in which MapGuide is installed. Figure 1 above shows how the web page should look.
     260 1. Start a web browser and go to the location http://<machinename>/mapguide/mapagent/index.html, where machinename is the location in which !MapGuide is installed. Figure 1 above shows how the web page should look.
    260261 2. Click on the SetResourceData link in the left frame. A SETRESOURCEDATA form will appear in the right frame.
    261262 3. In the Resource ID field, type the name of the resource to which you want to add the configuration document. This is the same feature source resource that you created above. The resource name is case sensitive.
     
    264265 6. For the Data field, browse to the location of the configuration document that you created above.
    265266 7. Click Submit on the SETRESOURCEDATA form.
    266  8. If you have not authenticated yet with the MapGuide site, a login dialog will come up. Enter the credentials of a MapGuide author or administrator user.
     267 8. If you have not authenticated yet with the !MapGuide site, a login dialog will come up. Enter the credentials of a !MapGuide author or administrator user.
    267268
    268269After completing the steps above, a blank web page will take the place of the SETRESOURCEDATA form.