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
<script type="text/javascript">
     charset="utf-8"
     function loadFloorsWidget(complexId) {
    src="https://floors-widget.api.2gis.ru/loader.js"
        var script = document.createElement('script');
    id="dg-floors-widget-loader"
        script.charset = 'utf-8';
></script>
        script.src = 'https://floors-widget.api.2gis.ru/loader.js';
<script charset="utf-8">
        script.id = 'dg-floors-widget-loader';
    DG.FloorsWidget.init({
        script.onload = function() {
        width: '960px',
            DG.FloorsWidget.init({
        height: '600px',
                width: '960px',
        initData: {
                height: '600px',
          complexId: '141265769440516',  
                initData: {
         },
                    complexId: complexId,
     });
                },
            });
         };
        document.head.appendChild(script);
    }
 
    // Use the template parameter for complexId
     loadFloorsWidget('{{{complexId}}}');
</script>
</script>
</html>
</html>

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


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

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

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