Marc Jansen, jansen@terrestris.de, terrestris GmbH & Co. KG
ol.format.XMLFeature.prototype.readFeatures = function(source) {
if (ol.xml.isDocument(source)) {
return this.readFeaturesFromDocument(/** @type {Document} */ (source));
} else if (ol.xml.isNode(source)) {
return this.readFeaturesFromNode(/** @type {Node} */ (source));
} else if (goog.isString(source)) {
var doc = ol.xml.load(source);
return this.readFeaturesFromDocument(doc);
} else {
goog.asserts.fail();
return [];
}
};
… compiles to:
l.Ga=function(a){return Kn(a)?fo(this,a):Nn(a)?this.$b(a):la(a)?(a=Rn(a),fo(this,a)):[]};
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
OpenLayers.Map
OpenLayers.Layer.Xxx
OpenLayers.Control.Yyy
ol.Map
ol.View
ol.interaction.Zzz
ol.control.Yyy
ol.layer.Xxx
ol.source.Xxx
var vectorSource = new ol.source.IGC({
urls: [
'data/igc/ClementLatour.igc' // etc.
]
});
var styleFunction = function(feature, resolution) {
// ...
return styleArray;
};
var layer = new ol.layer.Vector({
source: vectorSource,
styleFunction: styleFunction
});