setMetric();
        }
    }

    function clickSettingsMetric() {
        metric = document.getElementById("metricChecked").checked;
        localStorage.setItem("metric",metric);
        setMetric();
    }

    function setMetric() {
        document.getElementById("metricCheckedLabel").innerText=(metric?"Metric Units":"Imperial Units");
        initData();
        prepareMap();
    }

    function filter(value) {
        deselectTrack();
        if (value ==="none") {
            filterBy = "none";
     