<commit_before>"use strict";

/*global module, require, GLOBAL*/

var startCoordinates = [0, 0],
    zoom = 2,
    d3 = require("d3"),
    geocoder = require("leaflet-control-geocoder"),
    leaflet = require("leaflet"),
    errors = require("./errors.js")(d3.select("#messages")),
    time = require("./time-control.js")(d3.select("#time-control"), 2013, 2024, 2014),
    loader = require("./loader.js"),
    sources = require("./sources.js")(errors),
    layers = require("./layers.js")(errors, sources),
    geometries = require("./geometries.js"),
    handlers = require("./file-handlers.js")(errors, geometries, layers, sources),
    floatDialogue = require("./floating-dialogue.js"),
    queryString = require("./query-string.js");

require("leaflet-fancy-layer-control");
require("./lib/d3-plugins/geo/tile/tile.js");

var osmLayer = leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
});
var Stamen_TonerBackground = leaflet.tileLayer('http://{s}.tile.stamen.com/toner-background/{z}/{x}/{y}.png', {
    attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
    subdomains: 'abcd',
    minZoom: 0,
    maxZoom: 20
});
var Esri_WorldShadedRelief = leaflet.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}', {
    attribution: 'Tiles &copy; Esri &mdash; Source: Esri',
    maxZoom: 13
});
var Esri_WorldImagery = leaflet.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
	attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
});
var nationalHeatMap = leaflet.tileLayer('http://test-tiles.0d9303a4.cdn.memsites.com/Total%20Heat%20Density/Z{z}/{y}/{x}.png', {
    attribution: '<a href="http://tools.decc.gov.uk/nationalheatmap/">National Heat Map</a>,',
    minZoom: 2,
    maxZoom: 17
});


var map = new leaflet.Map("map")
	.addLayer(osmLayer)
	.setView(startCoordinates, zoom);

map.on('layerremove', function(event){
    layers.remove(event.layer);
});

/* The map will make us an svg. It will automatically sort out its bounds for us. */
map._initPathRoot();

var overlay = d3.select(map.getPanes().overlayPane)
	.select("svg")
	.attr("id", "overlay");

map.addControl(new geocoder({
    email: "<EMAIL>"
}));

var layerOpacity = leaflet.Control.Layers.Opacity();
var layerOrder = leaflet.Control.Layers.Order();
var layerDelete = leaflet.Control.Layers.Delete(map);
var layersControl = new leaflet.Control.Layers.Extensible(
    {
	"Open Street Map" : osmLayer,
	"Stamen Toner" : Stamen_TonerBackground,<commit_msg>Delete control now only applies to overlay layers.<commit_after>"use strict";

/*global module, require, GLOBAL*/

var startCoordinates = [0, 0],
    zoom = 2,
    d3 = require("d3"),
    geocoder = require("leaflet-control-geocoder"),
    leaflet = require("leaflet"),
    errors = require("./errors.js")(d3.select("#messages")),
    time = require("./time-control.js")(d3.select("#time-control"), 2013, 2024, 2014),
    loader = require("./loader.js"),
    sources = require("./sources.js")(errors),
    layers = require("./layers.js")(errors, sources),
    geometries = require("./geometries.js"),
    handlers = require("./file-handlers.js")(errors, geometries, layers, sources),
    floatDialogue = require("./floating-dialogue.js"),
    queryString = require("./query-string.js");

require("leaflet-fancy-layer-control");
require("./lib/d3-plugins/geo/tile/tile.js");

var osmLayer = leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
});
var Stamen_TonerBackground = leaflet.tileLayer('http://{s}.tile.stamen.com/toner-background/{z}/{x}/{y}.png', {
    attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
    subdomains: 'abcd',
    minZoom: 0,
    maxZoom: 20
});
var Esri_WorldShadedRelief = leaflet.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}', {
    attribution: 'Tiles &copy; Esri &mdash; Source: Esri',
    maxZoom: 13
});
var Esri_WorldImagery = leaflet.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
	attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
});
var nationalHeatMap = leaflet.tileLayer('http://test-tiles.0d9303a4.cdn.memsites.com/Total%20Heat%20Density/Z{z}/{y}/{x}.png', {
    attribution: '<a href="http://tools.decc.gov.uk/nationalheatmap/">National Heat Map</a>,',
    minZoom: 2,
    maxZoom: 17
});

var map = new leaflet.Map("map")
	.addLayer(osmLayer)
	.setView(startCoordinates, zoom);

map.on('layerremove', function(event){
    layers.remove(event.layer);
});

/* The map will make us an svg. It will automatically sort out its bounds for us. */
map._initPathRoot();

var overlay = d3.select(map.getPanes().overlayPane)
	.select("svg")
	.attr("id", "overlay");

map.addControl(new geocoder({
    email: "<EMAIL>"
}));

var layerOpacity = leaflet.Control.Layers.Opacity();
var layerOrder = leaflet.Control.Layers.Order();
var layerDelete = leaflet.Control.Layers.Delete(map, function secondaryLayersOnly (layer, name, isOverlay) {
    return !!isOverlay;
});
var layersControl = new leaflet.Control.Layers.Extensible(
    {
	"Open Street Map" : osmLayer,
	"Stamen Toner" : Stamen_TonerBackground,
{'fraction_non_alphanumeric': 0.19421027517098774, 'fraction_numerical': 0.01495148719580086, 'mean_word_length': 4.619302949061662, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '1573233', 'n_tokens_mistral': 2366, 'n_tokens_neox': 2248, 'n_words': 393}