I have a similar question like POI in OpenLayer 3 but not the same.
I'm drawing a map with an KML File:
var layerVector = new ol.layer.Vector({
source : new ol.source.KML({
projection : projection,
url : _url
}),
});
It works fine and I can see the points from the KML file in the map.
(Using <Style> and <styleUrl> Tags in the KML file.)
But if I try to see the features i get an empty Array.
console.log( layerVector.getSource().getFeatures() );
==> Array [ ]
any idea?
thx mx
See the answer in our upcoming FAQ:
https://github.com/openlayers/ol3/blob/master/doc/faq.md
from the above link: