Rename _ol_format_IGC_ to IGC

This commit is contained in:
Tim Schaub
2017-12-17 01:53:48 -07:00
parent 55ab1bc24a
commit 04230086a4
5 changed files with 28 additions and 28 deletions

View File

@@ -19,7 +19,7 @@ import {get as getProjection} from '../proj.js';
* @param {olx.format.IGCOptions=} opt_options Options.
* @api
*/
var _ol_format_IGC_ = function(opt_options) {
var IGC = function(opt_options) {
var options = opt_options ? opt_options : {};
@@ -39,7 +39,7 @@ var _ol_format_IGC_ = function(opt_options) {
};
inherits(_ol_format_IGC_, _ol_format_TextFeature_);
inherits(IGC, _ol_format_TextFeature_);
/**
@@ -47,7 +47,7 @@ inherits(_ol_format_IGC_, _ol_format_TextFeature_);
* @type {RegExp}
* @private
*/
_ol_format_IGC_.B_RECORD_RE_ =
IGC.B_RECORD_RE_ =
/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/;
@@ -56,7 +56,7 @@ _ol_format_IGC_.B_RECORD_RE_ =
* @type {RegExp}
* @private
*/
_ol_format_IGC_.H_RECORD_RE_ = /^H.([A-Z]{3}).*?:(.*)/;
IGC.H_RECORD_RE_ = /^H.([A-Z]{3}).*?:(.*)/;
/**
@@ -64,7 +64,7 @@ _ol_format_IGC_.H_RECORD_RE_ = /^H.([A-Z]{3}).*?:(.*)/;
* @type {RegExp}
* @private
*/
_ol_format_IGC_.HFDTE_RECORD_RE_ = /^HFDTE(\d{2})(\d{2})(\d{2})/;
IGC.HFDTE_RECORD_RE_ = /^HFDTE(\d{2})(\d{2})(\d{2})/;
/**
@@ -74,7 +74,7 @@ _ol_format_IGC_.HFDTE_RECORD_RE_ = /^HFDTE(\d{2})(\d{2})(\d{2})/;
* @type {RegExp}
* @private
*/
_ol_format_IGC_.NEWLINE_RE_ = /\r\n|\r|\n/;
IGC.NEWLINE_RE_ = /\r\n|\r|\n/;
/**
@@ -86,15 +86,15 @@ _ol_format_IGC_.NEWLINE_RE_ = /\r\n|\r|\n/;
* @return {ol.Feature} Feature.
* @api
*/
_ol_format_IGC_.prototype.readFeature;
IGC.prototype.readFeature;
/**
* @inheritDoc
*/
_ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) {
IGC.prototype.readFeatureFromText = function(text, opt_options) {
var altitudeMode = this.altitudeMode_;
var lines = text.split(_ol_format_IGC_.NEWLINE_RE_);
var lines = text.split(IGC.NEWLINE_RE_);
/** @type {Object.<string, string>} */
var properties = {};
var flatCoordinates = [];
@@ -107,7 +107,7 @@ _ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) {
var line = lines[i];
var m;
if (line.charAt(0) == 'B') {
m = _ol_format_IGC_.B_RECORD_RE_.exec(line);
m = IGC.B_RECORD_RE_.exec(line);
if (m) {
var hour = parseInt(m[1], 10);
var minute = parseInt(m[2], 10);
@@ -141,13 +141,13 @@ _ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) {
lastDateTime = dateTime;
}
} else if (line.charAt(0) == 'H') {
m = _ol_format_IGC_.HFDTE_RECORD_RE_.exec(line);
m = IGC.HFDTE_RECORD_RE_.exec(line);
if (m) {
day = parseInt(m[1], 10);
month = parseInt(m[2], 10) - 1;
year = 2000 + parseInt(m[3], 10);
} else {
m = _ol_format_IGC_.H_RECORD_RE_.exec(line);
m = IGC.H_RECORD_RE_.exec(line);
if (m) {
properties[m[1]] = m[2].trim();
}
@@ -178,13 +178,13 @@ _ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) {
* @return {Array.<ol.Feature>} Features.
* @api
*/
_ol_format_IGC_.prototype.readFeatures;
IGC.prototype.readFeatures;
/**
* @inheritDoc
*/
_ol_format_IGC_.prototype.readFeaturesFromText = function(text, opt_options) {
IGC.prototype.readFeaturesFromText = function(text, opt_options) {
var feature = this.readFeatureFromText(text, opt_options);
if (feature) {
return [feature];
@@ -202,33 +202,33 @@ _ol_format_IGC_.prototype.readFeaturesFromText = function(text, opt_options) {
* @return {ol.proj.Projection} Projection.
* @api
*/
_ol_format_IGC_.prototype.readProjection;
IGC.prototype.readProjection;
/**
* Not implemented.
* @inheritDoc
*/
_ol_format_IGC_.prototype.writeFeatureText = function(feature, opt_options) {};
IGC.prototype.writeFeatureText = function(feature, opt_options) {};
/**
* Not implemented.
* @inheritDoc
*/
_ol_format_IGC_.prototype.writeFeaturesText = function(features, opt_options) {};
IGC.prototype.writeFeaturesText = function(features, opt_options) {};
/**
* Not implemented.
* @inheritDoc
*/
_ol_format_IGC_.prototype.writeGeometryText = function(geometry, opt_options) {};
IGC.prototype.writeGeometryText = function(geometry, opt_options) {};
/**
* Not implemented.
* @inheritDoc
*/
_ol_format_IGC_.prototype.readGeometryFromText = function(text, opt_options) {};
export default _ol_format_IGC_;
IGC.prototype.readGeometryFromText = function(text, opt_options) {};
export default IGC;