Get style of KML feature in OL5

127 views Asked by At

I am trying to extract the style of a KML. It appears on screen fine, as if the style is embedded, but when I try to get the style object:

    var fs=new ol.format.KML().readFeatures(data);
    for (i=0;i<fs.length;++i) {                                             
        f=fs[i].clone();
        if (f.getStyle())
            os=f.getStyle();
            ...

It returns only some sort of function def:

ƒ (t,e){var i,r=c,n="";if(r){var o=t.getGeometry(); ...

0

There are 0 answers