added WFSCapabilities format. Original patch by tschaub, r=tschaub,me
(closes #1988) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
1 parent
043bbab2ca
commit
e3103362ee
6 files changed
+315
-2
No files matched your search
@@ -216,6 +216,10 @@
|
||||
"OpenLayers/Format/KML.js",
|
||||
"OpenLayers/Format/GeoRSS.js",
|
||||
"OpenLayers/Format/WFS.js",
|
||||
"OpenLayers/Format/WFSCapabilities.js",
|
||||
"OpenLayers/Format/WFSCapabilities/v1.js",
|
||||
"OpenLayers/Format/WFSCapabilities/v1_0_0.js",
|
||||
"OpenLayers/Format/WFSCapabilities/v1_1_0.js",
|
||||
"OpenLayers/Format/WFSDescribeFeatureType.js",
|
||||
"OpenLayers/Format/WMSDescribeLayer.js",
|
||||
"OpenLayers/Format/WMSDescribeLayer/v1_1.js",
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* @requires OpenLayers/Format/WFSCapabilities.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Format.WFSCapabilities.v1
|
||||
* Abstract class not to be instantiated directly.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format.XML>
|
||||
*/
|
||||
OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class(
|
||||
OpenLayers.Format.WFSCapabilities, {
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Format.WFSCapabilities.v1_1
|
||||
* Create an instance of one of the subclasses.
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} An optional object whose properties will be set on
|
||||
* this instance.
|
||||
*/
|
||||
initialize: function(options) {
|
||||
OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
|
||||
this.options = options;
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: read
|
||||
* Read capabilities data from a string, and return a list of layers.
|
||||
*
|
||||
* Parameters:
|
||||
* data - {String} or {DOMElement} data to read/parse.
|
||||
*
|
||||
* Returns:
|
||||
* {Array} List of named layers.
|
||||
*/
|
||||
read: function(data) {
|
||||
if(typeof data == "string") {
|
||||
data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
|
||||
}
|
||||
var capabilities = {};
|
||||
var root = data.documentElement;
|
||||
this.runChildNodes(capabilities, root);
|
||||
return capabilities;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: runChildNodes
|
||||
*/
|
||||
runChildNodes: function(obj, node) {
|
||||
var children = node.childNodes;
|
||||
var childNode, processor;
|
||||
for(var i=0; i<children.length; ++i) {
|
||||
childNode = children[i];
|
||||
if(childNode.nodeType == 1) {
|
||||
processor = this["read_cap_" + childNode.nodeName];
|
||||
if(processor) {
|
||||
processor.apply(this, [obj, childNode]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_FeatureTypeList
|
||||
*/
|
||||
read_cap_FeatureTypeList: function(request, node) {
|
||||
var featureTypeList = {
|
||||
featureTypes: []
|
||||
};
|
||||
this.runChildNodes(featureTypeList, node);
|
||||
request.featureTypeList = featureTypeList;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_FeatureType
|
||||
*/
|
||||
read_cap_FeatureType: function(featureTypeList, node, parentLayer) {
|
||||
var featureType = {};
|
||||
this.runChildNodes(featureType, node);
|
||||
featureTypeList.featureTypes.push(featureType);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_Name
|
||||
*/
|
||||
read_cap_Name: function(obj, node) {
|
||||
var name = this.getChildValue(node);
|
||||
if(name) {
|
||||
obj.name = name;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_Title
|
||||
*/
|
||||
read_cap_Title: function(obj, node) {
|
||||
var title = this.getChildValue(node);
|
||||
if(title) {
|
||||
obj.title = title;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_Abstract
|
||||
*/
|
||||
read_cap_Abstract: function(obj, node) {
|
||||
var abst = this.getChildValue(node);
|
||||
if(abst) {
|
||||
obj["abstract"] = abst;
|
||||
}
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1"
|
||||
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @requires OpenLayers/Format/WFSCapabilities/v1.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Format.WFSCapabilities/v1_0_0
|
||||
* Read WMS Capabilities version 1.0.0.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format.WFSCapabilities>
|
||||
*/
|
||||
OpenLayers.Format.WFSCapabilities.v1_0_0 = OpenLayers.Class(
|
||||
OpenLayers.Format.WFSCapabilities.v1, {
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Format.WFSCapabilities.v1_0_0
|
||||
* Create a new parser for WFS capabilities version 1.0.0.
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} An optional object whose properties will be set on
|
||||
* this instance.
|
||||
*/
|
||||
initialize: function(options) {
|
||||
OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(
|
||||
this, [options]
|
||||
);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_0_0"
|
||||
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @requires OpenLayers/Format/WFSCapabilities/v1.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Format.WFSCapabilities/v1_1_0
|
||||
* Read WFS Capabilities version 1.1.0.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Format.WFSCapabilities>
|
||||
*/
|
||||
OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class(
|
||||
OpenLayers.Format.WFSCapabilities.v1, {
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Format.WFSCapabilities.v1_1_0
|
||||
* Create a new parser for WFS capabilities version 1.1.0.
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} An optional object whose properties will be set on
|
||||
* this instance.
|
||||
*/
|
||||
initialize: function(options) {
|
||||
OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(
|
||||
this, [options]
|
||||
);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0"
|
||||
|
||||
});
|
||||
@@ -0,0 +1,128 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_read(t) {
|
||||
t.plan(11);
|
||||
|
||||
var parser = new OpenLayers.Format.WFSCapabilities();
|
||||
|
||||
// GeoServer, v1.1.0
|
||||
var text = '<?xml version="1.0" encoding="UTF-8"?><wfs:WFS_Capabilities version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:80/geoserver/schemas/wfs/1.1.0/wfs.xsd" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:tiger="http://www.census.gov" xmlns:sde="http://geoserver.sf.net" xmlns:topp="http://www.openplans.org/topp" xmlns:sf="http://www.openplans.org/spearfish" xmlns:nurc="http://www.nurc.nato.int" updateSequence="57"><ows:ServiceIdentification><ows:Title>GeoServer Web Feature Service</ows:Title><ows:Abstract>This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.</ows:Abstract><ows:Keywords><ows:Keyword>WFS</ows:Keyword><ows:Keyword>WMS</ows:Keyword><ows:Keyword>GEOSERVER</ows:Keyword></ows:Keywords><ows:ServiceType>WFS</ows:ServiceType><ows:ServiceTypeVersion>1.1.0</ows:ServiceTypeVersion><ows:Fees>NONE</ows:Fees><ows:AccessConstraints>NONE</ows:AccessConstraints></ows:ServiceIdentification><ows:ServiceProvider><ows:ProviderName>The ancient geographes INC</ows:ProviderName><ows:ServiceContact><ows:IndividualName>Claudius Ptolomaeus</ows:IndividualName><ows:PositionName>Chief geographer</ows:PositionName><ows:ContactInfo><ows:Phone><ows:Voice/><ows:Facsimile/></ows:Phone><ows:Address><ows:City>Alexandria</ows:City><ows:AdministrativeArea/><ows:PostalCode/><ows:Country>Egypt</ows:Country></ows:Address></ows:ContactInfo></ows:ServiceContact></ows:ServiceProvider><ows:OperationsMetadata><ows:Operation name="GetCapabilities"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="AcceptVersions"><ows:Value>1.0.0</ows:Value><ows:Value>1.1.0</ows:Value></ows:Parameter><ows:Parameter name="AcceptFormats"><ows:Value>text/xml</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="DescribeFeatureType"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="outputFormat"><ows:Value>text/xml; subtype=gml/3.1.1</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="GetFeature"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="resultType"><ows:Value>results</ows:Value><ows:Value>hits</ows:Value></ows:Parameter><ows:Parameter name="outputFormat"><ows:Value>text/xml; subtype=gml/3.1.1</ows:Value><ows:Value>GML2</ows:Value><ows:Value>GML2-GZIP</ows:Value><ows:Value>SHAPE-ZIP</ows:Value><ows:Value>csv</ows:Value><ows:Value>gml3</ows:Value><ows:Value>json</ows:Value><ows:Value>text/xml; subtype=gml/2.1.2</ows:Value></ows:Parameter><ows:Constraint name="LocalTraverseXLinkScope"><ows:Value>2</ows:Value></ows:Constraint></ows:Operation><ows:Operation name="GetGmlObject"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP></ows:Operation><ows:Operation name="LockFeature"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="releaseAction"><ows:Value>ALL</ows:Value><ows:Value>SOME</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="GetFeatureWithLock"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="resultType"><ows:Value>results</ows:Value><ows:Value>hits</ows:Value></ows:Parameter><ows:Parameter name="outputFormat"><ows:Value>text/xml; subtype=gml/3.1.1</ows:Value><ows:Value>GML2</ows:Value><ows:Value>GML2-GZIP</ows:Value><ows:Value>SHAPE-ZIP</ows:Value><ows:Value>csv</ows:Value><ows:Value>gml3</ows:Value><ows:Value>json</ows:Value><ows:Value>text/xml; subtype=gml/2.1.2</ows:Value></ows:Parameter></ows:Operation><ows:Operation name="Transaction"><ows:DCP><ows:HTTP><ows:Get xlink:href="http://localhost:80/geoserver/wfs?"/><ows:Post xlink:href="http://localhost:80/geoserver/wfs?"/></ows:HTTP></ows:DCP><ows:Parameter name="inputFormat"><ows:Value>text/xml; subtype=gml/3.1.1</ows:Value></ows:Parameter><ows:Parameter name="idgen"><ows:Value>GenerateNew</ows:Value><ows:Value>UseExisting</ows:Value><ows:Value>ReplaceDuplicate</ows:Value></ows:Parameter><ows:Parameter name="releaseAction"><ows:Value>ALL</ows:Value><ows:Value>SOME</ows:Value></ows:ParameLine truncated
|
||||
var res = parser.read(text);
|
||||
var ft = res.featureTypeList.featureTypes;
|
||||
t.eq(ft.length, 14, "number of feature types correct");
|
||||
t.eq(ft[0]["abstract"], "Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs", "abstract of first feature type correct");
|
||||
t.eq(ft[0]["title"], "Manhattan (NY) landmarks", "title of first feature type correct");
|
||||
t.eq(ft[0]["name"], "tiger:poly_landmarks", "name of first feature type correct");
|
||||
|
||||
// GeoServer, v1.0.0
|
||||
text = '<?xml version="1.0" encoding="UTF-8"?><WFS_Capabilities version="1.0.0" xmlns="http://www.opengis.net/wfs" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:tiger="http://www.census.gov" xmlns:sde="http://geoserver.sf.net" xmlns:topp="http://www.openplans.org/topp" xmlns:sf="http://www.openplans.org/spearfish" xmlns:nurc="http://www.nurc.nato.int" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:80/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd"><Service><Name>WFS</Name><Title>GeoServer Web Feature Service</Title><Abstract>This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.</Abstract><Keywords>WFS, WMS, GEOSERVER</Keywords><OnlineResource>http://localhost:80/geoserver/wfs</OnlineResource><Fees>NONE</Fees><AccessConstraints>NONE</AccessConstraints></Service><Capability><Request><GetCapabilities><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetCapabilities"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetCapabilities><DescribeFeatureType><SchemaDescriptionLanguage><XMLSCHEMA/></SchemaDescriptionLanguage><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=DescribeFeatureType"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></DescribeFeatureType><GetFeature><ResultFormat><GML2/><SHAPE-ZIP/><GEOJSON/><csv/><GML3/></ResultFormat><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetFeature"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetFeature><Transaction><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=Transaction"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></Transaction><LockFeature><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=LockFeature"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></LockFeature><GetFeatureWithLock><ResultFormat><GML2/></ResultFormat><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetFeatureWithLock"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetFeatureWithLock></Request></Capability><FeatureTypeList><Operations><Query/><Insert/><Update/><Delete/><Lock/></Operations><FeatureType><Name>tiger:poly_landmarks</Name><Title>Manhattan (NY) landmarks</Title><Abstract>Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs</Abstract><Keywords>DS_poly_landmarks, poly_landmarks, landmarks, manhattan</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.047185" miny="40.679648" maxx="-73.90782" maxy="40.882078"/></FeatureType><FeatureType><Name>tiger:poi</Name><Title>Manhattan (NY) points of interest</Title><Abstract>Points of interest in New York, New York (on Manhattan). One of the attributes contains the name of a file with a picture of the point of interest.</Abstract><Keywords>poi, DS_poi, points_of_interest, Manhattan</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.0118315772888" miny="40.70754683896324" maxx="-74.00857344353275" maxy="40.711945649065406"/></FeatureType><FeatureType><Name>tiger:tiger_roads</Name><Title>Manhattan (NY) roads</Title><Abstract>Highly simplified road layout of Manhattan in New York..</Abstract><Keywords>DS_tiger_roads, tiger_roads, roads</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.02722" miny="40.684221" maxx="-73.907005" maxy="40.878178"/></FeatureType><FeatureType><Name>sf:archsites</Name><Title>Spearfish archeological sites</Title><Abstract>Sample data from GRASS, archeological sites location, Spearfish, South Dakota, USA</Abstract><Keywords>archsites, sfArchsites, spearfish, archeology</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.8725637911543" miny="44.37740330855979" maxx="-103.63794182141925" maxy="44.48804280772808"/></FeatureType><FeatureType><Name>sf:bugsites</Name><Title>Spearfish bug locations</Title><Abstract>Sample data from GRASS, bug sites location, Spearfish, South Dakota, USA</Abstract><Keywords>sfBugsites, bugsites, insects, spearfish, tiger_beetles</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.86796131703647" miny="44.373938816704396" maxx="-103.63773523234195" maxy="44.43418821380063"/></FeatureType><FeatureType><Name>sf:restricted</Name><Title>Spearfish restricted areas</Title><Abstract>Sample data from GRASS, restricted areas, Spearfish, South Dakota, USA</Abstract><Keywords>restricted, sfRestricted, spearfish, areas</Keywords><SRS>EPSG:26713</SRS><LatLongBounLine truncated
|
||||
res = parser.read(text);
|
||||
ft = res.featureTypeList.featureTypes;
|
||||
t.eq(ft.length, 14, "number of feature types correct");
|
||||
t.eq(ft[0]["abstract"], "Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs", "abstract of first feature type correct");
|
||||
t.eq(ft[0]["title"], "Manhattan (NY) landmarks", "title of first feature type correct");
|
||||
t.eq(ft[0]["name"], "tiger:poly_landmarks", "name of first feature type correct");
|
||||
|
||||
// UMN Mapserer, v1.0.0
|
||||
text =
|
||||
'<?xml version="1.0" encoding="ISO-8859-1" ?>' +
|
||||
'<WFS_Capabilities' +
|
||||
' version="1.0.0"' +
|
||||
' updateSequence="0"' +
|
||||
' xmlns="http://www.opengis.net/wfs"' +
|
||||
' xmlns:ogc="http://www.opengis.net/ogc"' +
|
||||
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
|
||||
' xsi:schemaLocation="http://www.opengis.net/wfs http://ogc.dmsolutions.ca/wfs/1.0.0/WFS-capabilities.xsd">' +
|
||||
'' +
|
||||
'<!-- MapServer version 4.0 (development) OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->' +
|
||||
'' +
|
||||
'<Service>' +
|
||||
' <Name>MapServer WFS</Name>' +
|
||||
' <Title>GMap WMS Demo Server</Title>' +
|
||||
' <OnlineResource>http://127.0.0.1/cgi-bin/mapserv_40?map=/msroot/apache/htdocs/gmap/htdocs/gmap75_wfs.map&service=WFS&</OnlineResource>' +
|
||||
'</Service>' +
|
||||
'' +
|
||||
'<Capability>' +
|
||||
' <Request>' +
|
||||
' <GetCapabilities>' +
|
||||
' <DCPType>' +
|
||||
' <HTTP>' +
|
||||
' <Get onlineResource="http://127.0.0.1/cgi-bin/mapserv_40?map=/msroot/apache/htdocs/gmap/htdocs/gmap75_wfs.map&service=WFS&" />' +
|
||||
' </HTTP>' +
|
||||
' </DCPType>' +
|
||||
' </GetCapabilities>' +
|
||||
'' +
|
||||
' <DescribeFeatureType>' +
|
||||
' <SchemaDescriptionLanguage>' +
|
||||
' <XMLSCHEMA/>' +
|
||||
' </SchemaDescriptionLanguage>' +
|
||||
' <DCPType>' +
|
||||
' <HTTP>' +
|
||||
' <Get onlineResource="http://127.0.0.1/cgi-bin/mapserv_40?map=/msroot/apache/htdocs/gmap/htdocs/gmap75_wfs.map&service=WFS&" />' +
|
||||
' </HTTP>' +
|
||||
' </DCPType>' +
|
||||
'' +
|
||||
' </DescribeFeatureType>' +
|
||||
' <GetFeature>' +
|
||||
' <ResultFormat>' +
|
||||
' <GML2/>' +
|
||||
' </ResultFormat>' +
|
||||
' <DCPType>' +
|
||||
' <HTTP>' +
|
||||
' <Get onlineResource="http://127.0.0.1/cgi-bin/mapserv_40?map=/msroot/apache/htdocs/gmap/htdocs/gmap75_wfs.map&service=WFS&" />' +
|
||||
' </HTTP>' +
|
||||
'' +
|
||||
' </DCPType>' +
|
||||
' </GetFeature>' +
|
||||
' </Request>' +
|
||||
'</Capability>' +
|
||||
'' +
|
||||
'<FeatureTypeList>' +
|
||||
' <Operations>' +
|
||||
' <Query/>' +
|
||||
' </Operations>' +
|
||||
' <FeatureType>' +
|
||||
'' +
|
||||
' <Name>park</Name>' +
|
||||
' <Title>Parks</Title>' +
|
||||
' <SRS>EPSG:42304</SRS>' +
|
||||
' <LatLongBoundingBox minx="-173.433" miny="41.4271" maxx="-13.3643" maxy="83.7466" />' +
|
||||
' </FeatureType>' +
|
||||
' <FeatureType>' +
|
||||
' <Name>popplace</Name>' +
|
||||
'' +
|
||||
' <Title>Cities</Title>' +
|
||||
' <SRS>EPSG:42304</SRS>' +
|
||||
' <LatLongBoundingBox minx="-172.301" miny="36.3541" maxx="-12.9698" maxy="83.4832" />' +
|
||||
' </FeatureType>' +
|
||||
'</FeatureTypeList>' +
|
||||
'' +
|
||||
'<ogc:Filter_Capabilities>' +
|
||||
' <ogc:Spatial_Capabilities>' +
|
||||
' <ogc:Spatial_Operators>' +
|
||||
'' +
|
||||
' <ogc:BBOX/>' +
|
||||
' </ogc:Spatial_Operators>' +
|
||||
' </ogc:Spatial_Capabilities>' +
|
||||
' <!-- Provide some ScalarCapabilties just for the XML to validate against the schema even if we don\'t support any. (Yes this is stupid!) -->' +
|
||||
' <ogc:Scalar_Capabilities>' +
|
||||
' <ogc:Logical_Operators />' +
|
||||
' </ogc:Scalar_Capabilities>' +
|
||||
'</ogc:Filter_Capabilities>' +
|
||||
'' +
|
||||
'</WFS_Capabilities>';
|
||||
res = parser.read(text);
|
||||
var ft = res.featureTypeList.featureTypes;
|
||||
t.eq(ft.length, 2, "number of feature types correct");
|
||||
t.eq(ft[0]["title"], "Parks", "title of first feature type correct");
|
||||
t.eq(ft[0]["name"], "park", "name of first feature type correct");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -59,9 +59,10 @@
|
||||
<li>Format/Filter/v1.html</li>
|
||||
<li>Format/Filter/v1_0_0.html</li>
|
||||
<li>Format/Filter/v1_1_0.html</li>
|
||||
<li>Format/WFSDescribeFeatureType.html</li>
|
||||
<li>Format/WMSDescribeLayer.html</li>
|
||||
<li>Format/WFS.html</li>
|
||||
<li>Format/WFSCapabilities.html</li>
|
||||
<li>Format/WFSCapabilities/v1.html</li>
|
||||
<li>Format/WFSDescribeFeatureType.html</li>
|
||||
<li>Format/WFST.html</li>
|
||||
<li>Format/WFST/v1.html</li>
|
||||
<li>Format/WFST/v1_0_0.html</li>
|
||||
@@ -72,6 +73,7 @@
|
||||
<li>Format/WMC/v1.html</li>
|
||||
<li>Format/WMSCapabilities.html</li>
|
||||
<li>Format/WMSCapabilities/v1_1_1.html</li>
|
||||
<li>Format/WMSDescribeLayer.html</li>
|
||||
<li>Format/WMSGetFeatureInfo.html</li>
|
||||
<li>Format/XML.html</li>
|
||||
<li>Geometry.html</li>
|
||||
|
||||
Reference in new issue
Block a user