Description
Feature Description
The Google maps team has announced web components for both the map and advanced marker functionality. With more to be added.
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:
- google-maps api loading (remove the need to use httpclient jsonp backend and simplify usage)
- Access to the webcomponent instance to be easily used with
@ViewChild
etc. - Set google-map options like the current Angular component. Currently setting individual props is a pain with the web components.
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.