rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
309 stars 99 forks source link

New method services.AddBlazorGoogleMaps("YOUR_KEY_GOES_HERE"); only is used in Maps, not other components #333

Closed rafadst closed 1 month ago

rafadst commented 1 month ago

The new method to load the js of googlemaps is not used in other methods.

For example, in the case that only Autocomplete componente is used, you will have the error that "fn is undefined". If you use GoogleMap component, everything is ok. I've checked source code and the only component that uses IBlazorGoogleMapsKeyService is MapComponent

https://github.com/rungwiroon/BlazorGoogleMaps/blob/007556ea69f2fa4613a4173a1094a56c415382a2/GoogleMapsComponents/MapComponent.cs#L19

I think all components should use them, If not, at least, warn it on readme.

rafadst commented 1 month ago

Ignore this, must be my bad. In another project from zero is working ok. I close this.