Rename goog.DEBUG to ol.DEBUG
This commit is contained in:
@@ -144,8 +144,8 @@ ol.format.EsriJSON.convertRings_ = function(rings, layout) {
|
||||
* @return {ol.geom.Geometry} Point.
|
||||
*/
|
||||
ol.format.EsriJSON.readPointGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(typeof object.x === 'number', 'object.x should be number');
|
||||
goog.DEBUG && console.assert(typeof object.y === 'number', 'object.y should be number');
|
||||
ol.DEBUG && console.assert(typeof object.x === 'number', 'object.x should be number');
|
||||
ol.DEBUG && console.assert(typeof object.y === 'number', 'object.y should be number');
|
||||
var point;
|
||||
if (object.m !== undefined && object.z !== undefined) {
|
||||
point = new ol.geom.Point([object.x, object.y, object.z, object.m],
|
||||
@@ -169,9 +169,9 @@ ol.format.EsriJSON.readPointGeometry_ = function(object) {
|
||||
* @return {ol.geom.Geometry} LineString.
|
||||
*/
|
||||
ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(Array.isArray(object.paths),
|
||||
ol.DEBUG && console.assert(Array.isArray(object.paths),
|
||||
'object.paths should be an array');
|
||||
goog.DEBUG && console.assert(object.paths.length === 1,
|
||||
ol.DEBUG && console.assert(object.paths.length === 1,
|
||||
'object.paths array length should be 1');
|
||||
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
|
||||
return new ol.geom.LineString(object.paths[0], layout);
|
||||
@@ -184,9 +184,9 @@ ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
|
||||
* @return {ol.geom.Geometry} MultiLineString.
|
||||
*/
|
||||
ol.format.EsriJSON.readMultiLineStringGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(Array.isArray(object.paths),
|
||||
ol.DEBUG && console.assert(Array.isArray(object.paths),
|
||||
'object.paths should be an array');
|
||||
goog.DEBUG && console.assert(object.paths.length > 1,
|
||||
ol.DEBUG && console.assert(object.paths.length > 1,
|
||||
'object.paths array length should be more than 1');
|
||||
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
|
||||
return new ol.geom.MultiLineString(object.paths, layout);
|
||||
@@ -228,7 +228,7 @@ ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
|
||||
* @return {ol.geom.Geometry} MultiPolygon.
|
||||
*/
|
||||
ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.rings.length > 1,
|
||||
ol.DEBUG && console.assert(object.rings.length > 1,
|
||||
'object.rings should have length larger than 1');
|
||||
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
|
||||
return new ol.geom.MultiPolygon(
|
||||
@@ -243,7 +243,7 @@ ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
|
||||
* @return {ol.geom.Geometry} Polygon.
|
||||
*/
|
||||
ol.format.EsriJSON.readPolygonGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.rings);
|
||||
ol.DEBUG && console.assert(object.rings);
|
||||
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
|
||||
return new ol.geom.Polygon(object.rings, layout);
|
||||
};
|
||||
@@ -469,7 +469,7 @@ ol.format.EsriJSON.prototype.readFeatures;
|
||||
ol.format.EsriJSON.prototype.readFeatureFromObject = function(
|
||||
object, opt_options) {
|
||||
var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);
|
||||
goog.DEBUG && console.assert(esriJSONFeature.geometry ||
|
||||
ol.DEBUG && console.assert(esriJSONFeature.geometry ||
|
||||
esriJSONFeature.attributes,
|
||||
'geometry or attributes should be defined');
|
||||
var geometry = ol.format.EsriJSON.readGeometry_(esriJSONFeature.geometry,
|
||||
@@ -481,7 +481,7 @@ ol.format.EsriJSON.prototype.readFeatureFromObject = function(
|
||||
feature.setGeometry(geometry);
|
||||
if (opt_options && opt_options.idField &&
|
||||
esriJSONFeature.attributes[opt_options.idField]) {
|
||||
goog.DEBUG && console.assert(
|
||||
ol.DEBUG && console.assert(
|
||||
typeof esriJSONFeature.attributes[opt_options.idField] === 'number',
|
||||
'objectIdFieldName value should be a number');
|
||||
feature.setId(/** @type {number} */(
|
||||
|
||||
@@ -86,7 +86,7 @@ ol.format.GeoJSON.readGeometry_ = function(object, opt_options) {
|
||||
*/
|
||||
ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
|
||||
object, opt_options) {
|
||||
goog.DEBUG && console.assert(object.type == 'GeometryCollection',
|
||||
ol.DEBUG && console.assert(object.type == 'GeometryCollection',
|
||||
'object.type should be GeometryCollection');
|
||||
var geometries = object.geometries.map(
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
|
||||
* @return {ol.geom.Point} Point.
|
||||
*/
|
||||
ol.format.GeoJSON.readPointGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'Point',
|
||||
ol.DEBUG && console.assert(object.type == 'Point',
|
||||
'object.type should be Point');
|
||||
return new ol.geom.Point(object.coordinates);
|
||||
};
|
||||
@@ -118,7 +118,7 @@ ol.format.GeoJSON.readPointGeometry_ = function(object) {
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
*/
|
||||
ol.format.GeoJSON.readLineStringGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'LineString',
|
||||
ol.DEBUG && console.assert(object.type == 'LineString',
|
||||
'object.type should be LineString');
|
||||
return new ol.geom.LineString(object.coordinates);
|
||||
};
|
||||
@@ -130,7 +130,7 @@ ol.format.GeoJSON.readLineStringGeometry_ = function(object) {
|
||||
* @return {ol.geom.MultiLineString} MultiLineString.
|
||||
*/
|
||||
ol.format.GeoJSON.readMultiLineStringGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'MultiLineString',
|
||||
ol.DEBUG && console.assert(object.type == 'MultiLineString',
|
||||
'object.type should be MultiLineString');
|
||||
return new ol.geom.MultiLineString(object.coordinates);
|
||||
};
|
||||
@@ -142,7 +142,7 @@ ol.format.GeoJSON.readMultiLineStringGeometry_ = function(object) {
|
||||
* @return {ol.geom.MultiPoint} MultiPoint.
|
||||
*/
|
||||
ol.format.GeoJSON.readMultiPointGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'MultiPoint',
|
||||
ol.DEBUG && console.assert(object.type == 'MultiPoint',
|
||||
'object.type should be MultiPoint');
|
||||
return new ol.geom.MultiPoint(object.coordinates);
|
||||
};
|
||||
@@ -154,7 +154,7 @@ ol.format.GeoJSON.readMultiPointGeometry_ = function(object) {
|
||||
* @return {ol.geom.MultiPolygon} MultiPolygon.
|
||||
*/
|
||||
ol.format.GeoJSON.readMultiPolygonGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'MultiPolygon',
|
||||
ol.DEBUG && console.assert(object.type == 'MultiPolygon',
|
||||
'object.type should be MultiPolygon');
|
||||
return new ol.geom.MultiPolygon(object.coordinates);
|
||||
};
|
||||
@@ -166,7 +166,7 @@ ol.format.GeoJSON.readMultiPolygonGeometry_ = function(object) {
|
||||
* @return {ol.geom.Polygon} Polygon.
|
||||
*/
|
||||
ol.format.GeoJSON.readPolygonGeometry_ = function(object) {
|
||||
goog.DEBUG && console.assert(object.type == 'Polygon',
|
||||
ol.DEBUG && console.assert(object.type == 'Polygon',
|
||||
'object.type should be Polygon');
|
||||
return new ol.geom.Polygon(object.coordinates);
|
||||
};
|
||||
@@ -384,7 +384,7 @@ ol.format.GeoJSON.prototype.readFeatures;
|
||||
ol.format.GeoJSON.prototype.readFeatureFromObject = function(
|
||||
object, opt_options) {
|
||||
var geoJSONFeature = /** @type {GeoJSONFeature} */ (object);
|
||||
goog.DEBUG && console.assert(geoJSONFeature.type == 'Feature',
|
||||
ol.DEBUG && console.assert(geoJSONFeature.type == 'Feature',
|
||||
'geoJSONFeature.type should be Feature');
|
||||
var geometry = ol.format.GeoJSON.readGeometry_(geoJSONFeature.geometry,
|
||||
opt_options);
|
||||
|
||||
@@ -100,9 +100,9 @@ ol.format.GML2.prototype.readFlatCoordinates_ = function(node, objectStack) {
|
||||
* @return {ol.Extent|undefined} Envelope.
|
||||
*/
|
||||
ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Box', 'localName should be Box');
|
||||
ol.DEBUG && console.assert(node.localName == 'Box', 'localName should be Box');
|
||||
/** @type {Array.<number>} */
|
||||
var flatCoordinates = ol.xml.pushParseAndPop([null],
|
||||
this.BOX_PARSERS_, node, objectStack, this);
|
||||
@@ -118,9 +118,9 @@ ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'innerBoundaryIs',
|
||||
ol.DEBUG && console.assert(node.localName == 'innerBoundaryIs',
|
||||
'localName should be innerBoundaryIs');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -128,9 +128,9 @@ ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length larger than 0');
|
||||
flatLinearRings.push(flatLinearRing);
|
||||
}
|
||||
@@ -143,9 +143,9 @@ ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'outerBoundaryIs',
|
||||
ol.DEBUG && console.assert(node.localName == 'outerBoundaryIs',
|
||||
'localName should be outerBoundaryIs');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -153,9 +153,9 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length larger than 0');
|
||||
flatLinearRings[0] = flatLinearRing;
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ ol.format.GML3.schemaLocation_ = ol.format.GMLBase.GMLNS +
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiCurve',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiCurve',
|
||||
'localName should be MultiCurve');
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
var lineStrings = ol.xml.pushParseAndPop([],
|
||||
@@ -112,9 +112,9 @@ ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiSurface',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiSurface',
|
||||
'localName should be MultiSurface');
|
||||
/** @type {Array.<ol.geom.Polygon>} */
|
||||
var polygons = ol.xml.pushParseAndPop([],
|
||||
@@ -135,9 +135,9 @@ ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'curveMember' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'curveMember' ||
|
||||
node.localName == 'curveMembers',
|
||||
'localName should be curveMember or curveMembers');
|
||||
ol.xml.parseNode(this.CURVEMEMBER_PARSERS_, node, objectStack, this);
|
||||
@@ -150,9 +150,9 @@ ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'surfaceMember' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'surfaceMember' ||
|
||||
node.localName == 'surfaceMembers',
|
||||
'localName should be surfaceMember or surfaceMembers');
|
||||
ol.xml.parseNode(this.SURFACEMEMBER_PARSERS_,
|
||||
@@ -167,9 +167,9 @@ ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
|
||||
* @return {Array.<(Array.<number>)>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'patches',
|
||||
ol.DEBUG && console.assert(node.localName == 'patches',
|
||||
'localName should be patches');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.PATCHES_PARSERS_, node, objectStack, this);
|
||||
@@ -183,9 +183,9 @@ ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
|
||||
* @return {Array.<number>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'segments',
|
||||
ol.DEBUG && console.assert(node.localName == 'segments',
|
||||
'localName should be segments');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.SEGMENTS_PARSERS_, node, objectStack, this);
|
||||
@@ -199,9 +199,9 @@ ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
|
||||
* @return {Array.<(Array.<number>)>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'npde.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'PolygonPatch',
|
||||
ol.DEBUG && console.assert(node.localName == 'PolygonPatch',
|
||||
'localName should be PolygonPatch');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this);
|
||||
@@ -215,9 +215,9 @@ ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
|
||||
* @return {Array.<number>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LineStringSegment',
|
||||
ol.DEBUG && console.assert(node.localName == 'LineStringSegment',
|
||||
'localName should be LineStringSegment');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.GEOMETRY_FLAT_COORDINATES_PARSERS_,
|
||||
@@ -231,9 +231,9 @@ ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'interior',
|
||||
ol.DEBUG && console.assert(node.localName == 'interior',
|
||||
'localName should be interior');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -241,9 +241,9 @@ ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length of 1 or more');
|
||||
flatLinearRings.push(flatLinearRing);
|
||||
}
|
||||
@@ -256,9 +256,9 @@ ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'exterior',
|
||||
ol.DEBUG && console.assert(node.localName == 'exterior',
|
||||
'localName should be exterior');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -266,9 +266,9 @@ ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length of 1 or more');
|
||||
flatLinearRings[0] = flatLinearRing;
|
||||
}
|
||||
@@ -282,9 +282,9 @@ ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
*/
|
||||
ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Surface',
|
||||
ol.DEBUG && console.assert(node.localName == 'Surface',
|
||||
'localName should be Surface');
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
var flatLinearRings = ol.xml.pushParseAndPop([null],
|
||||
@@ -314,9 +314,9 @@ ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
*/
|
||||
ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Curve', 'localName should be Curve');
|
||||
ol.DEBUG && console.assert(node.localName == 'Curve', 'localName should be Curve');
|
||||
/** @type {Array.<number>} */
|
||||
var flatCoordinates = ol.xml.pushParseAndPop([null],
|
||||
this.CURVE_PARSERS_, node, objectStack, this);
|
||||
@@ -337,9 +337,9 @@ ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
|
||||
* @return {ol.Extent|undefined} Envelope.
|
||||
*/
|
||||
ol.format.GML3.prototype.readEnvelope_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Envelope',
|
||||
ol.DEBUG && console.assert(node.localName == 'Envelope',
|
||||
'localName should be Envelope');
|
||||
/** @type {Array.<number>} */
|
||||
var flatCoordinates = ol.xml.pushParseAndPop([null],
|
||||
@@ -718,7 +718,7 @@ ol.format.GML3.ENVELOPE_SERIALIZERS_ = {
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
|
||||
goog.DEBUG && console.assert(extent.length == 4, 'extent should have 4 items');
|
||||
ol.DEBUG && console.assert(extent.length == 4, 'extent should have 4 items');
|
||||
var context = objectStack[objectStack.length - 1];
|
||||
var srsName = context['srsName'];
|
||||
if (srsName) {
|
||||
@@ -1179,7 +1179,7 @@ ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
|
||||
*/
|
||||
ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be a node');
|
||||
return ol.xml.createElementNS('http://www.opengis.net/gml',
|
||||
ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_[parentNode.nodeName]);
|
||||
@@ -1201,7 +1201,7 @@ ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, o
|
||||
var curve = context['curve'];
|
||||
var multiCurve = context['multiCurve'];
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be a node');
|
||||
var nodeName;
|
||||
if (!Array.isArray(value)) {
|
||||
|
||||
@@ -107,7 +107,7 @@ ol.format.GMLBase.ONLY_WHITESPACE_RE_ = /^[\s\xa0]*$/;
|
||||
* @return {Array.<ol.Feature> | undefined} Features.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var localName = node.localName;
|
||||
var features = null;
|
||||
@@ -259,14 +259,14 @@ ol.format.GMLBase.prototype.readFeatureElement = function(node, objectStack) {
|
||||
* @return {ol.geom.Point|undefined} Point.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readPoint = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Point', 'localName should be Point');
|
||||
ol.DEBUG && console.assert(node.localName == 'Point', 'localName should be Point');
|
||||
var flatCoordinates =
|
||||
this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
if (flatCoordinates) {
|
||||
var point = new ol.geom.Point(null);
|
||||
goog.DEBUG && console.assert(flatCoordinates.length == 3,
|
||||
ol.DEBUG && console.assert(flatCoordinates.length == 3,
|
||||
'flatCoordinates should have a length of 3');
|
||||
point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
|
||||
return point;
|
||||
@@ -280,9 +280,9 @@ ol.format.GMLBase.prototype.readPoint = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiPoint|undefined} MultiPoint.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readMultiPoint = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiPoint',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiPoint',
|
||||
'localName should be MultiPoint');
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
var coordinates = ol.xml.pushParseAndPop([],
|
||||
@@ -301,9 +301,9 @@ ol.format.GMLBase.prototype.readMultiPoint = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readMultiLineString = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiLineString',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiLineString',
|
||||
'localName should be MultiLineString');
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
var lineStrings = ol.xml.pushParseAndPop([],
|
||||
@@ -324,9 +324,9 @@ ol.format.GMLBase.prototype.readMultiLineString = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiPolygon',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiPolygon',
|
||||
'localName should be MultiPolygon');
|
||||
/** @type {Array.<ol.geom.Polygon>} */
|
||||
var polygons = ol.xml.pushParseAndPop([],
|
||||
@@ -347,9 +347,9 @@ ol.format.GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'pointMember' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'pointMember' ||
|
||||
node.localName == 'pointMembers',
|
||||
'localName should be pointMember or pointMembers');
|
||||
ol.xml.parseNode(this.POINTMEMBER_PARSERS_,
|
||||
@@ -363,9 +363,9 @@ ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'lineStringMember' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'lineStringMember' ||
|
||||
node.localName == 'lineStringMembers',
|
||||
'localName should be LineStringMember or LineStringMembers');
|
||||
ol.xml.parseNode(this.LINESTRINGMEMBER_PARSERS_,
|
||||
@@ -379,9 +379,9 @@ ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'polygonMember' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'polygonMember' ||
|
||||
node.localName == 'polygonMembers',
|
||||
'localName should be polygonMember or polygonMembers');
|
||||
ol.xml.parseNode(this.POLYGONMEMBER_PARSERS_, node,
|
||||
@@ -395,9 +395,9 @@ ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readLineString = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LineString',
|
||||
ol.DEBUG && console.assert(node.localName == 'LineString',
|
||||
'localName should be LineString');
|
||||
var flatCoordinates =
|
||||
this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -418,9 +418,9 @@ ol.format.GMLBase.prototype.readLineString = function(node, objectStack) {
|
||||
* @return {Array.<number>|undefined} LinearRing flat coordinates.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
ol.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
'localName should be LinearRing');
|
||||
var ring = ol.xml.pushParseAndPop(null,
|
||||
this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
|
||||
@@ -439,9 +439,9 @@ ol.format.GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LinearRing|undefined} LinearRing.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readLinearRing = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
ol.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
'localName should be LinearRing');
|
||||
var flatCoordinates =
|
||||
this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -461,9 +461,9 @@ ol.format.GMLBase.prototype.readLinearRing = function(node, objectStack) {
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Polygon',
|
||||
ol.DEBUG && console.assert(node.localName == 'Polygon',
|
||||
'localName should be Polygon');
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
var flatLinearRings = ol.xml.pushParseAndPop([null],
|
||||
@@ -493,7 +493,7 @@ ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return ol.xml.pushParseAndPop(null,
|
||||
this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
|
||||
|
||||
@@ -72,7 +72,7 @@ ol.format.GPX.SCHEMA_LOCATION_ = 'http://www.topografix.com/GPX/1/1 ' +
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.format.GPX.appendCoordinate_ = function(flatCoordinates, node, values) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
flatCoordinates.push(
|
||||
parseFloat(node.getAttribute('lon')),
|
||||
@@ -99,9 +99,9 @@ ol.format.GPX.appendCoordinate_ = function(flatCoordinates, node, values) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GPX.parseLink_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'link', 'localName should be link');
|
||||
ol.DEBUG && console.assert(node.localName == 'link', 'localName should be link');
|
||||
var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
var href = node.getAttribute('href');
|
||||
if (href !== null) {
|
||||
@@ -117,9 +117,9 @@ ol.format.GPX.parseLink_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GPX.parseExtensions_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'extensions',
|
||||
ol.DEBUG && console.assert(node.localName == 'extensions',
|
||||
'localName should be extensions');
|
||||
var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
values['extensionsNode_'] = node;
|
||||
@@ -132,9 +132,9 @@ ol.format.GPX.parseExtensions_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GPX.parseRtePt_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'rtept', 'localName should be rtept');
|
||||
ol.DEBUG && console.assert(node.localName == 'rtept', 'localName should be rtept');
|
||||
var values = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.GPX.RTEPT_PARSERS_, node, objectStack);
|
||||
if (values) {
|
||||
@@ -152,9 +152,9 @@ ol.format.GPX.parseRtePt_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GPX.parseTrkPt_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'trkpt', 'localName should be trkpt');
|
||||
ol.DEBUG && console.assert(node.localName == 'trkpt', 'localName should be trkpt');
|
||||
var values = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.GPX.TRKPT_PARSERS_, node, objectStack);
|
||||
if (values) {
|
||||
@@ -172,9 +172,9 @@ ol.format.GPX.parseTrkPt_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GPX.parseTrkSeg_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'trkseg',
|
||||
ol.DEBUG && console.assert(node.localName == 'trkseg',
|
||||
'localName should be trkseg');
|
||||
var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
ol.xml.parseNode(ol.format.GPX.TRKSEG_PARSERS_, node, objectStack);
|
||||
@@ -192,9 +192,9 @@ ol.format.GPX.parseTrkSeg_ = function(node, objectStack) {
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
*/
|
||||
ol.format.GPX.readRte_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'rte', 'localName should be rte');
|
||||
ol.DEBUG && console.assert(node.localName == 'rte', 'localName should be rte');
|
||||
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
||||
var values = ol.xml.pushParseAndPop({
|
||||
'flatCoordinates': []
|
||||
@@ -221,9 +221,9 @@ ol.format.GPX.readRte_ = function(node, objectStack) {
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
*/
|
||||
ol.format.GPX.readTrk_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'trk', 'localName should be trk');
|
||||
ol.DEBUG && console.assert(node.localName == 'trk', 'localName should be trk');
|
||||
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
||||
var values = ol.xml.pushParseAndPop({
|
||||
'flatCoordinates': [],
|
||||
@@ -254,9 +254,9 @@ ol.format.GPX.readTrk_ = function(node, objectStack) {
|
||||
* @return {ol.Feature|undefined} Waypoint.
|
||||
*/
|
||||
ol.format.GPX.readWpt_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'wpt', 'localName should be wpt');
|
||||
ol.DEBUG && console.assert(node.localName == 'wpt', 'localName should be wpt');
|
||||
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
||||
var values = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.GPX.WPT_PARSERS_, node, objectStack);
|
||||
@@ -456,7 +456,7 @@ ol.format.GPX.prototype.readFeature;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.GPX.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return null;
|
||||
@@ -492,7 +492,7 @@ ol.format.GPX.prototype.readFeatures;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return [];
|
||||
@@ -552,7 +552,7 @@ ol.format.GPX.writeLink_ = function(node, value, objectStack) {
|
||||
ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
|
||||
var context = objectStack[objectStack.length - 1];
|
||||
var parentNode = context.node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be an XML node');
|
||||
var namespaceURI = parentNode.namespaceURI;
|
||||
var properties = context['properties'];
|
||||
@@ -859,7 +859,7 @@ ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||
var nodeName = ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_[geometry.getType()];
|
||||
if (nodeName) {
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be an XML node');
|
||||
return ol.xml.createElementNS(parentNode.namespaceURI, nodeName);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ ol.format.IGC.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
} else if (altitudeMode == ol.format.IGCZ.BAROMETRIC) {
|
||||
z = parseInt(m[12], 10);
|
||||
} else {
|
||||
goog.DEBUG && console.assert(false, 'Unknown altitude mode.');
|
||||
ol.DEBUG && console.assert(false, 'Unknown altitude mode.');
|
||||
z = 0;
|
||||
}
|
||||
flatCoordinates.push(z);
|
||||
|
||||
@@ -559,9 +559,9 @@ ol.format.KML.readStyleMapValue_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.IconStyleParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be an ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'IconStyle',
|
||||
ol.DEBUG && console.assert(node.localName == 'IconStyle',
|
||||
'localName should be IconStyle');
|
||||
// FIXME refreshMode
|
||||
// FIXME refreshInterval
|
||||
@@ -670,9 +670,9 @@ ol.format.KML.IconStyleParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.LabelStyleParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LabelStyle',
|
||||
ol.DEBUG && console.assert(node.localName == 'LabelStyle',
|
||||
'localName should be LabelStyle');
|
||||
// FIXME colorMode
|
||||
var object = ol.xml.pushParseAndPop(
|
||||
@@ -699,9 +699,9 @@ ol.format.KML.LabelStyleParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.LineStyleParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LineStyle',
|
||||
ol.DEBUG && console.assert(node.localName == 'LineStyle',
|
||||
'localName should be LineStyle');
|
||||
// FIXME colorMode
|
||||
// FIXME gx:outerColor
|
||||
@@ -729,9 +729,9 @@ ol.format.KML.LineStyleParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.PolyStyleParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'PolyStyle',
|
||||
ol.DEBUG && console.assert(node.localName == 'PolyStyle',
|
||||
'localName should be PolyStyle');
|
||||
// FIXME colorMode
|
||||
var object = ol.xml.pushParseAndPop(
|
||||
@@ -764,9 +764,9 @@ ol.format.KML.PolyStyleParser_ = function(node, objectStack) {
|
||||
* @return {Array.<number>} LinearRing flat coordinates.
|
||||
*/
|
||||
ol.format.KML.readFlatLinearRing_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
ol.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
'localName should be LinearRing');
|
||||
return ol.xml.pushParseAndPop(null,
|
||||
ol.format.KML.FLAT_LINEAR_RING_PARSERS_, node, objectStack);
|
||||
@@ -779,12 +779,12 @@ ol.format.KML.readFlatLinearRing_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.gxCoordParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(ol.array.includes(
|
||||
ol.DEBUG && console.assert(ol.array.includes(
|
||||
ol.format.KML.GX_NAMESPACE_URIS_, node.namespaceURI),
|
||||
'namespaceURI of the node should be known to the KML parser');
|
||||
goog.DEBUG && console.assert(node.localName == 'coord', 'localName should be coord');
|
||||
ol.DEBUG && console.assert(node.localName == 'coord', 'localName should be coord');
|
||||
var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
var flatCoordinates = gxTrackObject.flatCoordinates;
|
||||
@@ -810,12 +810,12 @@ ol.format.KML.gxCoordParser_ = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
ol.format.KML.readGxMultiTrack_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(ol.array.includes(
|
||||
ol.DEBUG && console.assert(ol.array.includes(
|
||||
ol.format.KML.GX_NAMESPACE_URIS_, node.namespaceURI),
|
||||
'namespaceURI of the node should be known to the KML parser');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiTrack',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiTrack',
|
||||
'localName should be MultiTrack');
|
||||
var lineStrings = ol.xml.pushParseAndPop([],
|
||||
ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_, node, objectStack);
|
||||
@@ -835,12 +835,12 @@ ol.format.KML.readGxMultiTrack_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
*/
|
||||
ol.format.KML.readGxTrack_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(ol.array.includes(
|
||||
ol.DEBUG && console.assert(ol.array.includes(
|
||||
ol.format.KML.GX_NAMESPACE_URIS_, node.namespaceURI),
|
||||
'namespaceURI of the node should be known to the KML parser');
|
||||
goog.DEBUG && console.assert(node.localName == 'Track', 'localName should be Track');
|
||||
ol.DEBUG && console.assert(node.localName == 'Track', 'localName should be Track');
|
||||
var gxTrackObject = ol.xml.pushParseAndPop(
|
||||
/** @type {ol.KMLGxTrackObject_} */ ({
|
||||
flatCoordinates: [],
|
||||
@@ -851,7 +851,7 @@ ol.format.KML.readGxTrack_ = function(node, objectStack) {
|
||||
}
|
||||
var flatCoordinates = gxTrackObject.flatCoordinates;
|
||||
var whens = gxTrackObject.whens;
|
||||
goog.DEBUG && console.assert(flatCoordinates.length / 4 == whens.length,
|
||||
ol.DEBUG && console.assert(flatCoordinates.length / 4 == whens.length,
|
||||
'the length of the flatCoordinates array divided by 4 should be the ' +
|
||||
'length of the whens array');
|
||||
var i, ii;
|
||||
@@ -872,9 +872,9 @@ ol.format.KML.readGxTrack_ = function(node, objectStack) {
|
||||
* @return {Object} Icon object.
|
||||
*/
|
||||
ol.format.KML.readIcon_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Icon', 'localName should be Icon');
|
||||
ol.DEBUG && console.assert(node.localName == 'Icon', 'localName should be Icon');
|
||||
var iconObject = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.KML.ICON_PARSERS_, node, objectStack);
|
||||
if (iconObject) {
|
||||
@@ -892,7 +892,7 @@ ol.format.KML.readIcon_ = function(node, objectStack) {
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.format.KML.readFlatCoordinatesFromNode_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return ol.xml.pushParseAndPop(null,
|
||||
ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_, node, objectStack);
|
||||
@@ -906,9 +906,9 @@ ol.format.KML.readFlatCoordinatesFromNode_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
*/
|
||||
ol.format.KML.readLineString_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LineString',
|
||||
ol.DEBUG && console.assert(node.localName == 'LineString',
|
||||
'localName should be LineString');
|
||||
var properties = ol.xml.pushParseAndPop({},
|
||||
ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
|
||||
@@ -933,9 +933,9 @@ ol.format.KML.readLineString_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
*/
|
||||
ol.format.KML.readLinearRing_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
ol.DEBUG && console.assert(node.localName == 'LinearRing',
|
||||
'localName should be LinearRing');
|
||||
var properties = ol.xml.pushParseAndPop({},
|
||||
ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
|
||||
@@ -961,9 +961,9 @@ ol.format.KML.readLinearRing_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
*/
|
||||
ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MultiGeometry',
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiGeometry',
|
||||
'localName should be MultiGeometry');
|
||||
var geometries = ol.xml.pushParseAndPop([],
|
||||
ol.format.KML.MULTI_GEOMETRY_PARSERS_, node, objectStack);
|
||||
@@ -994,7 +994,7 @@ ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
|
||||
flatCoordinates = point.getFlatCoordinates();
|
||||
for (i = 1, ii = geometries.length; i < ii; ++i) {
|
||||
geometry = geometries[i];
|
||||
goog.DEBUG && console.assert(geometry.getLayout() == layout,
|
||||
ol.DEBUG && console.assert(geometry.getLayout() == layout,
|
||||
'geometry layout should be consistent');
|
||||
ol.array.extend(flatCoordinates, geometry.getFlatCoordinates());
|
||||
}
|
||||
@@ -1028,9 +1028,9 @@ ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Point|undefined} Point.
|
||||
*/
|
||||
ol.format.KML.readPoint_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Point', 'localName should be Point');
|
||||
ol.DEBUG && console.assert(node.localName == 'Point', 'localName should be Point');
|
||||
var properties = ol.xml.pushParseAndPop({},
|
||||
ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
|
||||
objectStack);
|
||||
@@ -1038,7 +1038,7 @@ ol.format.KML.readPoint_ = function(node, objectStack) {
|
||||
ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
if (flatCoordinates) {
|
||||
var point = new ol.geom.Point(null);
|
||||
goog.DEBUG && console.assert(flatCoordinates.length == 3,
|
||||
ol.DEBUG && console.assert(flatCoordinates.length == 3,
|
||||
'flatCoordinates should have a length of 3');
|
||||
point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
|
||||
point.setProperties(properties);
|
||||
@@ -1056,9 +1056,9 @@ ol.format.KML.readPoint_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
*/
|
||||
ol.format.KML.readPolygon_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Polygon',
|
||||
ol.DEBUG && console.assert(node.localName == 'Polygon',
|
||||
'localName should be Polygon');
|
||||
var properties = ol.xml.pushParseAndPop(/** @type {Object<string,*>} */ ({}),
|
||||
ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
|
||||
@@ -1091,9 +1091,9 @@ ol.format.KML.readPolygon_ = function(node, objectStack) {
|
||||
* @return {Array.<ol.style.Style>} Style.
|
||||
*/
|
||||
ol.format.KML.readStyle_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
ol.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
var styleObject = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.KML.STYLE_PARSERS_, node, objectStack);
|
||||
if (!styleObject) {
|
||||
@@ -1170,9 +1170,9 @@ ol.format.KML.setCommonGeometryProperties_ = function(multiGeometry,
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.DataParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Data', 'localName should be Data');
|
||||
ol.DEBUG && console.assert(node.localName == 'Data', 'localName should be Data');
|
||||
var name = node.getAttribute('name');
|
||||
if (name !== null) {
|
||||
var data = ol.xml.pushParseAndPop(
|
||||
@@ -1192,9 +1192,9 @@ ol.format.KML.DataParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.ExtendedDataParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ExtendedData',
|
||||
ol.DEBUG && console.assert(node.localName == 'ExtendedData',
|
||||
'localName should be ExtendedData');
|
||||
ol.xml.parseNode(ol.format.KML.EXTENDED_DATA_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -1206,9 +1206,9 @@ ol.format.KML.ExtendedDataParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.PairDataParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Pair', 'localName should be Pair');
|
||||
ol.DEBUG && console.assert(node.localName == 'Pair', 'localName should be Pair');
|
||||
var pairObject = ol.xml.pushParseAndPop(
|
||||
{}, ol.format.KML.PAIR_PARSERS_, node, objectStack);
|
||||
if (!pairObject) {
|
||||
@@ -1237,9 +1237,9 @@ ol.format.KML.PairDataParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.PlacemarkStyleMapParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'StyleMap',
|
||||
ol.DEBUG && console.assert(node.localName == 'StyleMap',
|
||||
'localName should be StyleMap');
|
||||
var styleMapValue = ol.format.KML.readStyleMapValue_(node, objectStack);
|
||||
if (!styleMapValue) {
|
||||
@@ -1262,9 +1262,9 @@ ol.format.KML.PlacemarkStyleMapParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.SchemaDataParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'SchemaData',
|
||||
ol.DEBUG && console.assert(node.localName == 'SchemaData',
|
||||
'localName should be SchemaData');
|
||||
ol.xml.parseNode(ol.format.KML.SCHEMA_DATA_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -1276,9 +1276,9 @@ ol.format.KML.SchemaDataParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.SimpleDataParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'SimpleData',
|
||||
ol.DEBUG && console.assert(node.localName == 'SimpleData',
|
||||
'localName should be SimpleData');
|
||||
var name = node.getAttribute('name');
|
||||
if (name !== null) {
|
||||
@@ -1296,9 +1296,9 @@ ol.format.KML.SimpleDataParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'innerBoundaryIs',
|
||||
ol.DEBUG && console.assert(node.localName == 'innerBoundaryIs',
|
||||
'localName should be innerBoundaryIs');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -1306,9 +1306,9 @@ ol.format.KML.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings array should not be empty');
|
||||
flatLinearRings.push(flatLinearRing);
|
||||
}
|
||||
@@ -1321,9 +1321,9 @@ ol.format.KML.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'outerBoundaryIs',
|
||||
ol.DEBUG && console.assert(node.localName == 'outerBoundaryIs',
|
||||
'localName should be outerBoundaryIs');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
@@ -1331,9 +1331,9 @@ ol.format.KML.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
goog.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
goog.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings array should not be empty');
|
||||
flatLinearRings[0] = flatLinearRing;
|
||||
}
|
||||
@@ -1346,9 +1346,9 @@ ol.format.KML.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.LinkParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Link', 'localName should be Link');
|
||||
ol.DEBUG && console.assert(node.localName == 'Link', 'localName should be Link');
|
||||
ol.xml.parseNode(ol.format.KML.LINK_PARSERS_, node, objectStack);
|
||||
};
|
||||
|
||||
@@ -1359,9 +1359,9 @@ ol.format.KML.LinkParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.whenParser_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'when', 'localName should be when');
|
||||
ol.DEBUG && console.assert(node.localName == 'when', 'localName should be when');
|
||||
var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
var whens = gxTrackObject.whens;
|
||||
@@ -1700,10 +1700,10 @@ ol.format.KML.prototype.getExtensions = function() {
|
||||
* @return {Array.<ol.Feature>|undefined} Features.
|
||||
*/
|
||||
ol.format.KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var localName = node.localName;
|
||||
goog.DEBUG && console.assert(localName == 'Document' || localName == 'Folder',
|
||||
ol.DEBUG && console.assert(localName == 'Document' || localName == 'Folder',
|
||||
'localName should be Document or Folder');
|
||||
// FIXME use scope somehow
|
||||
var parsersNS = ol.xml.makeStructureNS(
|
||||
@@ -1731,9 +1731,9 @@ ol.format.KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
* @return {ol.Feature|undefined} Feature.
|
||||
*/
|
||||
ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Placemark',
|
||||
ol.DEBUG && console.assert(node.localName == 'Placemark',
|
||||
'localName should be Placemark');
|
||||
var object = ol.xml.pushParseAndPop({'geometry': null},
|
||||
ol.format.KML.PLACEMARK_PARSERS_, node, objectStack);
|
||||
@@ -1778,9 +1778,9 @@ ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
ol.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
var id = node.getAttribute('id');
|
||||
if (id !== null) {
|
||||
var style = ol.format.KML.readStyle_(node, objectStack);
|
||||
@@ -1804,9 +1804,9 @@ ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'StyleMap',
|
||||
ol.DEBUG && console.assert(node.localName == 'StyleMap',
|
||||
'localName should be StyleMap');
|
||||
var id = node.getAttribute('id');
|
||||
if (id === null) {
|
||||
@@ -1845,12 +1845,12 @@ ol.format.KML.prototype.readFeature;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.KML.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return null;
|
||||
}
|
||||
goog.DEBUG && console.assert(node.localName == 'Placemark',
|
||||
ol.DEBUG && console.assert(node.localName == 'Placemark',
|
||||
'localName should be Placemark');
|
||||
var feature = this.readPlacemark_(
|
||||
node, [this.getReadOptions(node, opt_options)]);
|
||||
@@ -1880,7 +1880,7 @@ ol.format.KML.prototype.readFeatures;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.KML.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return [];
|
||||
@@ -2376,7 +2376,7 @@ ol.format.KML.writePlacemark_ = function(node, feature, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.KML.writePrimitiveGeometry_ = function(node, geometry, objectStack) {
|
||||
goog.DEBUG && console.assert(
|
||||
ol.DEBUG && console.assert(
|
||||
(geometry instanceof ol.geom.Point) ||
|
||||
(geometry instanceof ol.geom.LineString) ||
|
||||
(geometry instanceof ol.geom.LinearRing),
|
||||
@@ -2401,7 +2401,7 @@ ol.format.KML.writePrimitiveGeometry_ = function(node, geometry, objectStack) {
|
||||
*/
|
||||
ol.format.KML.writePolygon_ = function(node, polygon, objectStack) {
|
||||
var linearRings = polygon.getLinearRings();
|
||||
goog.DEBUG && console.assert(linearRings.length > 0,
|
||||
ol.DEBUG && console.assert(linearRings.length > 0,
|
||||
'linearRings should not be empty');
|
||||
var outerRing = linearRings.shift();
|
||||
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
|
||||
@@ -2800,7 +2800,7 @@ ol.format.KML.GX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||
ol.format.KML.DOCUMENT_NODE_FACTORY_ = function(value, objectStack,
|
||||
opt_nodeName) {
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be an XML node');
|
||||
return ol.xml.createElementNS(parentNode.namespaceURI, 'Placemark');
|
||||
};
|
||||
@@ -2818,7 +2818,7 @@ ol.format.KML.GEOMETRY_NODE_FACTORY_ = function(value, objectStack,
|
||||
opt_nodeName) {
|
||||
if (value) {
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
goog.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be an XML node');
|
||||
return ol.xml.createElementNS(parentNode.namespaceURI,
|
||||
ol.format.KML.GEOMETRY_TYPE_TO_NODENAME_[/** @type {ol.geom.Geometry} */ (value).getType()]);
|
||||
|
||||
@@ -57,9 +57,9 @@ ol.format.OSMXML.prototype.getExtensions = function() {
|
||||
* @private
|
||||
*/
|
||||
ol.format.OSMXML.readNode_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'node', 'localName should be node');
|
||||
ol.DEBUG && console.assert(node.localName == 'node', 'localName should be node');
|
||||
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
||||
var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
var id = node.getAttribute('id');
|
||||
@@ -90,9 +90,9 @@ ol.format.OSMXML.readNode_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.OSMXML.readWay_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'way', 'localName should be way');
|
||||
ol.DEBUG && console.assert(node.localName == 'way', 'localName should be way');
|
||||
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
||||
var id = node.getAttribute('id');
|
||||
var values = ol.xml.pushParseAndPop({
|
||||
@@ -130,9 +130,9 @@ ol.format.OSMXML.readWay_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.OSMXML.readNd_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'nd', 'localName should be nd');
|
||||
ol.DEBUG && console.assert(node.localName == 'nd', 'localName should be nd');
|
||||
var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
values.ndrefs.push(node.getAttribute('ref'));
|
||||
};
|
||||
@@ -144,9 +144,9 @@ ol.format.OSMXML.readNd_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.OSMXML.readTag_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'tag', 'localName should be tag');
|
||||
ol.DEBUG && console.assert(node.localName == 'tag', 'localName should be tag');
|
||||
var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||
values.tags[node.getAttribute('k')] = node.getAttribute('v');
|
||||
};
|
||||
@@ -213,7 +213,7 @@ ol.format.OSMXML.prototype.readFeatures;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var options = this.getReadOptions(node, opt_options);
|
||||
if (node.localName == 'osm') {
|
||||
|
||||
@@ -22,7 +22,7 @@ ol.inherits(ol.format.OWS, ol.format.XML);
|
||||
* @return {Object} OWS object.
|
||||
*/
|
||||
ol.format.OWS.prototype.readFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -38,7 +38,7 @@ ol.format.OWS.prototype.readFromDocument = function(doc) {
|
||||
* @return {Object} OWS object.
|
||||
*/
|
||||
ol.format.OWS.prototype.readFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var owsObject = ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.PARSERS_, node, []);
|
||||
@@ -53,9 +53,9 @@ ol.format.OWS.prototype.readFromNode = function(node) {
|
||||
* @return {Object|undefined} The address.
|
||||
*/
|
||||
ol.format.OWS.readAddress_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Address',
|
||||
ol.DEBUG && console.assert(node.localName == 'Address',
|
||||
'localName should be Address');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.ADDRESS_PARSERS_, node, objectStack);
|
||||
@@ -69,9 +69,9 @@ ol.format.OWS.readAddress_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The values.
|
||||
*/
|
||||
ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'AllowedValues',
|
||||
ol.DEBUG && console.assert(node.localName == 'AllowedValues',
|
||||
'localName should be AllowedValues');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.ALLOWED_VALUES_PARSERS_, node, objectStack);
|
||||
@@ -85,9 +85,9 @@ ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The constraint.
|
||||
*/
|
||||
ol.format.OWS.readConstraint_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Constraint',
|
||||
ol.DEBUG && console.assert(node.localName == 'Constraint',
|
||||
'localName should be Constraint');
|
||||
var name = node.getAttribute('name');
|
||||
if (!name) {
|
||||
@@ -106,9 +106,9 @@ ol.format.OWS.readConstraint_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The contact info.
|
||||
*/
|
||||
ol.format.OWS.readContactInfo_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ContactInfo',
|
||||
ol.DEBUG && console.assert(node.localName == 'ContactInfo',
|
||||
'localName should be ContactInfo');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.CONTACT_INFO_PARSERS_, node, objectStack);
|
||||
@@ -122,9 +122,9 @@ ol.format.OWS.readContactInfo_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The DCP.
|
||||
*/
|
||||
ol.format.OWS.readDcp_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'DCP', 'localName should be DCP');
|
||||
ol.DEBUG && console.assert(node.localName == 'DCP', 'localName should be DCP');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.DCP_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -137,9 +137,9 @@ ol.format.OWS.readDcp_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The GET object.
|
||||
*/
|
||||
ol.format.OWS.readGet_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Get', 'localName should be Get');
|
||||
ol.DEBUG && console.assert(node.localName == 'Get', 'localName should be Get');
|
||||
var href = ol.format.XLink.readHref(node);
|
||||
if (!href) {
|
||||
return undefined;
|
||||
@@ -156,9 +156,9 @@ ol.format.OWS.readGet_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The HTTP object.
|
||||
*/
|
||||
ol.format.OWS.readHttp_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'HTTP', 'localName should be HTTP');
|
||||
ol.DEBUG && console.assert(node.localName == 'HTTP', 'localName should be HTTP');
|
||||
return ol.xml.pushParseAndPop({}, ol.format.OWS.HTTP_PARSERS_,
|
||||
node, objectStack);
|
||||
};
|
||||
@@ -171,9 +171,9 @@ ol.format.OWS.readHttp_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The operation.
|
||||
*/
|
||||
ol.format.OWS.readOperation_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Operation',
|
||||
ol.DEBUG && console.assert(node.localName == 'Operation',
|
||||
'localName should be Operation');
|
||||
var name = node.getAttribute('name');
|
||||
var value = ol.xml.pushParseAndPop({},
|
||||
@@ -196,9 +196,9 @@ ol.format.OWS.readOperation_ = function(node, objectStack) {
|
||||
*/
|
||||
ol.format.OWS.readOperationsMetadata_ = function(node,
|
||||
objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'OperationsMetadata',
|
||||
ol.DEBUG && console.assert(node.localName == 'OperationsMetadata',
|
||||
'localName should be OperationsMetadata');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.OPERATIONS_METADATA_PARSERS_, node,
|
||||
@@ -213,9 +213,9 @@ ol.format.OWS.readOperationsMetadata_ = function(node,
|
||||
* @return {Object|undefined} The phone.
|
||||
*/
|
||||
ol.format.OWS.readPhone_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Phone', 'localName should be Phone');
|
||||
ol.DEBUG && console.assert(node.localName == 'Phone', 'localName should be Phone');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.OWS.PHONE_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -229,9 +229,9 @@ ol.format.OWS.readPhone_ = function(node, objectStack) {
|
||||
*/
|
||||
ol.format.OWS.readServiceIdentification_ = function(node,
|
||||
objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ServiceIdentification',
|
||||
ol.DEBUG && console.assert(node.localName == 'ServiceIdentification',
|
||||
'localName should be ServiceIdentification');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_, node,
|
||||
@@ -246,9 +246,9 @@ ol.format.OWS.readServiceIdentification_ = function(node,
|
||||
* @return {Object|undefined} The service contact.
|
||||
*/
|
||||
ol.format.OWS.readServiceContact_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ServiceContact',
|
||||
ol.DEBUG && console.assert(node.localName == 'ServiceContact',
|
||||
'localName should be ServiceContact');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.OWS.SERVICE_CONTACT_PARSERS_, node,
|
||||
@@ -263,9 +263,9 @@ ol.format.OWS.readServiceContact_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} The service provider.
|
||||
*/
|
||||
ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ServiceProvider',
|
||||
ol.DEBUG && console.assert(node.localName == 'ServiceProvider',
|
||||
'localName should be ServiceProvider');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.OWS.SERVICE_PROVIDER_PARSERS_, node,
|
||||
@@ -280,9 +280,9 @@ ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
|
||||
* @return {string|undefined} The value.
|
||||
*/
|
||||
ol.format.OWS.readValue_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Value', 'localName should be Value');
|
||||
ol.DEBUG && console.assert(node.localName == 'Value', 'localName should be Value');
|
||||
return ol.format.XSD.readString(node);
|
||||
};
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ ol.format.Polyline.prototype.writeFeatureText = function(feature, opt_options) {
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.Polyline.prototype.writeFeaturesText = function(features, opt_options) {
|
||||
goog.DEBUG && console.assert(features.length == 1,
|
||||
ol.DEBUG && console.assert(features.length == 1,
|
||||
'features array should have 1 item');
|
||||
return this.writeFeatureText(features[0], opt_options);
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
|
||||
* FeatureCollection metadata.
|
||||
*/
|
||||
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -214,9 +214,9 @@ ol.format.WFS.FEATURE_COLLECTION_PARSERS_ = {
|
||||
* FeatureCollection metadata.
|
||||
*/
|
||||
ol.format.WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'FeatureCollection',
|
||||
ol.DEBUG && console.assert(node.localName == 'FeatureCollection',
|
||||
'localName should be FeatureCollection');
|
||||
var result = {};
|
||||
var value = ol.format.XSD.readNonNegativeIntegerString(
|
||||
@@ -325,7 +325,7 @@ ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_ = {
|
||||
* @return {ol.WFSTransactionResponse|undefined} Transaction response.
|
||||
*/
|
||||
ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -341,9 +341,9 @@ ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
|
||||
* @return {ol.WFSTransactionResponse|undefined} Transaction response.
|
||||
*/
|
||||
ol.format.WFS.prototype.readTransactionResponseFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'TransactionResponse',
|
||||
ol.DEBUG && console.assert(node.localName == 'TransactionResponse',
|
||||
'localName should be TransactionResponse');
|
||||
return ol.xml.pushParseAndPop(
|
||||
/** @type {ol.WFSTransactionResponse} */({}),
|
||||
@@ -935,7 +935,7 @@ ol.format.WFS.prototype.readProjection;
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.WFS.prototype.readProjectionFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be a DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -950,9 +950,9 @@ ol.format.WFS.prototype.readProjectionFromDocument = function(doc) {
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.WFS.prototype.readProjectionFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'FeatureCollection',
|
||||
ol.DEBUG && console.assert(node.localName == 'FeatureCollection',
|
||||
'localName should be FeatureCollection');
|
||||
|
||||
if (node.firstElementChild &&
|
||||
|
||||
@@ -165,7 +165,7 @@ ol.format.WKT.encodeMultiPolygonGeometry_ = function(geom) {
|
||||
ol.format.WKT.encode_ = function(geom) {
|
||||
var type = geom.getType();
|
||||
var geometryEncoder = ol.format.WKT.GeometryEncoder_[type];
|
||||
goog.DEBUG && console.assert(geometryEncoder, 'geometryEncoder should be defined');
|
||||
ol.DEBUG && console.assert(geometryEncoder, 'geometryEncoder should be defined');
|
||||
var enc = geometryEncoder(geom);
|
||||
type = type.toUpperCase();
|
||||
if (enc.length === 0) {
|
||||
@@ -572,7 +572,7 @@ ol.format.WKT.Parser.prototype.match = function(type) {
|
||||
ol.format.WKT.Parser.prototype.parse = function() {
|
||||
this.consume_();
|
||||
var geometry = this.parseGeometry_();
|
||||
goog.DEBUG && console.assert(this.token_.type == ol.format.WKT.TokenType.EOF,
|
||||
ol.DEBUG && console.assert(this.token_.type == ol.format.WKT.TokenType.EOF,
|
||||
'token type should be end of file');
|
||||
return geometry;
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ ol.format.WMSCapabilities.prototype.read;
|
||||
* @return {Object} WMS Capability object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.prototype.readFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -59,9 +59,9 @@ ol.format.WMSCapabilities.prototype.readFromDocument = function(doc) {
|
||||
* @return {Object} WMS Capability object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.prototype.readFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'WMS_Capabilities' ||
|
||||
ol.DEBUG && console.assert(node.localName == 'WMS_Capabilities' ||
|
||||
node.localName == 'WMT_MS_Capabilities',
|
||||
'localName should be WMS_Capabilities or WMT_MS_Capabilities');
|
||||
this.version = node.getAttribute('version').trim();
|
||||
@@ -79,9 +79,9 @@ ol.format.WMSCapabilities.prototype.readFromNode = function(node) {
|
||||
* @return {Object|undefined} Attribution object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readAttribution_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Attribution',
|
||||
ol.DEBUG && console.assert(node.localName == 'Attribution',
|
||||
'localName should be Attribution');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_, node, objectStack);
|
||||
@@ -95,9 +95,9 @@ ol.format.WMSCapabilities.readAttribution_ = function(node, objectStack) {
|
||||
* @return {Object} Bounding box object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'BoundingBox',
|
||||
ol.DEBUG && console.assert(node.localName == 'BoundingBox',
|
||||
'localName should be BoundingBox');
|
||||
|
||||
var extent = [
|
||||
@@ -127,9 +127,9 @@ ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
|
||||
* @return {ol.Extent|undefined} Bounding box object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'EX_GeographicBoundingBox',
|
||||
ol.DEBUG && console.assert(node.localName == 'EX_GeographicBoundingBox',
|
||||
'localName should be EX_GeographicBoundingBox');
|
||||
var geographicBoundingBox = ol.xml.pushParseAndPop(
|
||||
{},
|
||||
@@ -164,9 +164,9 @@ ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectSt
|
||||
* @return {Object|undefined} Capability object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readCapability_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Capability',
|
||||
ol.DEBUG && console.assert(node.localName == 'Capability',
|
||||
'localName should be Capability');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.CAPABILITY_PARSERS_, node, objectStack);
|
||||
@@ -180,9 +180,9 @@ ol.format.WMSCapabilities.readCapability_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Service object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Service',
|
||||
ol.DEBUG && console.assert(node.localName == 'Service',
|
||||
'localName should be Service');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.SERVICE_PARSERS_, node, objectStack);
|
||||
@@ -196,9 +196,9 @@ ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Contact information object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType shpuld be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ContactInformation',
|
||||
ol.DEBUG && console.assert(node.localName == 'ContactInformation',
|
||||
'localName should be ContactInformation');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_,
|
||||
@@ -213,9 +213,9 @@ ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack)
|
||||
* @return {Object|undefined} Contact person object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ContactPersonPrimary',
|
||||
ol.DEBUG && console.assert(node.localName == 'ContactPersonPrimary',
|
||||
'localName should be ContactPersonPrimary');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_,
|
||||
@@ -230,9 +230,9 @@ ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack
|
||||
* @return {Object|undefined} Contact address object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'ContactAddress',
|
||||
ol.DEBUG && console.assert(node.localName == 'ContactAddress',
|
||||
'localName should be ContactAddress');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_,
|
||||
@@ -247,9 +247,9 @@ ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
|
||||
* @return {Array.<string>|undefined} Format array.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readException_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Exception',
|
||||
ol.DEBUG && console.assert(node.localName == 'Exception',
|
||||
'localName should be Exception');
|
||||
return ol.xml.pushParseAndPop(
|
||||
[], ol.format.WMSCapabilities.EXCEPTION_PARSERS_, node, objectStack);
|
||||
@@ -263,9 +263,9 @@ ol.format.WMSCapabilities.readException_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Layer object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readCapabilityLayer_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
ol.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.LAYER_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -278,9 +278,9 @@ ol.format.WMSCapabilities.readCapabilityLayer_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Layer object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readLayer_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
ol.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
var parentLayerObject = /** @type {Object.<string,*>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
|
||||
@@ -360,9 +360,9 @@ ol.format.WMSCapabilities.readLayer_ = function(node, objectStack) {
|
||||
* @return {Object} Dimension object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Dimension',
|
||||
ol.DEBUG && console.assert(node.localName == 'Dimension',
|
||||
'localName should be Dimension');
|
||||
var dimensionObject = {
|
||||
'name': node.getAttribute('name'),
|
||||
@@ -387,7 +387,7 @@ ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Online resource object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_,
|
||||
@@ -402,9 +402,9 @@ ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack
|
||||
* @return {Object|undefined} Request object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readRequest_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Request',
|
||||
ol.DEBUG && console.assert(node.localName == 'Request',
|
||||
'localName should be Request');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.REQUEST_PARSERS_, node, objectStack);
|
||||
@@ -418,9 +418,9 @@ ol.format.WMSCapabilities.readRequest_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} DCP type object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readDCPType_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'DCPType',
|
||||
ol.DEBUG && console.assert(node.localName == 'DCPType',
|
||||
'localName should be DCPType');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.DCPTYPE_PARSERS_, node, objectStack);
|
||||
@@ -434,9 +434,9 @@ ol.format.WMSCapabilities.readDCPType_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} HTTP object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readHTTP_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'HTTP', 'localName should be HTTP');
|
||||
ol.DEBUG && console.assert(node.localName == 'HTTP', 'localName should be HTTP');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.HTTP_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -449,7 +449,7 @@ ol.format.WMSCapabilities.readHTTP_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Operation type object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_, node, objectStack);
|
||||
@@ -463,7 +463,7 @@ ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Online resource object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var formatOnlineresource =
|
||||
ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
|
||||
@@ -486,9 +486,9 @@ ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, object
|
||||
* @return {Object|undefined} Authority URL object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readAuthorityURL_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'AuthorityURL',
|
||||
ol.DEBUG && console.assert(node.localName == 'AuthorityURL',
|
||||
'localName should be AuthorityURL');
|
||||
var authorityObject =
|
||||
ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
|
||||
@@ -507,9 +507,9 @@ ol.format.WMSCapabilities.readAuthorityURL_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Metadata URL object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readMetadataURL_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'MetadataURL',
|
||||
ol.DEBUG && console.assert(node.localName == 'MetadataURL',
|
||||
'localName should be MetadataURL');
|
||||
var metadataObject =
|
||||
ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
|
||||
@@ -528,9 +528,9 @@ ol.format.WMSCapabilities.readMetadataURL_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Style object.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readStyle_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
ol.DEBUG && console.assert(node.localName == 'Style', 'localName should be Style');
|
||||
return ol.xml.pushParseAndPop(
|
||||
{}, ol.format.WMSCapabilities.STYLE_PARSERS_, node, objectStack);
|
||||
};
|
||||
@@ -543,9 +543,9 @@ ol.format.WMSCapabilities.readStyle_ = function(node, objectStack) {
|
||||
* @return {Array.<string>|undefined} Keyword list.
|
||||
*/
|
||||
ol.format.WMSCapabilities.readKeywordList_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'KeywordList',
|
||||
ol.DEBUG && console.assert(node.localName == 'KeywordList',
|
||||
'localName should be KeywordList');
|
||||
return ol.xml.pushParseAndPop(
|
||||
[], ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_, node, objectStack);
|
||||
|
||||
@@ -72,7 +72,7 @@ ol.format.WMSGetFeatureInfo.layerIdentifier_ = '_layer';
|
||||
ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||
|
||||
node.setAttribute('namespaceURI', this.featureNS_);
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
var localName = node.localName;
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
@@ -88,7 +88,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack
|
||||
}
|
||||
var context = objectStack[0];
|
||||
|
||||
goog.DEBUG && console.assert(layer.localName.indexOf(
|
||||
ol.DEBUG && console.assert(layer.localName.indexOf(
|
||||
ol.format.WMSGetFeatureInfo.layerIdentifier_) >= 0,
|
||||
'localName of layer node should match layerIdentifier');
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ ol.format.WMTSCapabilities.prototype.read;
|
||||
* @return {Object} WMTS Capability object.
|
||||
*/
|
||||
ol.format.WMTSCapabilities.prototype.readFromDocument = function(doc) {
|
||||
goog.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
ol.DEBUG && console.assert(doc.nodeType == Node.DOCUMENT_NODE,
|
||||
'doc.nodeType should be DOCUMENT');
|
||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -61,9 +61,9 @@ ol.format.WMTSCapabilities.prototype.readFromDocument = function(doc) {
|
||||
* @return {Object} WMTS Capability object.
|
||||
*/
|
||||
ol.format.WMTSCapabilities.prototype.readFromNode = function(node) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Capabilities',
|
||||
ol.DEBUG && console.assert(node.localName == 'Capabilities',
|
||||
'localName should be Capabilities');
|
||||
var version = node.getAttribute('version').trim();
|
||||
var WMTSCapabilityObject = this.owsParser_.readFromNode(node);
|
||||
@@ -84,9 +84,9 @@ ol.format.WMTSCapabilities.prototype.readFromNode = function(node) {
|
||||
* @return {Object|undefined} Attribution object.
|
||||
*/
|
||||
ol.format.WMTSCapabilities.readContents_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Contents',
|
||||
ol.DEBUG && console.assert(node.localName == 'Contents',
|
||||
'localName should be Contents');
|
||||
|
||||
return ol.xml.pushParseAndPop({},
|
||||
@@ -101,9 +101,9 @@ ol.format.WMTSCapabilities.readContents_ = function(node, objectStack) {
|
||||
* @return {Object|undefined} Layers object.
|
||||
*/
|
||||
ol.format.WMTSCapabilities.readLayer_ = function(node, objectStack) {
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
goog.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
ol.DEBUG && console.assert(node.localName == 'Layer', 'localName should be Layer');
|
||||
return ol.xml.pushParseAndPop({},
|
||||
ol.format.WMTSCapabilities.LAYER_PARSERS_, node, objectStack);
|
||||
};
|
||||
|
||||
@@ -208,7 +208,7 @@ ol.format.XMLFeature.prototype.readProjectionFromNode = function(node) {
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
var node = this.writeFeatureNode(feature, opt_options);
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return this.xmlSerializer_.serializeToString(node);
|
||||
};
|
||||
@@ -229,7 +229,7 @@ ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options)
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
var node = this.writeFeaturesNode(features, opt_options);
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return this.xmlSerializer_.serializeToString(node);
|
||||
};
|
||||
@@ -249,7 +249,7 @@ ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_option
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
|
||||
var node = this.writeGeometryNode(geometry, opt_options);
|
||||
goog.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
return this.xmlSerializer_.serializeToString(node);
|
||||
};
|
||||
|
||||
@@ -145,8 +145,8 @@ ol.format.XSD.writeDecimalTextNode = function(node, decimal) {
|
||||
* @param {number} nonNegativeInteger Non negative integer.
|
||||
*/
|
||||
ol.format.XSD.writeNonNegativeIntegerTextNode = function(node, nonNegativeInteger) {
|
||||
goog.DEBUG && console.assert(nonNegativeInteger >= 0, 'value should be more than 0');
|
||||
goog.DEBUG && console.assert(nonNegativeInteger == (nonNegativeInteger | 0),
|
||||
ol.DEBUG && console.assert(nonNegativeInteger >= 0, 'value should be more than 0');
|
||||
ol.DEBUG && console.assert(nonNegativeInteger == (nonNegativeInteger | 0),
|
||||
'value should be an integer value');
|
||||
var string = nonNegativeInteger.toString();
|
||||
node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
|
||||
|
||||
Reference in New Issue
Block a user