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

Geocoding does not work with recommended API Keys setup #150

Closed
jeykodev opened this issue Feb 1, 2021 · 1 comment
Closed

Geocoding does not work with recommended API Keys setup #150

jeykodev opened this issue Feb 1, 2021 · 1 comment
Labels
Milestone

Comments

@jeykodev
Copy link

jeykodev commented Feb 1, 2021

Hi,

in the Docs it is mentioned, that the recommended way to include the Google Maps API Keys is to use the Pimcore System Settings. (https://github.com/dachcom-digital/pimcore-toolbox/blob/master/docs/11_ElementsOverview.md#i-pimcore-configuration) But when storing the keys only in the system settings, the Geocoding Feature does not work.

I think there is something wrong with the Key lookup in the following section. configNode does not contain any key, when the GM Keys are stored only in the System Settings.

// first try to get server-api-key
if (!empty($configNode) && isset($configNode['simple_api_key']) && !empty($configNode['simple_api_key'])) {
$key = '&key=' . $configNode['simple_api_key'];
}
// if not set, get browser-api-key
if ($key === '' && !empty($configNode) && isset($configNode['map_api_key']) && !empty($configNode['map_api_key'])) {
$key = '&key=' . $configNode['map_api_key'];
}

@jeykodev jeykodev changed the title Inconsistent Behavior with Google Maps API Key Geocoding does not work with recommended API Keys setup Feb 1, 2021
@solverat solverat added this to the 3.3.0 milestone Jun 4, 2021
@solverat solverat added the bug label Jun 4, 2021
@solverat
Copy link
Member

solverat commented Jun 4, 2021

Yes, you're right. There was an issue in extension compilation itself. The default parameters are not available at time of compilation (prepend) so we need to call these parameters on runtime!

Fixed with #157!

@solverat solverat closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants