Add ol.source.GPX
This commit is contained in:
@@ -339,6 +339,7 @@ ol.format.GPX.WPT_PARSERS_ = ol.xml.makeParsersNS(
|
||||
ol.format.GPX.NAMESPACE_URIS_, {
|
||||
'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
|
||||
'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime),
|
||||
'magvar': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
|
||||
'geoidheight': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
|
||||
'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
|
||||
'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@exportSymbol ol.source.GPX
|
||||
@@ -0,0 +1,32 @@
|
||||
goog.provide('ol.source.GPX');
|
||||
|
||||
goog.require('ol.format.GPX');
|
||||
goog.require('ol.source.VectorFile');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.source.VectorFile}
|
||||
* @param {olx.source.GPXOptions=} opt_options Options.
|
||||
*/
|
||||
ol.source.GPX = function(opt_options) {
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
doc: options.doc,
|
||||
extent: options.extent,
|
||||
format: new ol.format.GPX(),
|
||||
logo: options.logo,
|
||||
node: options.node,
|
||||
projection: options.projection,
|
||||
reprojectTo: options.reprojectTo,
|
||||
text: options.text,
|
||||
url: options.url,
|
||||
urls: options.urls
|
||||
});
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.GPX, ol.source.VectorFile);
|
||||
Reference in New Issue
Block a user