web/static/js/mapbox.js
// Only shows title and description tab
Only shows title and description tab
Only shows title and description tab
function tab_creater() {
    markers.eachLayer(function(m) {
        var p = m.feature.properties;
        var tabs = document.createElement('div');
        tabs.className = 'tabs-ui';
        for (var key in p) {
            if (key === 'title' || key === 'description') {
                var tab = document.createElement('div');
                tab.className = 'tab';
                var input = document.createElement('input');
                input.type = 'radio';
                input.id = idify(key);
                input.name = 'tab-group'; 
                if (key === 'title') input.setAttribute('checked', true);
                tab.appendChild(input);
                tab.innerHTML += '<label for=' + idify(key) + '>' + key + '</label>' +
                '<div class="content">' +
                    p[key] +
                '</div>';
                tabs.appendChild(tab);
            }
        }
        m.bindPopup(tabs);
    });
}
function tab_creater ( ) { markers . eachLayer ( function ( m ) { var p = m . feature . properties ; var tabs = document . createElement ( 'div' ) ; tabs . className = 'tabs-ui' ; for ( var key in p ) { if ( key === 'title' || key === 'description' ) { var tab = document . createElement ( 'div' ) ; tab . className = 'tab' ; var input = document . createElement ( 'input' ) ; input . type = 'radio' ; input . id = idify ( key ) ; input . name = 'tab-group' ; if ( key === 'title' ) input . setAttribute ( 'checked' , true ) ; tab . appendChild ( input ) ; tab . innerHTML += '<label for=' + idify ( key ) + '>' + key + '</label>' + '<div class="content">' + p [ key ] + '</div>' ; tabs . appendChild ( tab ) ; } } m . bindPopup ( tabs ) ; } ) ; }
Only shows title and description tab
Only shows title and description tab
// Shorten m.feature.properties to p for convenience. // For your own needs, you might want this to be unique.