Skip to content

Commit

Permalink
Update nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
valentasm committed Jun 12, 2024
1 parent da75e2d commit 8d1a163
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
8 changes: 4 additions & 4 deletions GoogleMapsComponents/GoogleMapsComponents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.3" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.3" />
<PackageReference Include="OneOf" Version="3.0.263" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.6" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.6" />
<PackageReference Include="OneOf" Version="3.0.271" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion ServerSideDemo/Pages/MapMarkerListPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<h1>Google Map Markers List</h1>

<GoogleMap @ref="@map1" Id="map1" Options="@mapOptions"></GoogleMap>
<GoogleMap @ref="@map1" Id="map1" Options="@mapOptions" OnAfterInit="OnAfterInit"></GoogleMap>
<button @onclick="AddMarker1">Add markers part 1</button>
<button @onclick="AddMarker2">Add markers part 2</button>
<button @onclick="RemoveMarker">Remove marker</button>
Expand Down
17 changes: 7 additions & 10 deletions ServerSideDemo/Pages/MapMarkerListPage.razor.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using GoogleMapsComponents;
using GoogleMapsComponents;
using GoogleMapsComponents.Maps;
using GoogleMapsComponents.Maps.Coordinates;
using GoogleMapsComponents.Maps.Extension;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using ServerSideDemo.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ServerSideDemo.Pages;

Expand Down Expand Up @@ -44,12 +44,9 @@ protected override void OnInitialized()
};
}

protected override async Task OnAfterRenderAsync(bool firstRender)
protected async Task OnAfterInit()
{
if (firstRender)
{
bounds = await LatLngBounds.CreateAsync(map1.JsRuntime);
}
bounds = await LatLngBounds.CreateAsync(map1.JsRuntime);
}

private async Task InvokeClustering()
Expand Down

0 comments on commit 8d1a163

Please sign in to comment.