Rename goog.DEBUG to ol.DEBUG
This commit is contained in:
+21
-21
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user