-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlazorLeaflet not working with WebAssembly and .net core 3.1 #46
Comments
A follow-up: I get the same error when using the lib in a server project. It does however work (server-side only, not with WebAssembly), when I include the BlazorLeaflet project in my own solution, and reference the project from my web app. |
Same issue here. The only way I manage to run this package is by downloading project and then referencing to my app |
Similiar issue in client-side Blazor Webassembly (.net 5.0): "Error: Could not find 'window.leafletBlazor.create' ('leafletBlazor' was undefined)." Am I missing something? |
I was having similar issues; resolved them by referencing leaflet.js in index.html/_Host.cshtml. The README doesn't specify to do this, but I believe you have to? From sample project:
|
My experience was that with an older browser I got the window.window error, but with newer browsers it seems to work. I actually believe (as far as I can remember) it was a challenge for older browsers with the spread operator |
I was getting the same error message as shown above. The fix for me was to add the following line after your leaflet script tag.
I am using Leaflet 1.9.3 and the 0.4.0 alpha release of the BlazorLeaflet library from NuGet. I found this by reviewing the example section and saw this was the only difference between my code and the example code. |
Do you have any info about this problem? For me the only possibility to solve this was to add the BlazorLeaflet project to my solution, other combinations had failed. |
Hello,
when I download the repository and run the sample, all works fine. However, when I try integrating a map in my own application, I get this error:
Microsoft.JSInterop.JSException: Could not find 'leafletBlazor' in 'window.window'.
I referenced the BlazorLeaflet.dll file I built myself from my project and added a script reference in index.html. Do I have to do anything beyond that to get it to work?
Thanks! Greets, Menno
The text was updated successfully, but these errors were encountered: