@@ -24,7 +24,11 @@ import {
2424 * @const
2525 * @type {Array<null|string> }
2626 */
27- const NAMESPACE_URIS = [ null , 'http://www.opengis.net/wms' ] ;
27+ const NAMESPACE_URIS = [
28+ null ,
29+ 'http://www.opengis.net/wms' ,
30+ 'http://www.opengis.net/sld' ,
31+ ] ;
2832
2933function isV13 ( objectStack ) {
3034 return compareVersions ( objectStack [ 0 ] . version , '1.3' ) >= 0 ;
@@ -40,34 +44,20 @@ const PARSERS = makeStructureNS(NAMESPACE_URIS, {
4044 'Capability' : makeObjectPropertySetter ( readCapability ) ,
4145} ) ;
4246
43- const COMMON_CAPABILITY_PARSERS = {
44- 'Request' : makeObjectPropertySetter ( readRequest ) ,
45- 'Exception' : makeObjectPropertySetter ( readException ) ,
46- 'Layer' : makeObjectPropertySetter ( readCapabilityLayer ) ,
47- } ;
48-
4947/**
5048 * @const
5149 * @type {Object<string, Object<string, import("../xml.js").Parser>> }
5250 */
5351// @ts -ignore
5452const CAPABILITY_PARSERS = makeStructureNS ( NAMESPACE_URIS , {
55- ...COMMON_CAPABILITY_PARSERS ,
53+ 'Request' : makeObjectPropertySetter ( readRequest ) ,
54+ 'Exception' : makeObjectPropertySetter ( readException ) ,
55+ 'Layer' : makeObjectPropertySetter ( readCapabilityLayer ) ,
5656 'UserDefinedSymbolization' : makeObjectPropertySetter (
5757 readUserDefinedSymbolization ,
5858 ) ,
5959} ) ;
6060
61- /**
62- * @const
63- * @type {Object<string, Object<string, import("../xml.js").Parser>> }
64- */
65- // @ts -ignore
66- const CAPABILITY_PARSERS_V13 = makeStructureNS (
67- NAMESPACE_URIS ,
68- COMMON_CAPABILITY_PARSERS ,
69- ) ;
70-
7161/**
7262 * @typedef {Object } RootObject
7363 * @property {string } version Version
@@ -267,6 +257,8 @@ const REQUEST_PARSERS = makeStructureNS(NAMESPACE_URIS, {
267257 'GetCapabilities' : makeObjectPropertySetter ( readOperationType ) ,
268258 'GetMap' : makeObjectPropertySetter ( readOperationType ) ,
269259 'GetFeatureInfo' : makeObjectPropertySetter ( readOperationType ) ,
260+ 'DescribeLayer' : makeObjectPropertySetter ( readOperationType ) ,
261+ 'GetLegendGraphic' : makeObjectPropertySetter ( readOperationType ) ,
270262} ) ;
271263
272264/**
@@ -342,12 +334,14 @@ function readAttribution(node, objectStack) {
342334
343335function readUserDefinedSymbolization ( node , objectStack ) {
344336 return {
345- 'SupportSLD' : ! ! readBooleanString (
346- node . getAttribute ( 'UserDefinedSymbolization' ) ,
347- ) ,
337+ 'SupportSLD' : ! ! readBooleanString ( node . getAttribute ( 'SupportSLD' ) ) ,
348338 'UserLayer' : ! ! readBooleanString ( node . getAttribute ( 'UserLayer' ) ) ,
349339 'UserStyle' : ! ! readBooleanString ( node . getAttribute ( 'UserStyle' ) ) ,
350340 'RemoteWFS' : ! ! readBooleanString ( node . getAttribute ( 'RemoteWFS' ) ) ,
341+ 'InlineFeatureData' : ! ! readBooleanString (
342+ node . getAttribute ( 'InlineFeatureData' ) ,
343+ ) ,
344+ 'RemoteWCS' : ! ! readBooleanString ( node . getAttribute ( 'RemoteWCS' ) ) ,
351345 } ;
352346}
353347
@@ -436,13 +430,9 @@ function readEXGeographicBoundingBox(node, objectStack) {
436430 * @param {Array<*> } objectStack Object stack.
437431 * @return {Object|undefined } Capability object.
438432 */
433+ //ts-ignore
439434function readCapability ( node , objectStack ) {
440- return pushParseAndPop (
441- { } ,
442- isV13 ( objectStack ) ? CAPABILITY_PARSERS_V13 : CAPABILITY_PARSERS ,
443- node ,
444- objectStack ,
445- ) ;
435+ return pushParseAndPop ( { } , CAPABILITY_PARSERS , node , objectStack ) ;
446436}
447437
448438/**
0 commit comments