Skip to content

Commit

Permalink
Return JSException if importdatafromurl failed
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudleclerc committed Apr 30, 2021
1 parent d38c0e2 commit d0a104b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/AzureMapsControl.Components/Data/DataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ public async ValueTask RemoveAsync(IEnumerable<Shape> shapes, IEnumerable<Featur
/// <returns></returns>
/// <exception cref="Exceptions.ComponentNotAddedToMapException">The control has not been added to the map</exception>
/// <exception cref="Exceptions.ComponentDisposedException">The control has already been disposed</exception>
/// <exception cref="Microsoft.JSInterop.JSException">The call to importDataFromUrl failed</exception>
public async ValueTask ImportDataFromUrlAsync(string url)
{
Logger?.LogAzureMapsControlInfo(AzureMapLogEvent.DataSource_ImportDataFromUrlAsync, "Importing data from url into data source");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class Datasource {
(Core.getMap().sources.getById(id) as azmaps.source.DataSource).clear();
}

public static importDataFromUrl(id: string, url: string): void {
(Core.getMap().sources.getById(id) as azmaps.source.DataSource).importDataFromUrl(url);
public static async importDataFromUrl(id: string, url: string): Promise<void> {
return await (Core.getMap().sources.getById(id) as azmaps.source.DataSource).importDataFromUrl(url);
}

public static remove(id: string, geometryIds: string[]): void {
Expand Down

0 comments on commit d0a104b

Please sign in to comment.