3namespace Bitrix\Location\Source\Osm;
5use Bitrix\Location\Entity\Source;
6use Bitrix\Location\Repository\Location\IRepository;
7use Bitrix\Location\Source\Osm\Api\Api;
8use Bitrix\Location\StaticMap\ISourceStaticMapService;
9use Bitrix\Main\Application;
10use Bitrix\Main\ModuleManager;
11use Bitrix\Main\Context;
12use Bitrix\Main\License\UrlProvider;
70 'token' => $token ? $token->getToken() :
null,
71 'useGeocodingService' =>
true,
90 return $langMap[$bitrixLang] ?? $bitrixLang;
98 if (defined(
'BX24_HOST_NAME') && ModuleManager::isModuleInstalled(
'bitrix24'))
104 $result = Context::getCurrent()->getServer()->get(
'HTTP_HOST');
106 if (strpos(
$result,
':') !==
false)
123 return $serviceUrl . static::API_PATH;
128 if (defined(
'LOCATION_OSM_SERVICE_URL') && LOCATION_OSM_SERVICE_URL)
130 return (
string)LOCATION_OSM_SERVICE_URL;
133 return 'https://osm-' . $this->getSubDomainSuffix() .
'-002.' . $this->urlProvider->getTechDomain();
138 if (defined(
'LOCATION_OSM_MAP_SERVICE_URL') && LOCATION_OSM_MAP_SERVICE_URL)
140 return (
string)LOCATION_OSM_MAP_SERVICE_URL;
143 return 'https://osm-' . $this->getSubDomainSuffix() .
'-001.' . $this->urlProvider->getTechDomain();
148 return $this->tokenRequester->
getToken();
153 $token = $this->tokenRequester->getToken();
159 return !$this->tokenRequester->hasLicenseIssues();
162 private function getSubDomainSuffix(): string
164 $region = Application::getInstance()->getLicense()->getRegion();
166 return in_array(
$region, [
'ru',
'by',
'kz',
'uz'],
true) ?
'ru' :
'de';
convertLang(string $bitrixLang)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)