(function() {
    console.log('socket.io starting...');
    var _socket = io(),
        total = 0, geo = 0;
    console.log('socket.io connecting...');
    _socket.on('connect', function () {
        console.log('socket.io connect success...');
        _socket.emit('getDataBroadcasting', '', function (data) {
            console.log(data);
        });
        _socket.on('broadcasting', function (data) {
            console.log(data);
            $('#tweetsContent').prepend('<div class="tweet">'+data.text+'</div>');
            total++;
            let location = false;
            if (data.geo){
                console.log(data.geo);
                location = true;
            }
            if (data.place){
                console.log(data.place);
                location = true;
            }
            if (!location){
                geo++;
                $('#totalTweet').html(geo+"/"+total);
                //console.log()
                $.get("http://nominatim.openstreetmap.org/search/"+data.user.location+"?format=json&addressdetails=1&limit=1&polygon_svg=1", function(data){
                    if (data.length){
                        $.Map.addFeature(data[0].lon,data[0].lat);
                    }
                    //console.log(data);
                });
            }
        });
    });
})();

@@ -435,872 +435,8 @@
 a);%0A
-            $('#tweetsContent').prepend('%3Cdiv class=%22tweet%22%3E'+data.text+'%3C/div%3E');%0A            total++;%0A            let location = false;%0A            if (data.geo)%7B%0A                console.log(data.geo);%0A                location = true;%0A            %7D%0A            if (data.place)%7B%0A                console.log(data.place);%0A                location = true;%0A            %7D%0A            if (!location)%7B%0A                geo++;%0A                $('#totalTweet').html(geo+%22/%22+total);%0A                //console.log()%0A                $.get(%22http://nominatim.openstreetmap.org/search/%22+data.user.location+%22?format=json&addressdetails=1&limit=1&polygon_svg=1%22, function(data)%7B%0A                    if (data.length)%7B%0A                        $.Map.addFeature(data%5B0%5D.lon,data%5B0%5D.lat);%0A                    %7D%0A                    //console.log(data);%0A                %7D);%0A            %7D%0A
     

Add structure and functions