Updated the Google Maps API endpoints for improved performance and compatibility

This commit is contained in:
vishalsingh.qlo325
2025-06-23 18:30:31 +05:30
parent bd7bfcfdf5
commit 475a547bd6
16 changed files with 171 additions and 227 deletions

View File

@@ -639,6 +639,7 @@ class GuestTrackingControllerCore extends FrontController
if (Validate::isLoadedObject($objHotelBranchInformation)) {
if (($apiKey = Configuration::get('PS_API_KEY'))
&& Configuration::get('WK_GOOGLE_ACTIVE_MAP')
&& ($PS_MAP_ID = Configuration::get('PS_MAP_ID'))
) {
if (floatval($objHotelBranchInformation->latitude) != 0
&& floatval($objHotelBranchInformation->longitude) != 0
@@ -646,10 +647,11 @@ class GuestTrackingControllerCore extends FrontController
Media::addJsDef(array(
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
'initiateMap' => 1,
'PS_MAP_ID' => $PS_MAP_ID,
));
$this->addJS(
'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places&language='.
'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places,marker&loading=async&callback=initMap&language='.
$this->context->language->iso_code.'&region='.$this->context->country->iso_code
);