Updated the Google Maps API endpoints for improved performance and compatibility
This commit is contained in:
@@ -237,15 +237,16 @@ class ContactControllerCore extends FrontController
|
||||
$this->addJS(_PS_JS_DIR_.'validate.js');
|
||||
|
||||
// GOOGLE MAP
|
||||
if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && ($PS_MAP_ID = Configuration::get('PS_MAP_ID')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
Media::addJsDef(
|
||||
array(
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
|
||||
'PS_MAP_ID' => $PS_MAP_ID,
|
||||
)
|
||||
);
|
||||
$this->addJS(
|
||||
'https://maps.googleapis.com/maps/api/js?key='.$PS_API_KEY.
|
||||
'&libraries=places&language='.$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
'&libraries=places,marker&loading=async&callback=initMap&language='.$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user