Update source in map style

Is there a way to update style source without removing and adding it again? Something similar to Android?

>  FuncUtils.apply(sourceOptional, source -> {
>                         GeoJsonSource geoJsonSource = (GeoJsonSource) source;
>                         geoJsonSource.setGeoJson(featureCollection.toString());
>                     });

Hi,
there is a very similar syntax in iOS for example:

let geoJsonLine = TTGeoJSONLineString(coordinatesData: route.coordinatesData(), with: nil)
let geoJsonSource = TTMapGeoJSONSource.create(withID: GEOJSON_SOURCE)
geoJsonSource.setGeoJSONObject(geoJsonLine)
currentStyle.add(geoJsonSource)

where currentStyle is TTMapStyle

Yes, but wouldn’t that mean that the source has been added twice? I just want to update the coordinates inside source because those coordinates can change multiple times or if i add a new source with the same name that last one will be replaced?

You need to remove the previous one and add the updated source.