-
Notifications
You must be signed in to change notification settings - Fork 99
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
Adding Blazor Custom Elements on to the map #306
Comments
Your example of overlay-popup is just html overlay it has not your desired func "user clicks on a marker". |
Thanks for the fast response! I want to add some more customized UI into the map, so when a marker is clicked an overlay is shown above the marker with in this case the custom element without styling that comes from the Google Maps library. Within these components are things like MudBlazor components used to make it more advanced, like actions on buttons based on the information of the marker. The Advanced Marker is just a more advanced variant of the standard marker, but I want the "more advanced" variant of the InfoWindow, just like the custom popups documentation from Google I mentioned in my first post. My current situation looks like this: So basically like this, but without the default styling and closing button etc. The default wrapping div ruins the looks of the table within as you can see. |
More advanced than advance :). Overall sadly i dont think it is in this library scope. Like it is missing google map functionality. It is more like extensions :). |
Well the thing is, the custom elements work like a charm within the Google Maps! So when looking at the Google documentation I mentioned for the Custom Popups, I need the Javascript instance of the Google Map. Is there any way to retrieve the instance after it was initialized by BlazorGoogleMaps? |
All items (i think even events) are stored in array with element guid mapObjects[item2.guidString]; I think most (or all) elements returns guid by which you could access it. |
Also speaking about performance and the best approach i could not help. There was/is some issue with performance and also i dont have big experience working google maps. IMO just apply google maps js principle and it should work in most cases. Maybe some users who created some PR here could help you. |
Closing due to inactivity |
Hi,
I want to add Custom Elements onto my BlazorGoogleMaps map so that when a user clicks on a marker, a custom popup will be shown.
The InfoWindow object has default behavior that isn't desired in the current scope (like the wrapper with styling around the content). Also enables the Custom Element more flexibility in changing the content of the popup.
What would be the best solution to place the rendered HTML structure onto the map?
https://developers.google.com/maps/documentation/javascript/examples/overlay-popup looks like a viable solution, but this isn't implemented in the library right now.
I also tried adding the element directly via some custom JS code, but I can't localize the JS map instance to add the map element..
Thanks in advance!
The text was updated successfully, but these errors were encountered: