fr(google-maps): add forRoot() for global initializing
See original GitHub issueFeature Description
like many modules already use it, it would be nice if you could initialize the Google Map with the method forRoot() in app.module.ts with given parameters.
Use Case
initialize with parameters like:
- apiKey (link apiKey from environment.ts)
- language
- region
- styles (set global styles for map and marker)
These are the first ones I thought of. I’m sure there are many more.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Upgrading Your Maps JavaScript API Application from V2 to V3
Always reference the google.maps namespace. In v3, all Maps JavaScript API code is stored in the google.maps.* namespace instead of the global namespace....
Read more >How To Integrate Google Maps in Angular with ... - DigitalOcean
Learn how to add a Google Maps component to your Angular application ... Initializing the <agm-map> component with a latitude and longitude ...
Read more >Change angular-google-maps language dynamically
To do this, I've created a class called AppInitService. Here, I'll initialise various properties in my app on the fly, such as translation ......
Read more >https://opensource.apple.com/source/WebCore/WebCor...
(WebCore::HTMLMediaElement::playInternal): Treat an interruption as success and return true so that HTMLMediaElement::play() adds the Promise to the end of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s been brought up often, and we’ve discussed this periodically. One of the reasons we’ve never done this is that we want the user to be aware of the scripts that are being introduced on their page, and we’re worried about obfuscating that from the user. Regarding global options like styling, I will look into this further.
Thanks for clarifying. So I think there are two parts you’re requesting:
google.maps.MapTypeStyle).Both of those things sound like reasonable feature requests to me. I’m slightly unsure about (1) as it seems like the intention was that the API-loading responsibility is left to the consumers. Not sure about that though.
I assume @mbehrlich, if available, might be best to answer this.