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

Материал из ultracity
Перейти к навигации Перейти к поиску
Нет описания правки
Метка: отменено
Нет описания правки
Метка: отменено
Строка 3: Строка 3:
<html>
<html>
<div id="container" style="width: 800px; height: 600px;"></div>
<div id="container" style="width: 800px; height: 600px;"></div>
<script type="text/javascript">
<script
     function loadFloorsWidget(complexId) {
     charset="utf-8"
        var script = document.createElement('script');
    src="https://floors-widget.api.2gis.ru/loader.js"
        script.charset = 'utf-8';
    id="dg-floors-widget-loader"
        script.src = 'https://floors-widget.api.2gis.ru/loader.js';
></script>
        script.id = 'dg-floors-widget-loader';
<script charset="utf-8">
        script.onload = function() {
    DG.FloorsWidget.init({
            DG.FloorsWidget.init({
        width: '960px',
                width: '960px',
        height: '600px',
                height: '600px',
        initData: {
                initData: {
      complexId: complexId,
                    complexId: complexId,
        },
                },
     });
            });
        };
        document.head.appendChild(script);
    }
 
    // Use the template parameter for complexId
     loadFloorsWidget('{{{complexId}}}');
</script>
</script>
</html>
</html>

Версия от 13:17, 7 апреля 2025


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

Используйте виджет с параметром complexId:

Где 123456789 - ID комплекса в 2GIS.