Remove ol.DEBUG
This commit is contained in:
@@ -88,10 +88,6 @@ ol.format.GML3.schemaLocation_ = ol.format.GMLBase.GMLNS +
|
||||
* @return {ol.geom.MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiCurve',
|
||||
'localName should be MultiCurve');
|
||||
/** @type {Array.<ol.geom.LineString>} */
|
||||
var lineStrings = ol.xml.pushParseAndPop([],
|
||||
this.MULTICURVE_PARSERS_, node, objectStack, this);
|
||||
@@ -112,10 +108,6 @@ ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
|
||||
* @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'MultiSurface',
|
||||
'localName should be MultiSurface');
|
||||
/** @type {Array.<ol.geom.Polygon>} */
|
||||
var polygons = ol.xml.pushParseAndPop([],
|
||||
this.MULTISURFACE_PARSERS_, node, objectStack, this);
|
||||
@@ -135,11 +127,6 @@ ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
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,11 +137,6 @@ ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'surfaceMember' ||
|
||||
node.localName == 'surfaceMembers',
|
||||
'localName should be surfaceMember or surfaceMembers');
|
||||
ol.xml.parseNode(this.SURFACEMEMBER_PARSERS_,
|
||||
node, objectStack, this);
|
||||
};
|
||||
@@ -167,10 +149,6 @@ ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
|
||||
* @return {Array.<(Array.<number>)>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'patches',
|
||||
'localName should be patches');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.PATCHES_PARSERS_, node, objectStack, this);
|
||||
};
|
||||
@@ -183,10 +161,6 @@ ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
|
||||
* @return {Array.<number>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'segments',
|
||||
'localName should be segments');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.SEGMENTS_PARSERS_, node, objectStack, this);
|
||||
};
|
||||
@@ -199,10 +173,6 @@ ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
|
||||
* @return {Array.<(Array.<number>)>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'npde.nodeType should be ELEMENT');
|
||||
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,10 +185,6 @@ ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
|
||||
* @return {Array.<number>|undefined} flat coordinates.
|
||||
*/
|
||||
ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'LineStringSegment',
|
||||
'localName should be LineStringSegment');
|
||||
return ol.xml.pushParseAndPop([null],
|
||||
this.GEOMETRY_FLAT_COORDINATES_PARSERS_,
|
||||
node, objectStack, this);
|
||||
@@ -231,20 +197,12 @@ ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'interior',
|
||||
'localName should be interior');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
this.RING_PARSERS, node, objectStack, this);
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length of 1 or more');
|
||||
flatLinearRings.push(flatLinearRing);
|
||||
}
|
||||
};
|
||||
@@ -256,20 +214,12 @@ ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'exterior',
|
||||
'localName should be exterior');
|
||||
/** @type {Array.<number>|undefined} */
|
||||
/** @type {Array.<number>|undefined} */
|
||||
var flatLinearRing = ol.xml.pushParseAndPop(undefined,
|
||||
this.RING_PARSERS, node, objectStack, this);
|
||||
if (flatLinearRing) {
|
||||
var flatLinearRings = /** @type {Array.<Array.<number>>} */
|
||||
(objectStack[objectStack.length - 1]);
|
||||
ol.DEBUG && console.assert(Array.isArray(flatLinearRings),
|
||||
'flatLinearRings should be an array');
|
||||
ol.DEBUG && console.assert(flatLinearRings.length > 0,
|
||||
'flatLinearRings should have an array length of 1 or more');
|
||||
flatLinearRings[0] = flatLinearRing;
|
||||
}
|
||||
};
|
||||
@@ -282,10 +232,6 @@ ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
|
||||
* @return {ol.geom.Polygon|undefined} Polygon.
|
||||
*/
|
||||
ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'Surface',
|
||||
'localName should be Surface');
|
||||
/** @type {Array.<Array.<number>>} */
|
||||
var flatLinearRings = ol.xml.pushParseAndPop([null],
|
||||
this.SURFACE_PARSERS_, node, objectStack, this);
|
||||
@@ -314,9 +260,6 @@ ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
* @return {ol.geom.LineString|undefined} LineString.
|
||||
*/
|
||||
ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
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,10 +280,6 @@ ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
|
||||
* @return {ol.Extent|undefined} Envelope.
|
||||
*/
|
||||
ol.format.GML3.prototype.readEnvelope_ = function(node, objectStack) {
|
||||
ol.DEBUG && console.assert(node.nodeType == Node.ELEMENT_NODE,
|
||||
'node.nodeType should be ELEMENT');
|
||||
ol.DEBUG && console.assert(node.localName == 'Envelope',
|
||||
'localName should be Envelope');
|
||||
/** @type {Array.<number>} */
|
||||
var flatCoordinates = ol.xml.pushParseAndPop([null],
|
||||
this.ENVELOPE_PARSERS_, node, objectStack, this);
|
||||
@@ -718,7 +657,6 @@ ol.format.GML3.ENVELOPE_SERIALIZERS_ = {
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
|
||||
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,8 +1117,6 @@ 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;
|
||||
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]);
|
||||
};
|
||||
@@ -1200,9 +1136,6 @@ ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, o
|
||||
var surface = context['surface'];
|
||||
var curve = context['curve'];
|
||||
var multiCurve = context['multiCurve'];
|
||||
var parentNode = objectStack[objectStack.length - 1].node;
|
||||
ol.DEBUG && console.assert(ol.xml.isNode(parentNode),
|
||||
'parentNode should be a node');
|
||||
var nodeName;
|
||||
if (!Array.isArray(value)) {
|
||||
nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
|
||||
|
||||
Reference in New Issue
Block a user