update = {
let data = [geosource, geostitch, toposource];
let data_choice = data[datasource.choice];
let filtered_data = filtered(data_choice);
let geojson_reader = new ol.format.GeoJSON();
let filtered_features = geojson_reader.readFeatures(filtered_data, options)
countryLayer.getSource().clear()
countryLayer.getSource().addFeatures( filtered_features )
let location = locations[ view.choice ];
map.getView().animate({
center: ol.proj.fromLonLat( location.lonlat ),
zoom: location.zoom,
duration: 2000
});
}