Skip to content
  1. Extras
  2. YandexMapsLocator
  3. For developers
  4. Extension API

Extension API

Contract version 1 (LocatorExtensionApi::CONTRACT_VERSION). Free defines the interfaces. Pro and third-party packages hook in via events.

Feature providers

Interface FeatureProviderInterface, event OnYandexMapsLocatorRegisterFeatureProviders:

MethodPurpose
capabilities()Tags (pro → REST v1)
frontendModules()ES modules for locator.js (src is an absolute URL from the site root)
apiFields()Extra REST fields (?fields=)

ProFeatureProvider: capability pro, module /assets/components/yandexmapslocatorpro/js/pro.js, API fields is_open_now, working_hours_schedule, CSV processors.

Filters

Interface FilterInterface, event OnYandexMapsLocatorRegisterFilters.

Free: category. Pro: working_now, minishop_product.

REST hooks

  • OnYandexMapsLocatorSerializeLocation: fields for one location (data by ref)
  • OnYandexMapsLocatorBeforeApiResponse: full response payload

See Events, REST API.