Add ol.source.IGC
This commit is contained in:
@@ -500,6 +500,14 @@
|
|||||||
* @property {string|undefined} url URL.
|
* @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
|
* @typedef {Object} olx.source.MapGuideOptions
|
||||||
* @property {string|undefined} url The mapagent url.
|
* @property {string|undefined} url The mapagent url.
|
||||||
|
|||||||
1
src/ol/source/igcsource.exports
Normal file
1
src/ol/source/igcsource.exports
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@exportSymbol ol.source.IGC
|
||||||
26
src/ol/source/igcsource.js
Normal file
26
src/ol/source/igcsource.js
Normal 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);
|
||||||
Reference in New Issue
Block a user