Skip to content
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

expose MAPBOX_GEOCODER_API_KEY #152

Closed
paullryan opened this issue Jun 6, 2019 · 0 comments
Closed

expose MAPBOX_GEOCODER_API_KEY #152

paullryan opened this issue Jun 6, 2019 · 0 comments

Comments

@paullryan
Copy link
Contributor

So that we can provide the MAPBOX_GEOCODER_API_KEY from a loaded service (e.g. get the key from server side configs). We should expose MAPBOX_GEOCODER_API_KEY like we do with MAPBOX_API_KEY.

Allows for

    {
      provide: MAPBOX_GEOCODER_API_KEY,
      useFactory: mapboxKeyFactory,
      deps: [EnvService]
    },

where mapboxKeyFactory looks something like

export function mapboxKeyFactory(env: EnvService) {
  return env.mapbox.accessToken;
}

and the EnvService loads the env from an external source.

paullryan added a commit to nomadreservations/ngx-mapbox-gl that referenced this issue Jun 6, 2019
@Wykks Wykks closed this as completed in 67be0b4 Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant