angular / angular/components

fr(google-maps): add forRoot() for global initializing

Open
#19,472 12 comments 5 reactions 0 assignees View on GitHub
area: google-maps feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Feature 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](https://angular-maps.com/api-docs/agm-core/interfaces/lazymapsapiloaderconfigliteral#info).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing Google Maps module usage in app.module.ts and the configuration source in environment.ts. Compare the requested apiKey, language, region, and styles options with the linked AGM API documentation. Done means a forRoot() initialization path accepts the required global parameters and supports the described use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.