Named exports from ol/format/XLink
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/format/OWS
|
* @module ol/format/OWS
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import XLink from '../format/XLink.js';
|
import {readHref} from '../format/XLink.js';
|
||||||
import XML from '../format/XML.js';
|
import XML from '../format/XML.js';
|
||||||
import XSD from '../format/XSD.js';
|
import XSD from '../format/XSD.js';
|
||||||
import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop} from '../xml.js';
|
import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop} from '../xml.js';
|
||||||
@@ -193,7 +193,7 @@ const SERVICE_PROVIDER_PARSERS =
|
|||||||
makeStructureNS(
|
makeStructureNS(
|
||||||
NAMESPACE_URIS, {
|
NAMESPACE_URIS, {
|
||||||
'ProviderName': makeObjectPropertySetter(XSD.readString),
|
'ProviderName': makeObjectPropertySetter(XSD.readString),
|
||||||
'ProviderSite': makeObjectPropertySetter(XLink.readHref),
|
'ProviderSite': makeObjectPropertySetter(readHref),
|
||||||
'ServiceContact': makeObjectPropertySetter(
|
'ServiceContact': makeObjectPropertySetter(
|
||||||
readServiceContact)
|
readServiceContact)
|
||||||
});
|
});
|
||||||
@@ -288,7 +288,7 @@ function readDcp(node, objectStack) {
|
|||||||
* @return {Object|undefined} The GET object.
|
* @return {Object|undefined} The GET object.
|
||||||
*/
|
*/
|
||||||
function readGet(node, objectStack) {
|
function readGet(node, objectStack) {
|
||||||
const href = XLink.readHref(node);
|
const href = readHref(node);
|
||||||
if (!href) {
|
if (!href) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/format/WMSCapabilities
|
* @module ol/format/WMSCapabilities
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import XLink from '../format/XLink.js';
|
import {readHref} from '../format/XLink.js';
|
||||||
import XML from '../format/XML.js';
|
import XML from '../format/XML.js';
|
||||||
import XSD from '../format/XSD.js';
|
import XSD from '../format/XSD.js';
|
||||||
import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
|
import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
|
||||||
@@ -73,7 +73,7 @@ const SERVICE_PARSERS = makeStructureNS(
|
|||||||
'Title': makeObjectPropertySetter(XSD.readString),
|
'Title': makeObjectPropertySetter(XSD.readString),
|
||||||
'Abstract': makeObjectPropertySetter(XSD.readString),
|
'Abstract': makeObjectPropertySetter(XSD.readString),
|
||||||
'KeywordList': makeObjectPropertySetter(readKeywordList),
|
'KeywordList': makeObjectPropertySetter(readKeywordList),
|
||||||
'OnlineResource': makeObjectPropertySetter(XLink.readHref),
|
'OnlineResource': makeObjectPropertySetter(readHref),
|
||||||
'ContactInformation': makeObjectPropertySetter(readContactInformation),
|
'ContactInformation': makeObjectPropertySetter(readContactInformation),
|
||||||
'Fees': makeObjectPropertySetter(XSD.readString),
|
'Fees': makeObjectPropertySetter(XSD.readString),
|
||||||
'AccessConstraints': makeObjectPropertySetter(XSD.readString),
|
'AccessConstraints': makeObjectPropertySetter(XSD.readString),
|
||||||
@@ -168,7 +168,7 @@ const LAYER_PARSERS = makeStructureNS(
|
|||||||
const ATTRIBUTION_PARSERS = makeStructureNS(
|
const ATTRIBUTION_PARSERS = makeStructureNS(
|
||||||
NAMESPACE_URIS, {
|
NAMESPACE_URIS, {
|
||||||
'Title': makeObjectPropertySetter(XSD.readString),
|
'Title': makeObjectPropertySetter(XSD.readString),
|
||||||
'OnlineResource': makeObjectPropertySetter(XLink.readHref),
|
'OnlineResource': makeObjectPropertySetter(readHref),
|
||||||
'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource)
|
'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource)
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ const STYLE_PARSERS = makeStructureNS(
|
|||||||
const FORMAT_ONLINERESOURCE_PARSERS =
|
const FORMAT_ONLINERESOURCE_PARSERS =
|
||||||
makeStructureNS(NAMESPACE_URIS, {
|
makeStructureNS(NAMESPACE_URIS, {
|
||||||
'Format': makeObjectPropertySetter(XSD.readString),
|
'Format': makeObjectPropertySetter(XSD.readString),
|
||||||
'OnlineResource': makeObjectPropertySetter(XLink.readHref)
|
'OnlineResource': makeObjectPropertySetter(readHref)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import {boundingExtent} from '../extent.js';
|
import {boundingExtent} from '../extent.js';
|
||||||
import OWS from '../format/OWS.js';
|
import OWS from '../format/OWS.js';
|
||||||
import XLink from '../format/XLink.js';
|
import {readHref} from '../format/XLink.js';
|
||||||
import XML from '../format/XML.js';
|
import XML from '../format/XML.js';
|
||||||
import XSD from '../format/XSD.js';
|
import XSD from '../format/XSD.js';
|
||||||
import {pushParseAndPop, makeStructureNS,
|
import {pushParseAndPop, makeStructureNS,
|
||||||
@@ -344,7 +344,7 @@ function readWgs84BoundingBox(node, objectStack) {
|
|||||||
function readLegendUrl(node, objectStack) {
|
function readLegendUrl(node, objectStack) {
|
||||||
const legend = {};
|
const legend = {};
|
||||||
legend['format'] = node.getAttribute('format');
|
legend['format'] = node.getAttribute('format');
|
||||||
legend['href'] = XLink.readHref(node);
|
legend['href'] = readHref(node);
|
||||||
return legend;
|
return legend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/format/XLink
|
* @module ol/format/XLink
|
||||||
*/
|
*/
|
||||||
const XLink = {};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,7 +14,6 @@ const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
|
|||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @return {boolean|undefined} Boolean.
|
* @return {boolean|undefined} Boolean.
|
||||||
*/
|
*/
|
||||||
XLink.readHref = function(node) {
|
export function readHref(node) {
|
||||||
return node.getAttributeNS(NAMESPACE_URI, 'href');
|
return node.getAttributeNS(NAMESPACE_URI, 'href');
|
||||||
};
|
}
|
||||||
export default XLink;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user