bjtrounson / BlazorLeafletInterop

.NET 7 Blazor WASM Interop for Leaflet
8 stars 1 forks source link

Tiles loading in irregular way in blazor hybrid(.net maui) #33

Closed shivam286 closed 6 months ago

shivam286 commented 7 months ago

Hi, The maps are only loading tile layer also in irregular way in .net maui blazor hybrid also the canvas was found to be not loading. I've attached the ss.

the code I've used- image

the view I'm getting(notice the seams)- image

the div's are found to be not loading- image

whereas in the example blazor app you have provided the div's are loading completely.

bjtrounson commented 7 months ago

Hi,

Sorry it has taken me so long to reply to this only saw this today. I think the problem here is the wrapping layout "article" element in the MainLayout.razor seems to be messing with Leaflet a bit. If that doesn't fix it I would assume there is some other CSS styling messing with it. I wasn't able to fully reproduce your tiles being mis-aligned from your screen shots, but I was able to get a working example going.

It's .NET 8 project so hopefully that won't cause any issues Here is the link to the repo It is a similar example as in this repo for WASM, so there is probably some extra stuff that you can just remove in there. Hopefully is helps fix the issues you might be having or at least gives you a base to somewhat build from.

Regards, Ben