ol.souce.layer points show up on the map but getFeatures() returns an empty array

المشرف العام

Administrator
طاقم الإدارة
Here is the basics of my code:

this.infoStopSource = new ol.source.Vector({ url: stops_gpx, format: new ol.format.GPX(),});var infoStopv = new ol.layer.Vector({ source: this.infoStopSource, style: stopStyle});this.map.addLayer(infoStopv);var f = this.infoStopSource.getFeatures();The features show up on the map. However, f is an empty array. Why?



أكثر...
 
أعلى