Event to find out all feature successfully loaded to the layer

906 views Asked by At

I am using OpenLayers6 to load the map on my website. How can I know if all the features in the geojson file completed the loading to the layer?

 var layer = new ol.layer.Vector({
        source: new ol.source.Vector({
            url: "test.geojson",
            format: new ol.format.GeoJSON(),
        }),
        style: function(feature) {
            return style;
        }
    });
    map.addLayer(layer);

Is there any event to know that I have completed the loading of all feature inside the "test.geojson" to the layer?

0

There are 0 answers