getFolderPathFromURL : function()

in src/main/js/bmaputil.js [299:309]


        getFolderPathFromURL : function (url) {
            var folderPath = '';
            var tmpURL = url;
            tmpURL = tmpURL.replace('https://', '');
            tmpURL = tmpURL.replace('http://', '');
            if (tmpURL && tmpURL !== '' && tmpURL.lastIndexOf('/') != -1) {
                folderPath = tmpURL.substring(0, tmpURL.lastIndexOf('/') + 1);
                folderPath = url.substring(0, url.indexOf(folderPath)) + folderPath;
            }
            return folderPath;
        },