Widget:Floors2gis: различия между версиями

Материал из ultracity
Перейти к навигации Перейти к поиску
Нет описания правки
Метка: ручная отмена
Нет описания правки
Строка 3: Строка 3:
<html>
<html>
<div id="container" style="width: 960px; height: 600px;"></div>
<div id="container" style="width: 960px; height: 600px;"></div>
<script
    charset="utf-8"
    src="https://floors-widget.api.2gis.ru/loader.js"
    id="dg-floors-widget-loader"
></script>
<script charset="utf-8">
<script charset="utf-8">
    // Получаем complexId из URL или используем значение по умолчанию
    const urlParams = new URLSearchParams(window.location.search);
    const complexId = urlParams.get('complexId') || '{{{complexId|141265769440516}}}';
   
     DG.FloorsWidget.init({
     DG.FloorsWidget.init({
         width: '960px',
         width: '960px',
         height: '600px',
         height: '600px',
         initData: {
         initData: {
             complexId: '{{{complexId|141265769440516}}}', // Значение по умолчанию
             complexId: complexId,
         },
         },
     });
     });

Версия от 12:58, 7 апреля 2025


Использование

Используйте виджет с параметром ID комплекса в 2GIS