<commit_before>function getBaseMapName(data) {
    var name = data["name"];
    if (name.includes(".")) {
        var basemap = name.split(".")[0];
    } else {
        var basemap = name;
    }
    return basemap;
}

var accessData = {
    // contains the keys for basemaps that need some identification data (apikey, access token or ID code)
    Thunderforest: {
        keyString: "apikey",
        idString: "",
        name: "Thunderforest",
    },
    OpenWeatherMap: {
        keyString: "apiKey",
        idString: "",
        name: "OpenWeatherMap",
    },
    MapTiler: {
        keyString: "key",
        idString: "",
        name: "MapTiler",
    },
    MapBox: {
        keyString: "accessToken",
        idString: "",
        name: "MapBox",
    },
    Jawg: {
        keyString: "accessToken",
        idString: "",
        name: "Jawg",
    },
    TomTom: {
        keyString: "apikey",
        idString: "",
        name: "TomTom",
    },
    HERE: {
        keyString: "app_code",
        idString: "app_id",
        name: "HERE",
    },
    HEREv3: {
        keyString: "apiKey",
        idString: "",
        name: "HEREv3",
    },
    AzureMaps: {
        keyString: "subscriptionKey",
        idString: "",
        name: "AzureMaps",
    },
};

function initMap(el, data, accessData) {
    basemap = getBaseMapName(data);

    const mainContainer = document.createElement("div");
    mainContainer.className = "main-container";
    el.append(mainContainer);

    var titleDiv = document.createElement("h2");
    titleDiv.className = "title-container";
    titleDiv.textContent = data["name"];
    mainContainer.append(titleDiv);

    var mapContainer = document.createElement("div");
    mapContainer.className = "map-container";
    mainContainer.append(mapContainer);

    key = Object.keys(data);
    val = Object.values(data);
    nbOfRows = Object.keys(data).length;
    var latitude = 0;
    var longitude = 0;
    var zoom = 1;

    try {
        //---------------------Basemaps with specific locations -------------------------------
        //----and zooms to optimize the map views restricted to given geographic areas---------
        if (
            data["name"] === "Esri.ArcticOceanReference" ||
            data["name"] === "Esri.ArcticOceanBase"
        ) {
            latitude = 65.421505; // Artic ocean
            longitude = -70.965421;
            zoom = 1;
        } else if (data["name"] === "Esri.AntarcticBasemap") {
            latitude = 82.8628; // Arctic ocean
            longitude = 135.0;
            zoom = 6;
        } else if (basemap === "OpenFireMap" || basemap === "OpenSeaMap") {
            latitude = 50.1109; // Frankfurt
            longitude = 8.6821;
            zoom = 14;
        } else if (basemap === "OpenAIP") {
            latitude = 50.1109; // Frankfurt
            longitude = 8.6821;
            zoom = 9;
        } else if (basemap === "Stamen") {
            latitude = 32.7766642; // Dallas
            longitude = -96.7969879;
            zoom = 6;
        } else if (basemap === "FreeMapSK") {
            latitude = 48.736277; // Banská <NAME>
            longitude = 19.146192;
            zoom = 14;
        } else if (basemap === "JusticeMap") {
            latitude = 32.7766642; // Dallas
            longitude = -96.7969879;
            zoom = 10;
        } else if (
            basemap === "OpenWeatherMap" ||
            basemap === "Esri" ||
            basemap === "USGS" ||
            basemap === "WaymarkedTrails"
        ) {
            latitude = 32.7766642; // Dallas
            longitude = -96.7969879;
            zoom = 4;
        } else if (basemap === "BasemapAT") {
            latitude = 47.5652; // Liezen
            longitude = 14.2424;
            zoom = 14;
        } else if (basemap === "nlmaps") {<commit_msg>Change JusticeMap lat/lon/zoom imposed conditions to have data visible on the map of the gallery. (#127)<commit_after>function getBaseMapName(data) {
    var name = data["name"];
    if (name.includes(".")) {
        var basemap = name.split(".")[0];
    } else {
        var basemap = name;
    }
    return basemap;
}

var accessData = {
    // contains the keys for basemaps that need some identification data (apikey, access token or ID code)
    Thunderforest: {
        keyString: "apikey",
        idString: "",
        name: "Thunderforest",
    },
    OpenWeatherMap: {
        keyString: "apiKey",
        idString: "",
        name: "OpenWeatherMap",
    },
    MapTiler: {
        keyString: "key",
        idString: "",
        name: "MapTiler",
    },
    MapBox: {
        keyString: "accessToken",
        idString: "",
        name: "MapBox",
    },
    Jawg: {
        keyString: "accessToken",
        idString: "",
        name: "Jawg",
    },
    TomTom: {
        keyString: "apikey",
        idString: "",
        name: "TomTom",
    },
    HERE: {
        keyString: "app_code",
        idString: "app_id",
        name: "HERE",
    },
    HEREv3: {
        keyString: "apiKey",
        idString: "",
        name: "HEREv3",
    },
    AzureMaps: {
        keyString: "subscriptionKey",
        idString: "",
        name: "AzureMaps",
    },
};

function initMap(el, data, accessData) {
    basemap = getBaseMapName(data);

    const mainContainer = document.createElement("div");
    mainContainer.className = "main-container";
    el.append(mainContainer);

    var titleDiv = document.createElement("h2");
    titleDiv.className = "title-container";
    titleDiv.textContent = data["name"];
    mainContainer.append(titleDiv);

    var mapContainer = document.createElement("div");
    mapContainer.className = "map-container";
    mainContainer.append(mapContainer);

    key = Object.keys(data);
    val = Object.values(data);
    nbOfRows = Object.keys(data).length;
    var latitude = 0;
    var longitude = 0;
    var zoom = 1;

    try {
        //---------------------Basemaps with specific locations -------------------------------
        //----and zooms to optimize the map views restricted to given geographic areas---------
        if (
            data["name"] === "Esri.ArcticOceanReference" ||
            data["name"] === "Esri.ArcticOceanBase"
        ) {
            latitude = 65.421505; // Artic ocean
            longitude = -70.965421;
            zoom = 1;
        } else if (data["name"] === "Esri.AntarcticBasemap") {
            latitude = 82.8628; // Arctic ocean
            longitude = 135.0;
            zoom = 6;
        } else if (basemap === "OpenFireMap" || basemap === "OpenSeaMap") {
            latitude = 50.1109; // Frankfurt
            longitude = 8.6821;
            zoom = 14;
        } else if (basemap === "OpenAIP") {
            latitude = 50.1109; // Frankfurt
            longitude = 8.6821;
            zoom = 9;
        } else if (basemap === "Stamen") {
            latitude = 32.7766642; // Dallas
            longitude = -96.7969879;
            zoom = 6;
        } else if (basemap === "FreeMapSK") {
            latitude = 48.736277; // Banská Bystrica Slovaky
            longitude = 19.146192;
            zoom = 14;
        } else if (basemap === "JusticeMap") {
            latitude = 39.7392358; // Denver
            longitude = -104.990251;
            zoom = 3;
        } else if (
            basemap === "OpenWeatherMap" ||
            basemap === "Esri" ||
            basemap === "USGS" ||
            basemap === "WaymarkedTrails"
        ) {
            latitude = 32.7766642; // Dallas
            longitude = -96.7969879;
            zoom = 4;
        } else if (basemap === "BasemapAT") {
            latitude = 47.5652; // Liezen
            longitude = 14.2424;
            zoom = 14;
        } else if (basemap === "nlmaps") {
{'fraction_non_alphanumeric': 0.15128865979381442, 'fraction_numerical': 0.03891752577319588, 'mean_word_length': 1.6651785714285714, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5699845', 'n_tokens_mistral': 2585, 'n_tokens_neox': 2359, 'n_words': 540}