<commit_before>metreTotals=0;
secondesTotals=0;

!function()
{
    console.log("trello mapservice")
    var TrelloMapService={};

    TrelloMapService.addMap=function(id,start,end,descId,callback,waypoints){

        if (waypoints==null)
            waypoints=[];

        var directionsDisplay;
        var directionsService = new google.maps.DirectionsService();
        var map;

        directionsDisplay = new google.maps.DirectionsRenderer();
        var helsinki = new google.maps.LatLng(61.0033, 26.0000523);
        var mapOptions = {
            zoom:7,
            center: helsinki
        }
        map = new google.maps.Map(document.getElementById(id), mapOptions);
        directionsDisplay.setMap(map);

        var request = {
            origin:start,
            destination:end,
            waypoints:waypoints,
            travelMode: google.maps.TravelMode.DRIVING
        };
        if (!start) {
            console.log({id,start,end});
            throw new Error("No startpoint");
        }
        if (!end) {
            throw new Error("No endpoint");
        }
        directionsService.route(request, function(response, status) {
            console.log(response)
            if(status=="NOT_FOUND") {
                console.log(request);
                throw new Error("Adress not found : '" + request.destination + "'");
            }
            var desc=document.getElementById(descId);
            var routeInfo=response.routes[0].legs[0];
            if (desc!=null && desc!=undefined)
                desc.innerHTML=routeInfo.distance.text+"..."+routeInfo.duration.text;
            metreTotals+=routeInfo.distance.value;
            secondesTotals+=routeInfo.duration.value;
            if (status == google.maps.DirectionsStatus.OK) {
                directionsDisplay.setDirections(response);
                callback()
            }
        });
    }
    this.TrelloMapService=TrelloMapService;
}()<commit_msg>Update mapService<commit_after>!function()
{
    var metreTotals=0;
    var secondesTotals=0;
    console.log("trello mapservice")
    var TrelloMapService={};

    TrelloMapService.addMap=function(id,start,end,descId,callback,waypoints){
        if (waypoints==null)
            waypoints=[];

        var directionsDisplay;
        var directionsService = new google.maps.DirectionsService();
        var map;

        directionsDisplay = new google.maps.DirectionsRenderer();
        var helsinki = new google.maps.LatLng(61.0033, 26.0000523);
        var mapOptions = {
            zoom:7,
            center: helsinki
        }
        map = new google.maps.Map(document.getElementById(id), mapOptions);
        directionsDisplay.setMap(map);

        var request = {
            origin:start,
            destination:end,
            waypoints:waypoints,
            travelMode: google.maps.TravelMode.DRIVING
        };
        if (!start) {
            console.log({id,start,end});
            throw new Error("No startpoint");
        }
        if (!end) {
            throw new Error("No endpoint");
        }
        directionsService.route(request, function(response, status) {
            console.log(response)
            if(status=="NOT_FOUND") {
                console.log(request);
                throw new Error("Adress not found : '" + request.destination + "'");
            }
            var desc=document.getElementById(descId);
            var routeInfo=response.routes[0].legs[0];
            if (desc!=null && desc!=undefined)
                desc.innerHTML=routeInfo.distance.text+"..."+routeInfo.duration.text;
            metreTotals+=routeInfo.distance.value;
            secondesTotals+=routeInfo.duration.value;
            if (status == google.maps.DirectionsStatus.OK) {
                directionsDisplay.setDirections(response);
                callback()
            }
		});
	}
    this.TrelloMapService=TrelloMapService;
}()
{'fraction_non_alphanumeric': 0.11647509578544062, 'fraction_numerical': 0.010217113665389528, 'mean_word_length': 2.02861562258314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6670630', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1061, 'n_words': 173}