Выберите язык

Архив версий (GitHub)

WT Yandex map items v.2.1.0

2025-08-23 v.2.1.0 GitHub

Описание релиза

RU

Сохранение последнего вида карты

Добавлены новые опции, позволяющие как для одного экземпляра модуля, так и для всех сохранять на устройстве пользователя последний использованный центр (координаты) и масштаб (zoom) карты. Это позволит открыть карту в том же месте после обновления страницы или при повторном открытии браузера.

Определение местоположения пользователя

Модуль может определять местоположение пользователя и центрировать карту на нём. При одновременном использовании с функцией сохранения последнего вида карты определение геопозиции будет срабатывать только в первый раз. В дальнейшем, если обнаружены сохранённые данные центра и масштаба - будут использоваться они.

CSS классы для маркеров карты

Всем маркерам карты добавлен CSS-класс wt-yandex-map-items-marker. Для просмотренных маркеров (по которым кликали) добавляется CSS-класс wt-yandex-map-items-marker-viewed, что позволит выделять просмотренные маркеры с помощью стилей в CSS-файлах вашего шаблона. Также для контейнеров маркеров ymaps на карте добавлены data-атрибуты: data-module-id - id модуля и data-marker-id - id маркера.

Обработка GET-параметров в URL

Карта может реагировать на GET-параметры в url:

  • map[zoom] - устанавливает параметр масштаба.
  • map[center_latitude] и map[center_longitude] - широта и долгота центра карты.
  • map[marker_id] - id маркера, на котором центрируется карта.
    Таким образом вы можете создавать ссылку на карту с указанием конкретного маркера, на котором карта сфокусируется после загрузки маркеров. Например, https://site.ru/map?map[marker_id]=18465. Или же ссылку с указанием конкретных координат: https://site.ru/map?map[zoom]=16&map[center_latitude]=51.529706&map[center_longitude]=46.033922

IWT Yandex map items обзор модуля на YouTube

EN

Saving the last map view

New options have been added that allow both for one instance of the module and for all to save the last used center (coordinates) and zoom (zoom) of the map on the user's device. This will allow you to open the map in the same place after refreshing the page or when opening the browser again.

User geolocation detecting

The module can detect the user's location and center the map on it. When used simultaneously with the function of saving the last map view, the location detection will be triggered only for the first time. In the future, if saved center and scale data are found, they will be used.

CSS classes for map markers

CSS class wt-yandex-map-items-marker has been added to all map markers. The CSS class wt-yandex-map-items-marker-viewed is added to the viewed markers (which were clicked on), which will allow you to highlight the viewed markers using styles in the CSS files of your template. Also, for marker containers ymaps, data attributes have been added to the map: data-module-id - module id and data-marker-id - marker id.

URL GET parameters handling

The map can handle URL GET-parameters:

  • map[zoom] - sets the zoom parameter.
  • map[center_latitude] and map[center_longitude] - latitude and longitude of the map center.
  • map[marker_id] - id of the marker where the map is centered.

This way, you can create a link to the map with an indication of a specific marker that the map will focus on after the markers are loaded. For example, https://site.ru/map?map[marker_id]=18465. Or a link with specific coordinates:https://site.ru/map?map[zoom]=16&map[center_latitude]=51.529706&map[center_longitude]=46.033922`