Currently the Google Maps API Key is stored within Spartacus and we would like to configure this key such that it comes from SAP Commerce rather than being statically stored in Spartacus configuration.
Are there any APIs available or plans in the roadmap to have an integration to provide the Google Maps API key(s)? There is no documentation available to suggest that this is in the roadmap
Unfortunately not. While the API is also not configurable by a business user in the backend, it provides a site specific configuration that comes in handy. I guess that's what you're after.
The issue was raised in the backlog, see https://github.com/SAP/spartacus/issues/7947.
To take the site into account in a multi-site context, you'd need to customise the GoogleMapRendererService.renderMap
, and wire in the BaseSiteService.getActive
. Based on the active site, you could evaluate a custom configuration that holds the site specific API key.