Changes between Version 3 and Version 4 of FdoWmsNotes


Ignore:
Timestamp:
Feb 14, 2008, 3:36:32 PM (16 years ago)
Author:
amorsell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FdoWmsNotes

    v3 v4  
    120120}}}
    121121 
     122The Layer section can be repeated as many times as required.
     123
     124== Specifying Multiple Feature Classes ==
     125A 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.
     126
     127Three 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.
     128
     129{{{
     130
     131<?xml version="1.0" encoding="UTF-8"?>
     132<DataStore xmlns:fdo="http://fdo.osgeo.org/schemas" xmlns:gml="http://www.opengis.net/gml" 
     133xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     134xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://fdo.osgeo.org/schemas" 
     135xsi:schemaLocation="http://fdo.osgeo.org/schemas
     136 FdoDocument.xsd">
     137  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
     138targetNamespace="http://fdo.osgeo.org/schemas/feature/WMS" xmlns:fdo="http://fdo.osgeo.org/schemas" 
     139xmlns:WMS="http://fdo.osgeo.org/schemas/feature/WMS" elementFormDefault="qualified" 
     140attributeFormDefault="unqualified">
     141    <xs:element name="%FeatureClassName%" type="WMS:%FeatureClassName%Type" abstract="false" 
     142substitutionGroup="gml:_Feature">
     143      <xs:key name="%FeatureClassName%Key">
     144        <xs:selector xpath=".//%FeatureClassName%"/>
     145        <xs:field xpath="Id"/>
     146      </xs:key>
     147    </xs:element>
     148    <xs:element name="%FeatureClassName2%" type="WMS:%FeatureClassName2%Type" abstract="false" 
     149substitutionGroup="gml:_Feature">
     150      <xs:key name="%FeatureClassName2%Key">
     151        <xs:selector xpath=".//%FeatureClassName2%"/>
     152        <xs:field xpath="Id"/>
     153      </xs:key>
     154    </xs:element>
     155    <xs:complexType name="%FeatureClassName%Type" abstract="false">
     156      <xs:complexContent>
     157        <xs:extension base="gml:AbstractFeatureType">
     158          <xs:sequence>
     159            <xs:element name="Id">
     160              <xs:simpleType>
     161                <xs:restriction base="xs:string">
     162                  <xs:maxLength value="256"/>
     163                </xs:restriction>
     164              </xs:simpleType>
     165            </xs:element>
     166            <xs:element name="Image" type="fdo:RasterPropertyType" fdo:defaultImageXSize="800" 
     167fdo:defaultImageYSize="600">
     168              <xs:annotation>
     169                <xs:appinfo source="http://fdo.osgeo.org/schemas">
     170                  <fdo:DefaultDataModel organization="Row" bitsPerPixel="32" tileSizeX="100" 
     171tileSizeY="100"/>
     172                </xs:appinfo>
     173              </xs:annotation>
     174            </xs:element>
     175          </xs:sequence>
     176        </xs:extension>
     177      </xs:complexContent>
     178    </xs:complexType>
     179    <xs:complexType name="%FeatureClassName2%Type" abstract="false">
     180      <xs:complexContent>
     181        <xs:extension base="gml:AbstractFeatureType">
     182          <xs:sequence>
     183            <xs:element name="Id">
     184              <xs:simpleType>
     185                <xs:restriction base="xs:string">
     186                  <xs:maxLength value="256"/>
     187                </xs:restriction>
     188              </xs:simpleType>
     189            </xs:element>
     190            <xs:element name="Image" type="fdo:RasterPropertyType" fdo:defaultImageXSize="800" 
     191fdo:defaultImageYSize="600">
     192              <xs:annotation>
     193                <xs:appinfo source="http://fdo.osgeo.org/schemas">
     194                  <fdo:DefaultDataModel organization="Row" bitsPerPixel="32" tileSizeX="100" 
     195tileSizeY="100"/>
     196                </xs:appinfo>
     197              </xs:annotation>
     198            </xs:element>
     199          </xs:sequence>
     200        </xs:extension>
     201      </xs:complexContent>
     202    </xs:complexType>
     203  </xs:schema>
     204  <SchemaMapping provider="OSGeo.WMS.3.1" name="WMS" xmlns="http://fdowms.osgeo.org/schemas">
     205    <complexType name="%FeatureClassName%Type">
     206      <RasterDefinition name="Image">
     207        <Format>PNG</Format>
     208        <Transparent>true</Transparent>
     209        <BackgroundColor>0xFFFFFF</BackgroundColor>
     210        <Time>current</Time>
     211        <Elevation>0</Elevation>
     212        <SpatialContext>EPSG:4326</SpatialContext>
     213        <Layer name="%LayerName%">
     214          <Style/>
     215        </Layer>
     216      </RasterDefinition>
     217    </complexType>
     218    <complexType name="%FeatureClassName2%Type">
     219      <RasterDefinition name="Image">
     220        <Format>PNG</Format>
     221        <Transparent>true</Transparent>
     222        <BackgroundColor>0xFFFFFF</BackgroundColor>
     223        <Time>current</Time>
     224        <Elevation>0</Elevation>
     225        <SpatialContext>EPSG:4326</SpatialContext>
     226        <Layer name="%LayerName2%">
     227          <Style/>
     228        </Layer>
     229      </RasterDefinition>
     230    </complexType>
     231  </SchemaMapping>
     232</DataStore>
     233
     234}}}