Add ol.source.IGC

This commit is contained in:
Tom Payne
2013-12-16 20:26:45 +01:00
parent fde0350414
commit 856a16b43e
3 changed files with 35 additions and 0 deletions

View File

@@ -500,6 +500,14 @@
* @property {string|undefined} url URL.
*/
/**
* @typedef {Object} olx.source.IGCOptions
* @property {ol.format.IGCZ|undefined} altitudeMode Altitude mode.
* Possible values are `barometric`, `gps`, and `none`. Default is `none`.
* @property {string|undefined} text Text.
* @property {string|undefined} url URL.
*/
/**
* @typedef {Object} olx.source.MapGuideOptions
* @property {string|undefined} url The mapagent url.

View File

@@ -0,0 +1 @@
@exportSymbol ol.source.IGC

View File

@@ -0,0 +1,26 @@
goog.provide('ol.source.IGC');
goog.require('ol.format.IGC');
goog.require('ol.source.VectorFile');
/**
* @constructor
* @extends {ol.source.VectorFile}
* @param {olx.source.IGCOptions=} opt_options Options.
*/
ol.source.IGC = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {};
goog.base(this, {
format: new ol.format.IGC({
altitudeMode: options.altitudeMode
}),
text: options.text,
url: options.url
});
};
goog.inherits(ol.source.IGC, ol.source.VectorFile);