I am moving code from OpenLayers 3 to OpenLayers 4 (typescript)
I had this piece of code that would extend my extent so that all vector shapes I drew would be visible when the map loaded...
angular.forEach(webMapValues.vectorFieldLayer, function (Field, key)
{
webMapValues.mapObj.addLayer(Field);
webMapValues.extent = Field.getSource().getExtent();
webMapValues.totalExtent = ol.extent.extend(webMapValues.extent,
webMapValues.totalExtent);
})
in the above "ol.extent.extend" performed the magic for me and in OpenLayers 4 (typescript) I haven't been able to find the equivalent?
Any help is greatly appreciated!