Bitrix API

LocationService extends BaseService uses RepositoryTrait

FinalYes

Class LocationService

Service to work with locations

Table of Contents

Methods

autocomplete()  : array<string|int, mixed>
delete()  : Result
Delete Location
findByCoords()  : Location|null
Find location by coordinates
findByExternalId()  : Location|bool|null
Find location by externalId
findById()  : Location|null|bool
Find Location by locationId
save()  : Result
Save Location

Methods

autocomplete()

public autocomplete(array<string|int, mixed> $params[, int $searchScope = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL ]) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
$searchScope : int = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL
Return values
array<string|int, mixed>

findByCoords()

Find location by coordinates

public findByCoords(float $lat, float $lng, int $zoom, string $languageId) : Location|null
Parameters
$lat : float
$lng : float
$zoom : int
$languageId : string
Return values
Location|null

findByExternalId()

Find location by externalId

public findByExternalId(string $externalId, string $sourceCode, string $languageId[, int $searchScope = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL ]) : Location|bool|null
Parameters
$externalId : string
$sourceCode : string
$languageId : string
$searchScope : int = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL
Return values
Location|bool|null

findById()

Find Location by locationId

public findById(int $locationId, string $languageId[, int $searchScope = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL ]) : Location|null|bool
Parameters
$locationId : int
$languageId : string
$searchScope : int = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL
Return values
Location|null|bool

        
On this page

Search results