-
Notifications
You must be signed in to change notification settings - Fork 10
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
Not working for .NET 8.0? #48
Comments
Hello sir, |
Hi, seeing a similar issue again with .NET 8.0. Fresh blazor project.
EDIT: The issue seems to be with .NET 8.0, reverting back to 7.0 works perfectly. |
Yeah not working for me with .NET 8.0 either |
Using an example file, if you then the project to .NET 8.0 it works. However using a fresh project running with NET 8.0 a blank white box is drawn. |
@marshal-00 Did you start a project in 7.0 and then port it to 8.0 which made it work? Or what do you mean by example file? |
@Aadlei If you get one of the example projects supplied on the repo, then change the .NET version to 8.0 the map loads and displays correctly, however this is on an old template. |
@ichim Just for information I am using Blazor Server in my example, and have not seen any errors in the console both on the page and on the application. |
I dug around and I solved my issues. So in the code, below the page and above the components on the page, write: If this works for the others, then i recommend putting it on the repo description to avoid further confusion and frustration. |
@Aadlei Thats done the trick, disabling preredering fixes the issue! Great find! |
@Aadlei This worked for me in the same context. tanks |
To further expand on the solution, you can set prerender to true. The issue is the actual render mode in these templates. So you can actually just go to App.razor and replace So the reason why |
I'm searching for a suitable way to display an OSM map on a card (bootstrap element). I've previously used Leaflet.js, so I tried to use LeafletForBlazor.
After consulting the readme of the project I imported the package using NuGet, I added
@using LeafletForBlazor
to my _Imports.razor-file and added a<RealTimeMap>
-component to the home page, including the stated code. For some reason, no map was showing.To be sure that is has nothing to do with my project, I created a blank Blazor project in Visual Studio to try out this library. However, using the provided example in the readme-file still did not display any map.
When looking through the repository I saw the AddMapToBlazorPage-example. I thought to try this as well, as nothing was shown using the
<RealTimeMap>
-example that is on top of the readme/manual.Unfortunately, also this example does not seem to work. I added
and
to the Home.razor -file. Still, no map is displayed as you can see in the screenshot:
Note that a
<div>
with id set to "map" is generated. But no OSM-map is being displayed.Did I miss something while copy-pasting the examples into my (or template) project? Are the examples outdated? Or is the package not updated for usage in .NET 8.0?
The text was updated successfully, but these errors were encountered: