Open codingnuclei opened 1 year ago
https://github.com/angular/components/blob/main/src/google-maps/README.md The instructions at the url above seem out of date. For one am using Angular 17 and when the imports property is set to 'GoogleMap' as required here, there is error: "The component 'GoogleMap' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModule." I had to use 'GoogleMapsModule'. Then after getting all set, the map does not load at all. Not even a flash. Thanks
Feature Description
The Google maps team has announced web components for both the map and advanced marker functionality. With more to be added.
Announcement blog
It is currently in preview and available to use by appending "v=beta" (with some caveats like currently you must have a map-id).
Feature Request
Slim utility directives to aid in using these webcomponents in Angular.
Will help with:
@ViewChild
etc.Why?
From what I can tell from the source code the Angular Google Maps components are wrappers around the "native" Google maps api, abstracting the creation and adding an Angular sugar to the interactions (events, inputs).
Using the web components removes the need for this creation abstraction, simplifying maintenance and code base.
Angular natively already plays well with web components' events and prop binding.
I have already been playing around with this idea and it seems to work well.
If this is something the team thinks would be a good feature I will flesh out my work and post an example here.
I am also happy to take on this feature 😊
Use Case
A more easy plug and play experience with Google Maps webcomponents.