Lint removal

This commit is contained in:
Tim Schaub
2018-07-16 17:57:57 -06:00
parent f78d0d4cfa
commit d0ab8dce38
63 changed files with 2945 additions and 2917 deletions

View File

@@ -48,6 +48,143 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende
* @property {Array.<number>} whens
*/
/**
* @const
* @type {Array.<string>}
*/
const GX_NAMESPACE_URIS = [
'http://www.google.com/kml/ext/2.2'
];
/**
* @const
* @type {Array.<null|string>}
*/
const NAMESPACE_URIS = [
null,
'http://earth.google.com/kml/2.0',
'http://earth.google.com/kml/2.1',
'http://earth.google.com/kml/2.2',
'http://www.opengis.net/kml/2.2'
];
/**
* @const
* @type {string}
*/
const SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +
'https://developers.google.com/kml/schema/kml22gx.xsd';
/**
* @type {Object.<string, module:ol/style/IconAnchorUnits>}
*/
const ICON_ANCHOR_UNITS_MAP = {
'fraction': IconAnchorUnits.FRACTION,
'pixels': IconAnchorUnits.PIXELS,
'insetPixels': IconAnchorUnits.PIXELS
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const PLACEMARK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'ExtendedData': extendedDataParser,
'Region': regionParser,
'MultiGeometry': makeObjectPropertySetter(
readMultiGeometry, 'geometry'),
'LineString': makeObjectPropertySetter(
readLineString, 'geometry'),
'LinearRing': makeObjectPropertySetter(
readLinearRing, 'geometry'),
'Point': makeObjectPropertySetter(
readPoint, 'geometry'),
'Polygon': makeObjectPropertySetter(
readPolygon, 'geometry'),
'Style': makeObjectPropertySetter(readStyle),
'StyleMap': placemarkStyleMapParser,
'address': makeObjectPropertySetter(readString),
'description': makeObjectPropertySetter(readString),
'name': makeObjectPropertySetter(readString),
'open': makeObjectPropertySetter(readBoolean),
'phoneNumber': makeObjectPropertySetter(readString),
'styleUrl': makeObjectPropertySetter(readURI),
'visibility': makeObjectPropertySetter(readBoolean)
}, makeStructureNS(
GX_NAMESPACE_URIS, {
'MultiTrack': makeObjectPropertySetter(
readGxMultiTrack, 'geometry'),
'Track': makeObjectPropertySetter(
readGxTrack, 'geometry')
}
));
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const NETWORK_LINK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'ExtendedData': extendedDataParser,
'Region': regionParser,
'Link': linkParser,
'address': makeObjectPropertySetter(readString),
'description': makeObjectPropertySetter(readString),
'name': makeObjectPropertySetter(readString),
'open': makeObjectPropertySetter(readBoolean),
'phoneNumber': makeObjectPropertySetter(readString),
'visibility': makeObjectPropertySetter(readBoolean)
});
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const LINK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'href': makeObjectPropertySetter(readURI)
});
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const REGION_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'LatLonAltBox': latLonAltBoxParser,
'Lod': lodParser
});
/**
* @const
* @type {Object.<string, Array.<string>>}
*/
const KML_SEQUENCE = makeStructureNS(
NAMESPACE_URIS, [
'Document', 'Placemark'
]);
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Serializer>>}
*/
const KML_SERIALIZERS = makeStructureNS(
NAMESPACE_URIS, {
'Document': makeChildAppender(writeDocument),
'Placemark': makeChildAppender(writePlacemark)
});
/**
* @type {module:ol/color~Color}
*/
@@ -713,46 +850,6 @@ class KML {
inherits(KML, XMLFeature);
/**
* @const
* @type {Array.<string>}
*/
const GX_NAMESPACE_URIS = [
'http://www.google.com/kml/ext/2.2'
];
/**
* @const
* @type {Array.<null|string>}
*/
const NAMESPACE_URIS = [
null,
'http://earth.google.com/kml/2.0',
'http://earth.google.com/kml/2.1',
'http://earth.google.com/kml/2.2',
'http://www.opengis.net/kml/2.2'
];
/**
* @const
* @type {string}
*/
const SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +
'https://developers.google.com/kml/schema/kml22gx.xsd';
/**
* @type {Object.<string, module:ol/style/IconAnchorUnits>}
*/
const ICON_ANCHOR_UNITS_MAP = {
'fraction': IconAnchorUnits.FRACTION,
'pixels': IconAnchorUnits.PIXELS,
'insetPixels': IconAnchorUnits.PIXELS
};
/**
* @param {module:ol/style/Style|undefined} foundStyle Style.
* @param {string} name Name.
@@ -1723,17 +1820,6 @@ function extendedDataParser(node, objectStack) {
parseNode(EXTENDED_DATA_PARSERS, node, objectStack);
}
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const REGION_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'LatLonAltBox': latLonAltBoxParser,
'Lod': lodParser
});
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
@@ -1955,34 +2041,6 @@ function outerBoundaryIsParser(node, objectStack) {
}
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const NETWORK_LINK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'ExtendedData': extendedDataParser,
'Region': regionParser,
'Link': linkParser,
'address': makeObjectPropertySetter(readString),
'description': makeObjectPropertySetter(readString),
'name': makeObjectPropertySetter(readString),
'open': makeObjectPropertySetter(readBoolean),
'phoneNumber': makeObjectPropertySetter(readString),
'visibility': makeObjectPropertySetter(readBoolean)
});
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const LINK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'href': makeObjectPropertySetter(readURI)
});
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
@@ -2006,43 +2064,6 @@ function whenParser(node, objectStack) {
}
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
*/
const PLACEMARK_PARSERS = makeStructureNS(
NAMESPACE_URIS, {
'ExtendedData': extendedDataParser,
'Region': regionParser,
'MultiGeometry': makeObjectPropertySetter(
readMultiGeometry, 'geometry'),
'LineString': makeObjectPropertySetter(
readLineString, 'geometry'),
'LinearRing': makeObjectPropertySetter(
readLinearRing, 'geometry'),
'Point': makeObjectPropertySetter(
readPoint, 'geometry'),
'Polygon': makeObjectPropertySetter(
readPolygon, 'geometry'),
'Style': makeObjectPropertySetter(readStyle),
'StyleMap': placemarkStyleMapParser,
'address': makeObjectPropertySetter(readString),
'description': makeObjectPropertySetter(readString),
'name': makeObjectPropertySetter(readString),
'open': makeObjectPropertySetter(readBoolean),
'phoneNumber': makeObjectPropertySetter(readString),
'styleUrl': makeObjectPropertySetter(readURI),
'visibility': makeObjectPropertySetter(readBoolean)
}, makeStructureNS(
GX_NAMESPACE_URIS, {
'MultiTrack': makeObjectPropertySetter(
readGxMultiTrack, 'geometry'),
'Track': makeObjectPropertySetter(
readGxTrack, 'geometry')
}
));
/**
* Read the first feature from a KML source. MultiGeometries are converted into
* GeometryCollections if they are a mix of geometry types, and into MultiPoint/
@@ -2941,27 +2962,6 @@ function writeVec2(node, vec2) {
}
/**
* @const
* @type {Object.<string, Array.<string>>}
*/
const KML_SEQUENCE = makeStructureNS(
NAMESPACE_URIS, [
'Document', 'Placemark'
]);
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Serializer>>}
*/
const KML_SERIALIZERS = makeStructureNS(
NAMESPACE_URIS, {
'Document': makeChildAppender(writeDocument),
'Placemark': makeChildAppender(writePlacemark)
});
/**
* Encode an array of features in the KML format. GeometryCollections, MultiPoints,
* MultiLineStrings, and MultiPolygons are output as MultiGeometries.