Web Mapping Service
From MapGuide Best Practices Wiki
MapGuide Server is capable of consuming and publishing WMS layers. However there are some issues regarding coordinate systems and transparency that require some tweaking to behave as expected. MapGuide is currently trying to process all WMS requests using EPSG 4326 (Lat/Long).
Consuming:
The following link provides details in order to configure a WMS feature source to work with alternate EPSG codes or restrict which layers are available to MapGuide:
http://trac.osgeo.org/fdo/wiki/FdoWmsNotes
Note the above can also be used to force the <Transparent>TRUE</Transparent> setting for layers being consumed as WMS. It may be that FDO defaults changed in 2009 and the above setting is FALSE.
Publishing:
In order publish WMS layers in an alternate EPSG code the Administrator must modify the OgcWmsService.config.awd file found under the server\Wms folder of the MapGuide Server install.
1) MapGuide currently supports a single EPSG code for publishing WMS. This is controlled by the following entry (the ReferenceSystems) in the file mentioned above:
<Define item="ReferenceSystems">
<item>EPSG:4326</item>
</Define>
Specifying multiple entries above does not work as MapGuide only processes the first one.
2) A Mentor Code mapping may be needed to resolve an EPSG code that does not exist in the Mentor library.
<Define item="Parameter.SRS.ValueMap"> <translate from="LL84">EPSG:4326</translate> </Define>
To determine whether Mentor recognizes the EPSG code use the webtier test pages to see if the code can be resolved. Navigate to http://servername[:port]/mapguide[xxxx]/mapagent/index.html and select the Coordinate System option under Miscellaneous API. Use the ConvertEpsgCodeToWkt to see if a lookup is successful.
3) Default Bounds may need to be set. As a fallback the awd file has an entry for EPSG 4326 (LL84) to set bounds in case the properties on the layer are incorrect or missing. This default set of bounds may need to be overridden or commented out when an alternate EPSG code is used:
<Define item="Enum.item.SRS">EPSG:4326</Define> <Define item="Enum.item.north">90</Define> <Define item="Enum.item.south">-90</Define> <Define item="Enum.item.west">-180</Define> <Define item="Enum.item.east">180</Define>
4) No matching Mentor library entry. If the Mentor library does not contain an SRS for the EPSG code desired then an explicit entry can be defined after one already defined in the awd file:
<Define item="SRS.WKT.map"> <translate from="EPSG:21781">PROJCS["CH1903.LV03/01",GEOGCS["LLCH1903",DATUM["CH-1903",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[660.0770,13.5510,369.3440,0.804816,0.577692,0.952236,5.66000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Swiss_Oblique_Cylindrical"],PARAMETER["false_easting",600000.000],PARAMETER["false_northing",200000.000],PARAMETER["latitude_of_origin",46.95240555555556],PARAMETER["central_meridian",7.43958333333333],UNIT["Meter",1.00000000000000]]</translate> </Define>
Note changes to the .awd file require a restart of both the MapGuide Server and the Web Server.
