Merge pull request #12718 from tschaub/wms-caps

Rename function to avoid minification failure
This commit is contained in:
Tim Schaub
2021-09-07 14:40:49 -06:00
committed by GitHub
5 changed files with 26 additions and 26 deletions

View File

@@ -28,7 +28,7 @@ import {includes} from '../array.js';
import { import {
readDateTime, readDateTime,
readDecimal, readDecimal,
readNonNegativeInteger, readPositiveInteger,
readString, readString,
writeDateTimeTextNode, writeDateTimeTextNode,
writeDecimalTextNode, writeDecimalTextNode,
@@ -262,7 +262,7 @@ const RTE_PARSERS = makeStructureNS(NAMESPACE_URIS, {
'desc': makeObjectPropertySetter(readString), 'desc': makeObjectPropertySetter(readString),
'src': makeObjectPropertySetter(readString), 'src': makeObjectPropertySetter(readString),
'link': parseLink, 'link': parseLink,
'number': makeObjectPropertySetter(readNonNegativeInteger), 'number': makeObjectPropertySetter(readPositiveInteger),
'extensions': parseExtensions, 'extensions': parseExtensions,
'type': makeObjectPropertySetter(readString), 'type': makeObjectPropertySetter(readString),
'rtept': parseRtePt, 'rtept': parseRtePt,
@@ -289,7 +289,7 @@ const TRK_PARSERS = makeStructureNS(NAMESPACE_URIS, {
'desc': makeObjectPropertySetter(readString), 'desc': makeObjectPropertySetter(readString),
'src': makeObjectPropertySetter(readString), 'src': makeObjectPropertySetter(readString),
'link': parseLink, 'link': parseLink,
'number': makeObjectPropertySetter(readNonNegativeInteger), 'number': makeObjectPropertySetter(readPositiveInteger),
'type': makeObjectPropertySetter(readString), 'type': makeObjectPropertySetter(readString),
'extensions': parseExtensions, 'extensions': parseExtensions,
'trkseg': parseTrkSeg, 'trkseg': parseTrkSeg,
@@ -332,12 +332,12 @@ const WPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {
'sym': makeObjectPropertySetter(readString), 'sym': makeObjectPropertySetter(readString),
'type': makeObjectPropertySetter(readString), 'type': makeObjectPropertySetter(readString),
'fix': makeObjectPropertySetter(readString), 'fix': makeObjectPropertySetter(readString),
'sat': makeObjectPropertySetter(readNonNegativeInteger), 'sat': makeObjectPropertySetter(readPositiveInteger),
'hdop': makeObjectPropertySetter(readDecimal), 'hdop': makeObjectPropertySetter(readDecimal),
'vdop': makeObjectPropertySetter(readDecimal), 'vdop': makeObjectPropertySetter(readDecimal),
'pdop': makeObjectPropertySetter(readDecimal), 'pdop': makeObjectPropertySetter(readDecimal),
'ageofdgpsdata': makeObjectPropertySetter(readDecimal), 'ageofdgpsdata': makeObjectPropertySetter(readDecimal),
'dgpsid': makeObjectPropertySetter(readNonNegativeInteger), 'dgpsid': makeObjectPropertySetter(readPositiveInteger),
'extensions': parseExtensions, 'extensions': parseExtensions,
}); });

View File

@@ -24,8 +24,8 @@ import {assert} from '../asserts.js';
import {assign} from '../obj.js'; import {assign} from '../obj.js';
import {get as getProjection} from '../proj.js'; import {get as getProjection} from '../proj.js';
import { import {
readNonNegativeInteger,
readNonNegativeIntegerString, readNonNegativeIntegerString,
readPositiveInteger,
writeStringTextNode, writeStringTextNode,
} from './xsd.js'; } from './xsd.js';
@@ -51,14 +51,14 @@ const FEATURE_COLLECTION_PARSERS = {
*/ */
const TRANSACTION_SUMMARY_PARSERS = { const TRANSACTION_SUMMARY_PARSERS = {
'http://www.opengis.net/wfs': { 'http://www.opengis.net/wfs': {
'totalInserted': makeObjectPropertySetter(readNonNegativeInteger), 'totalInserted': makeObjectPropertySetter(readPositiveInteger),
'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger), 'totalUpdated': makeObjectPropertySetter(readPositiveInteger),
'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger), 'totalDeleted': makeObjectPropertySetter(readPositiveInteger),
}, },
'http://www.opengis.net/wfs/2.0': { 'http://www.opengis.net/wfs/2.0': {
'totalInserted': makeObjectPropertySetter(readNonNegativeInteger), 'totalInserted': makeObjectPropertySetter(readPositiveInteger),
'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger), 'totalUpdated': makeObjectPropertySetter(readPositiveInteger),
'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger), 'totalDeleted': makeObjectPropertySetter(readPositiveInteger),
}, },
}; };

View File

@@ -13,8 +13,8 @@ import {
readBooleanString, readBooleanString,
readDecimal, readDecimal,
readDecimalString, readDecimalString,
readNonNegativeInteger,
readNonNegativeIntegerString, readNonNegativeIntegerString,
readPositiveInteger,
readString, readString,
} from './xsd.js'; } from './xsd.js';
import {readHref} from './xlink.js'; import {readHref} from './xlink.js';
@@ -94,9 +94,9 @@ const SERVICE_PARSERS = makeStructureNS(NAMESPACE_URIS, {
'ContactInformation': makeObjectPropertySetter(readContactInformation), 'ContactInformation': makeObjectPropertySetter(readContactInformation),
'Fees': makeObjectPropertySetter(readString), 'Fees': makeObjectPropertySetter(readString),
'AccessConstraints': makeObjectPropertySetter(readString), 'AccessConstraints': makeObjectPropertySetter(readString),
'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger), 'LayerLimit': makeObjectPropertySetter(readPositiveInteger),
'MaxWidth': makeObjectPropertySetter(readNonNegativeInteger), 'MaxWidth': makeObjectPropertySetter(readPositiveInteger),
'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger), 'MaxHeight': makeObjectPropertySetter(readPositiveInteger),
}); });
/** /**

View File

@@ -11,7 +11,7 @@ import {
makeStructureNS, makeStructureNS,
pushParseAndPop, pushParseAndPop,
} from '../xml.js'; } from '../xml.js';
import {readDecimal, readNonNegativeInteger, readString} from './xsd.js'; import {readDecimal, readPositiveInteger, readString} from './xsd.js';
import {readHref} from './xlink.js'; import {readHref} from './xlink.js';
/** /**
@@ -150,10 +150,10 @@ const TMS_LIMITS_LIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {
// @ts-ignore // @ts-ignore
const TMS_LIMITS_PARSERS = makeStructureNS(NAMESPACE_URIS, { const TMS_LIMITS_PARSERS = makeStructureNS(NAMESPACE_URIS, {
'TileMatrix': makeObjectPropertySetter(readString), 'TileMatrix': makeObjectPropertySetter(readString),
'MinTileRow': makeObjectPropertySetter(readNonNegativeInteger), 'MinTileRow': makeObjectPropertySetter(readPositiveInteger),
'MaxTileRow': makeObjectPropertySetter(readNonNegativeInteger), 'MaxTileRow': makeObjectPropertySetter(readPositiveInteger),
'MinTileCol': makeObjectPropertySetter(readNonNegativeInteger), 'MinTileCol': makeObjectPropertySetter(readPositiveInteger),
'MaxTileCol': makeObjectPropertySetter(readNonNegativeInteger), 'MaxTileCol': makeObjectPropertySetter(readPositiveInteger),
}); });
/** /**
@@ -210,10 +210,10 @@ const TM_PARSERS = makeStructureNS(
{ {
'TopLeftCorner': makeObjectPropertySetter(readCoordinates), 'TopLeftCorner': makeObjectPropertySetter(readCoordinates),
'ScaleDenominator': makeObjectPropertySetter(readDecimal), 'ScaleDenominator': makeObjectPropertySetter(readDecimal),
'TileWidth': makeObjectPropertySetter(readNonNegativeInteger), 'TileWidth': makeObjectPropertySetter(readPositiveInteger),
'TileHeight': makeObjectPropertySetter(readNonNegativeInteger), 'TileHeight': makeObjectPropertySetter(readPositiveInteger),
'MatrixWidth': makeObjectPropertySetter(readNonNegativeInteger), 'MatrixWidth': makeObjectPropertySetter(readPositiveInteger),
'MatrixHeight': makeObjectPropertySetter(readNonNegativeInteger), 'MatrixHeight': makeObjectPropertySetter(readPositiveInteger),
}, },
makeStructureNS(OWS_NAMESPACE_URIS, { makeStructureNS(OWS_NAMESPACE_URIS, {
'Identifier': makeObjectPropertySetter(readString), 'Identifier': makeObjectPropertySetter(readString),

View File

@@ -63,7 +63,7 @@ export function readDecimalString(string) {
* @param {Node} node Node. * @param {Node} node Node.
* @return {number|undefined} Non negative integer. * @return {number|undefined} Non negative integer.
*/ */
export function readNonNegativeInteger(node) { export function readPositiveInteger(node) {
const s = getAllTextContent(node, false); const s = getAllTextContent(node, false);
return readNonNegativeIntegerString(s); return readNonNegativeIntegerString(s);
} }