Closed BenBurge closed 1 year ago
I think it is impossible to load map on OnInitializedAsync (or at least there are some limitations). Maybe you could use some callback to achieve OnInitializedAsync initilizations. I think limitations comes from google maps itself since it could draw map while dom isnt rendered. Smth like that.
You should do at OnInitializedAsync on firstRender:true.
If you look at GoogleMap (this library) implementation you will see that it is implement same way i reccomended OnAfterRenderAsync
Thank you! I will give that a try and see if I can get it working using after render.
That totally fixed my issue. Guess I should pay better attention to the lifecycle of Blazor and Javascript bits.
No problem. I am always ready to help.
BlazorGoogleMaps Version: 3.0.5
When trying to run the map logic with a marker I am getting the following error message:
TypeError: Cannot read properties of undefined (reading 'defaultView')
JS Stack Trace
CaseMapView.razor
CaseMapView.razor.cs
If I do this same thing on the Index component page I don't get this error message. The code is exactly the same on both pages so I am unsure what may be causing this JS exception. Let me know if I can give you any more details.