-
Notifications
You must be signed in to change notification settings - Fork 106
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
Map ui controls double render on blazor web app #365
Comments
Any console error? |
https://github.com/NIZO0/BlazorGoogleMapsBugRepro I created a repro project. |
How to reproduce? Try put random number for v= maybe it cached since assebly version didnt changed <script src="_content/BlazorGoogleMaps/js/objectManager.js?v=@typeof(App).Assembly.GetName().Version"></script> |
Honestly i saw arrows just now. You should mentions whats wrong. Buggy isnt clear. I dont know how to help. It looks like some blazor stuff. |
@NIZO0 We are seeing exact same solution in our production app.. @valentasm1 please have a second look at @NIZO0 repo as it worked first to replicate the issue via:
This repo is minimalistic so creds to @NIZO0 for taking the time to make it. The following image is from our own solution. The following is from the reproduction repo by @NIZO0: |
Sorry but i dont have ideas. I dont work with blazor, i dont work with google maps, so my knowledge is limited. I understand frustration, but my time is very limited and very a lot of. |
Regardless, thank you for taking the time to read and reply, we will be looking into the newer gmp-map javascript api that google has given and see about potentially extending it to a library eventually (if time permits). |
What difference between div and gpm-map? |
It seems to inherently work better with server rendered components as the items of the maps element can be declared directly as html elements: You can see both choices on the left hand side as "Add a Google Map with a marker using HTML" and "Add a Google Map with a marker using Javascript" If the gmp version can load maps past initial page load (so when dynamically fed gmp elements), then populating the page with gmp elements is much more like how blazor server side operates, but arguably at a networking cost due to the increase in package sizes required, but for most apps, it will be negligible (sidenote: not sure how well optimized the blazor javascript interop synchronization works, so might actually not be a drawback to define the map in gmp elements). |
Created related task. It think gmp-map is out of scope currently. |
Did you found solution? |
Im getting this error as well is there any solution? Im using server side rendering as well |
For me the solution was to add
|
This worked for me, we had stalled the project for a while and focused on more important areas, but tried to just insert it. It adds quite a bit of overhead as it is no longer doing navigation caching I would assume, but if it is only added to the navigation elements that leads to a map, then it is acceptable |
I will add to main page documentation. Awesome. |
Could you try |
The Map renders correctly the first time. However Navigating to a certain page and then navigating back to the MapPage bugs the UI visually and interactively. Hovering over a marker or trying to grap it won't work.
First Render

Further Renders

The text was updated successfully, but these errors were encountered: