I tried create google map overlay for Blazor app
public partial class HomePage : ComponentBase
{
private GeoCollection googleMap = new GeoCollection();
private MapView mapView = new MapView();
protected async override Task OnInitializedAsync()
{
var google = new GoogleMapsLayer
{
ApiKey = "ApiKey",
Projection = new Projection
{
Srid = 4326,
ProjString = Projection.GetGoogleMapProjString()
},
IsVisible = true,
MapType = GoogleMapsMapType.RoadMap
};
googleMap.Add(google);
await base.OnInitializedAsync();
}
}
<MapView Id=“map” MapUnit=“ThinkGeo.Core.GeographyUnit.Meter” Center="@(new PointShape(-11037792.463030849, 4953010.053845501))"
Zoom=“5” @ref="@mapView" >
But I have a result with empty screen
I dont know what a problem, I don
t have any errors. Maybe anyone know how to create google map overlay for blazor app?