From ed6bc80e371cf9e05659479d9d7a35abae8d6e54 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Tue, 18 Aug 2026 19:26:25 +0530 Subject: [PATCH] fixed : make map id optional --- controllers/front/ContactController.php | 4 +- controllers/front/GuestTrackingController.php | 3 +- controllers/front/OrderDetailController.php | 3 +- controllers/front/OurPropertiesController.php | 6 +-- controllers/front/ProductController.php | 6 +-- .../classes/HotelBranchInformation.php | 4 +- .../admin/AdminAddHotelController.php | 12 +++--- .../AdminHotelGeneralSettingsController.php | 9 ++--- .../hotelreservationsystem.php | 2 +- .../views/js/HotelReservationAdmin.js | 38 +++++++++++++------ .../views/js/searchResultsMap.js | 31 ++++++++++----- .../js/contact-form.js | 23 +++++++---- .../js/order-detail.js | 31 ++++++++++----- .../js/our-properties.js | 23 +++++++---- themes/hotel-reservation-theme/js/product.js | 28 ++++++++++---- 15 files changed, 144 insertions(+), 79 deletions(-) diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php index 1014a8b5f..acb21798d 100644 --- a/controllers/front/ContactController.php +++ b/controllers/front/ContactController.php @@ -237,11 +237,11 @@ class ContactControllerCore extends FrontController $this->addJS(_PS_JS_DIR_.'validate.js'); // GOOGLE MAP - if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && ($PS_MAP_ID = Configuration::get('PS_MAP_ID')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) { + if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && 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, + 'PS_MAP_ID' => Configuration::get('PS_MAP_ID'), ) ); $this->addJS( diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php index 596d54185..c685eb430 100644 --- a/controllers/front/GuestTrackingController.php +++ b/controllers/front/GuestTrackingController.php @@ -639,7 +639,6 @@ 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 @@ -647,7 +646,7 @@ 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, + 'PS_MAP_ID' => Configuration::get('PS_MAP_ID'), )); $this->addJS( diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php index 5696c7e39..217d296f4 100644 --- a/controllers/front/OrderDetailController.php +++ b/controllers/front/OrderDetailController.php @@ -884,7 +884,6 @@ class OrderDetailControllerCore 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 @@ -892,7 +891,7 @@ class OrderDetailControllerCore 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, + 'PS_MAP_ID' => Configuration::get('PS_MAP_ID'), )); $this->addJS( 'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places,marker&loading=async&callback=initMap&language='. diff --git a/controllers/front/OurPropertiesController.php b/controllers/front/OurPropertiesController.php index 52fd94a86..06520f044 100644 --- a/controllers/front/OurPropertiesController.php +++ b/controllers/front/OurPropertiesController.php @@ -111,7 +111,7 @@ class OurPropertiesControllerCore extends FrontController $hotelsInfo = array_slice($hotelsInfo, $page * 10, 10); } - if ($displayHotelMap && Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP') && Configuration::get('PS_MAP_ID')) { + if ($displayHotelMap && Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) { if ($hotelLocations = $objHotelInfo->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY'))) { $hotelLocationArray = str_replace(array('\n', '\r'), '', json_encode($hotelLocations)); } @@ -144,11 +144,11 @@ class OurPropertiesControllerCore extends FrontController $this->addJS(_THEME_JS_DIR_.'our-properties.js'); $this->addCSS(_THEME_CSS_DIR_.'our-properties.css'); // GOOGLE MAP - if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && ($PS_MAP_ID = Configuration::get('PS_MAP_ID')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) { + if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && 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 + 'PS_MAP_ID' => Configuration::get('PS_MAP_ID') ) ); diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 7430e93dd..decd83c62 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -66,9 +66,7 @@ class ProductControllerCore extends FrontController $this->addJqueryPlugin('jqzoom'); } - if (($PS_API_KEY = Configuration::get('PS_API_KEY')) - && ($PS_MAP_ID = Configuration::get('PS_MAP_ID')) - ) { + if ($PS_API_KEY = Configuration::get('PS_API_KEY')) { $objHotelRoomType = new HotelRoomType(); if ($roomTypeInfo = $objHotelRoomType->getRoomTypeInfoByIdProduct($this->product->id)) { $objHotelBranchInformation = new HotelBranchInformation($roomTypeInfo['id_hotel']); @@ -81,7 +79,7 @@ class ProductControllerCore extends FrontController 'longitude' => $objHotelBranchInformation->longitude, ), 'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')), - 'PS_MAP_ID' => $PS_MAP_ID + 'PS_MAP_ID' => Configuration::get('PS_MAP_ID') )); $this->addJS( diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 802ae8a5e..61083fde1 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -55,8 +55,8 @@ class HotelBranchInformation extends ObjectModel 'check_in' => array('type' => self::TYPE_STRING, 'required' => true), 'check_out' => array('type' => self::TYPE_STRING, 'required' => true), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), - 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), - 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate'), + 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate'), 'map_formated_address' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml'), 'map_input_text' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), 'active_refund' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php index 020227614..9ebe57852 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php @@ -211,7 +211,7 @@ class AdminAddHotelController extends ModuleAdminController } $smartyVars['state_var'] = $stateOptions; - $smartyVars['enabledDisplayMap'] = Configuration::get('PS_API_KEY') && Configuration::get('PS_MAP_ID') && Configuration::get('WK_GOOGLE_ACTIVE_MAP'); + $smartyVars['enabledDisplayMap'] = Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP'); $smartyVars['ps_img_dir'] = _PS_IMG_.'l/'; $smartyVars['PS_MAX_CHECKOUT_OFFSET'] = (int) Configuration::get('PS_MAX_CHECKOUT_OFFSET'); $smartyVars['PS_MIN_BOOKING_OFFSET'] = (int) Configuration::get('PS_MIN_BOOKING_OFFSET'); @@ -258,8 +258,8 @@ class AdminAddHotelController extends ModuleAdminController $maxCheckoutOffset = trim(Tools::getValue('max_checkout_offset')); $enableUseGlobalMinBookingOffset = Tools::getValue('enable_use_global_min_booking_offset'); $minBookingOffset = trim(Tools::getValue('min_booking_offset')); - $latitude = Tools::getValue('loclatitude'); - $longitude = Tools::getValue('loclongitude'); + $latitude = number_format((float) Tools::getValue('loclatitude'), 8, '.', ''); + $longitude = number_format((float) Tools::getValue('loclongitude'), 8, '.', ''); $map_formated_address = Tools::getValue('locformatedAddr'); $map_input_text = Tools::getValue('googleInputField'); $hotelAmenities = Tools::getValue('id_amenities', array()); @@ -610,8 +610,8 @@ class AdminAddHotelController extends ModuleAdminController $objHotelBranch->check_in = $check_in; $objHotelBranch->check_out = $check_out; $objHotelBranch->rating = $rating; - $objHotelBranch->latitude = Validate::isFloat($latitude) ? Tools::ps_round($latitude, 8) : $latitude; - $objHotelBranch->longitude = Validate::isFloat($longitude) ? Tools::ps_round($longitude, 8) : $longitude; + $objHotelBranch->latitude = Validate::isCoordinate($latitude) ? Tools::ps_round($latitude, 8) : $latitude; + $objHotelBranch->longitude = Validate::isCoordinate($longitude) ? Tools::ps_round($longitude, 8) : $longitude; $objHotelBranch->map_formated_address = $map_formated_address; $objHotelBranch->map_input_text = $map_input_text; $objHotelBranch->save(); @@ -994,7 +994,7 @@ class AdminAddHotelController extends ModuleAdminController // GOOGLE MAP $language = $this->context->language; $country = $this->context->country; - if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && $PS_MAP_ID) { + if ($PS_API_KEY = Configuration::get('PS_API_KEY')) { $this->addJS( 'https://maps.googleapis.com/maps/api/js?key='.$PS_API_KEY.'&libraries=places,marker&loading=async&language='. $language->iso_code.'®ion='.$country->iso_code.'&callback=initGoogleMaps' diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index c59bd79a8..8f0b51084 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -398,13 +398,15 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'PS_API_KEY' => array( 'title' => $this->l('Google Maps API Key'), 'hint' => $this->l('Unique API key for Google Maps.'), + 'validation' => 'isGenericName', 'type' => 'text', ), 'PS_MAP_ID' => array( 'title' => $this->l('Google Map ID'), - 'hint' => $this->l('Map Id for Google Maps.'), + 'hint' => $this->l('Map Id for Google Maps (optional).'), + 'validation' => 'isGenericName', 'type' => 'text', - 'desc' => $this->l('Google Maps API Key and Google Map ID is required to display Google Maps.') + 'desc' => $this->l('Google Maps API Key is required to display Google Maps. Google Map ID is optional.') ), 'WK_GOOGLE_ACTIVE_MAP' => array( 'title' => $this->l('Display Google Maps For Hotel Location'), @@ -621,9 +623,6 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController if (!Tools::getValue('PS_API_KEY')) { $this->errors[] = $this->l('Please enter Google API key.'); } - if (!Tools::getValue('PS_MAP_ID')) { - $this->errors[] = $this->l('Please enter Google Map Id.'); - } } if (!trim(Tools::getValue('PS_SHOP_NAME'))) { $this->errors[] = $this->l('Website name field is required'); diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php index 2c4e74ced..9b35b1b0d 100644 --- a/modules/hotelreservationsystem/hotelreservationsystem.php +++ b/modules/hotelreservationsystem/hotelreservationsystem.php @@ -288,8 +288,8 @@ class HotelReservationSystem extends Module if (Tools::getValue('controller') == 'category') { if (($apiKey = Configuration::get('PS_API_KEY')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP') - && ($PS_MAP_ID = Configuration::get('PS_MAP_ID')) ) { + $PS_MAP_ID = Configuration::get('PS_MAP_ID'); $idCategory = Tools::getValue('id_category'); $idHotel = HotelBranchInformation::getHotelIdByIdCategory($idCategory); $objHotel = new HotelBranchInformation($idHotel, $this->context->language->id); diff --git a/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js b/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js index 4faafa4da..d90a1246a 100644 --- a/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js +++ b/modules/hotelreservationsystem/views/js/HotelReservationAdmin.js @@ -84,11 +84,15 @@ var GoogleMapsManager = { if (!this.map) { var that = this; that.setDefaultLatLng(function() { - that.map = new google.maps.Map($(that.mapDiv).get(0), { + var mapOptions = { zoom: that.defaultZoom, clickableIcons: true, - mapId: PS_MAP_ID - }); + }; + if (PS_MAP_ID) { + mapOptions.mapId = PS_MAP_ID; + } + that.map = new google.maps.Map($(that.mapDiv).get(0), mapOptions); + google.maps.event.trigger(that.map, 'resize'); that.map.setCenter(that.defaultLatLng); if (that.defaultLatLng && that.formattedAddress) { that.addMarker(that.defaultLatLng, null, that.formattedAddress); @@ -171,12 +175,22 @@ var GoogleMapsManager = { icon.style.width = '24px'; icon.style.height = '24px'; - var marker = new google.maps.marker.AdvancedMarkerElement({ - position: latLng, - map: that.map, - content: icon, - draggable: true, - }); + var marker; + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + position: latLng, + map: that.map, + content: icon, + draggable: true, + }); + } else { + marker = new google.maps.Marker({ + position: latLng, + map: that.map, + icon: PS_STORES_ICON, + draggable: true, + }); + } that.markers.push(marker); marker.addListener('dragend', function(e) { var latLng = { @@ -234,10 +248,10 @@ var GoogleMapsManager = { that.clearAllMarkers(); }); - var latLng = marker.position; + var latLng = marker.position ? marker.position : marker.getPosition(); that.setFormVars({ - lat: latLng.lat, - lng: latLng.lng, + lat: typeof latLng.lat === 'function' ? latLng.lat() : latLng.lat, + lng: typeof latLng.lng === 'function' ? latLng.lng() : latLng.lng, formattedAddress: content, inputText: $('#pac-input').val(), }); diff --git a/modules/hotelreservationsystem/views/js/searchResultsMap.js b/modules/hotelreservationsystem/views/js/searchResultsMap.js index 766466446..522c00986 100644 --- a/modules/hotelreservationsystem/views/js/searchResultsMap.js +++ b/modules/hotelreservationsystem/views/js/searchResultsMap.js @@ -26,25 +26,38 @@ function initMap() { lng: Number(hotel_location.longitude), }; - const map = new google.maps.Map($('#search-results-wrap .map-wrap').get(0), { + const mapOptions = { zoom: 10, center: hotelLocation, disableDefaultUI: true, fullscreenControl: true, - mapId: PS_MAP_ID - }); + }; + if (PS_MAP_ID) { + mapOptions.mapId = PS_MAP_ID; + } + const map = new google.maps.Map($('#search-results-wrap .map-wrap').get(0), mapOptions); let icon = document.createElement('img'); icon.src = PS_STORES_ICON; icon.style.width = '24px'; icon.style.height = '24px'; - const marker = new google.maps.marker.AdvancedMarkerElement({ - map: map, - position: hotelLocation, - title: location.hotel_name, - content: icon, - }); + let marker; + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + map: map, + position: hotelLocation, + title: location.hotel_name, + content: icon, + }); + } else { + marker = new google.maps.Marker({ + map: map, + position: hotelLocation, + title: location.hotel_name, + icon: PS_STORES_ICON, + }); + } marker.query = location.query || null; marker.latitude = hotelLocation.lat; diff --git a/themes/hotel-reservation-theme/js/contact-form.js b/themes/hotel-reservation-theme/js/contact-form.js index 9b16260d5..e4bb06eff 100644 --- a/themes/hotel-reservation-theme/js/contact-form.js +++ b/themes/hotel-reservation-theme/js/contact-form.js @@ -66,7 +66,7 @@ function initMap() { hotelLocationArray = JSON.parse(hotelLocationArray); // Display a map on the page - map = new google.maps.Map(document.getElementById("map"), {mapId: PS_MAP_ID}); + map = new google.maps.Map(document.getElementById("map"), PS_MAP_ID ? {mapId: PS_MAP_ID} : {}); google.maps.event.trigger(map, 'resize'); map.setTilt(45); @@ -84,12 +84,21 @@ function initMap() { icon.style.width = '24px'; icon.style.height = '24px'; - marker = new google.maps.marker.AdvancedMarkerElement({ - map: map, - position: position, - title: location.hotel_name, - content: icon, - }); + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + map: map, + position: position, + title: location.hotel_name, + content: icon, + }); + } else { + marker = new google.maps.Marker({ + map: map, + position: position, + title: location.hotel_name, + icon: PS_STORES_ICON, + }); + } // Allow each marker to have an info window google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { diff --git a/themes/hotel-reservation-theme/js/order-detail.js b/themes/hotel-reservation-theme/js/order-detail.js index 0aa0c0e63..26b9e5a32 100644 --- a/themes/hotel-reservation-theme/js/order-detail.js +++ b/themes/hotel-reservation-theme/js/order-detail.js @@ -139,25 +139,38 @@ function initMap() { lat: Number($(this).attr('latitude')), lng: Number($(this).attr('longitude')), }; - const map = new google.maps.Map(element, { + const mapOptions = { zoom: 10, center: hotelLocation, disableDefaultUI: true, fullscreenControl: true, - mapId: PS_MAP_ID - }); + }; + if (PS_MAP_ID) { + mapOptions.mapId = PS_MAP_ID; + } + const map = new google.maps.Map(element, mapOptions); let icon = document.createElement('img'); icon.src = PS_STORES_ICON; icon.style.width = '24px'; icon.style.height = '24px'; - const marker = new google.maps.marker.AdvancedMarkerElement({ - position: hotelLocation, - map: map, - title: location.hotel_name, - content: icon, - }); + let marker; + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + position: hotelLocation, + map: map, + title: location.hotel_name, + content: icon, + }); + } else { + marker = new google.maps.Marker({ + position: hotelLocation, + map: map, + title: location.hotel_name, + icon: PS_STORES_ICON, + }); + } marker.query = location.query || null; marker.latitude = hotelLocation.lat; diff --git a/themes/hotel-reservation-theme/js/our-properties.js b/themes/hotel-reservation-theme/js/our-properties.js index 81a0d0be9..3fe12ac2c 100644 --- a/themes/hotel-reservation-theme/js/our-properties.js +++ b/themes/hotel-reservation-theme/js/our-properties.js @@ -34,7 +34,7 @@ function initMap() { hotelLocationArray = JSON.parse(hotelLocationArray); // Display a map on the page - map = new google.maps.Map(document.getElementById("map"), {mapId: PS_MAP_ID}); + map = new google.maps.Map(document.getElementById("map"), PS_MAP_ID ? {mapId: PS_MAP_ID} : {}); google.maps.event.trigger(map, 'resize'); map.setTilt(45); @@ -52,12 +52,21 @@ function initMap() { icon.style.width = '24px'; icon.style.height = '24px'; - marker = new google.maps.marker.AdvancedMarkerElement({ - map: map, - position: position, - title: location.hotel_name, - content: icon, - }); + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + map: map, + position: position, + title: location.hotel_name, + content: icon, + }); + } else { + marker = new google.maps.Marker({ + map: map, + position: position, + title: location.hotel_name, + icon: PS_STORES_ICON, + }); + } // Allow each marker to have an info window google.maps.event.addListener(marker, 'click', (function(marker, i) { diff --git a/themes/hotel-reservation-theme/js/product.js b/themes/hotel-reservation-theme/js/product.js index b0771177c..d7f482e49 100644 --- a/themes/hotel-reservation-theme/js/product.js +++ b/themes/hotel-reservation-theme/js/product.js @@ -1310,11 +1310,14 @@ function updateRoomServiceQuantity(that) { function initMap() { - const map = new google.maps.Map($('#room_type_map_tab .map-wrap').get(0), { + const mapOptions = { zoom: 10, streetViewControl: false, - mapId: PS_MAP_ID - }); + }; + if (PS_MAP_ID) { + mapOptions.mapId = PS_MAP_ID; + } + const map = new google.maps.Map($('#room_type_map_tab .map-wrap').get(0), mapOptions); const hotelLatLng = { lat: Number(hotel_location.latitude), @@ -1326,11 +1329,20 @@ function initMap() { icon.src = PS_STORES_ICON; icon.style.width = '24px'; icon.style.height = '24px'; - let marker = new google.maps.marker.AdvancedMarkerElement({ - position: hotelLatLng, - map: map, - content: icon, - }); + let marker; + if (PS_MAP_ID) { + marker = new google.maps.marker.AdvancedMarkerElement({ + position: hotelLatLng, + map: map, + content: icon, + }); + } else { + marker = new google.maps.Marker({ + position: hotelLatLng, + map: map, + icon: PS_STORES_ICON, + }); + } const uiContent = $('#room-info-map-ui-content .hotel-info-wrap').get(0); map.controls[google.maps.ControlPosition.LEFT_TOP].push(uiContent);