3namespace Bitrix\Location\Source\Google;
5use Bitrix\Location\Common\Pool;
6use Bitrix\Location\Entity\Source;
7use Bitrix\Location\Repository\Location\IRepository;
8use Bitrix\Location\Common\CachedPool;
9use Bitrix\Location\StaticMap\ISourceStaticMapService;
10use Bitrix\Main\Data\Cache;
11use Bitrix\Main\EventManager;
12use Bitrix\Main\Web\HttpClient;
13use Bitrix\Main\Config\Option;
14use Bitrix\Main\Loader;
39 'socketTimeout' => 30,
40 'streamTimeout' => 30,
48 $pool =
new Pool($poolSize);
53 'locationSourceGoogleRequester',
54 Cache::createInstance(),
55 EventManager::getInstance()
59 $this->getBackendKey(),
79 'apiKey' => $this->getFrontendKey(),
80 'showPhotos' => $this->config->getValue(
'SHOW_PHOTOS_ON_MAP'),
81 'useGeocodingService' => $this->config->getValue(
'USE_GEOCODING_SERVICE'),
85 private function getBackendKey(): string
87 $configKey = $this->config->getValue(
'API_KEY_BACKEND');
90 return (
string)$configKey;
93 return (
string)Option::get(
'location',
'google_map_api_key_backend',
'');
96 private function getFrontendKey(): string
98 $key = $this->config->getValue(
'API_KEY_FRONTEND');
104 $key = Option::get(
'location',
'google_map_api_key',
'');
110 if (Loader::includeModule(
'fileman'))
112 $key = Fileman\UserField\Types\AddressType::getApiKey();
138 return $langMap[$bitrixLang] ?? $bitrixLang;
143 return $this->getBackendKey() && $this->getFrontendKey();
convertLang(string $bitrixLang)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key