// Cariflex - MapLibre tile layer replacement for FlexMeasures
// Replaces Mapbox dependency with free OpenStreetMap tiles

function addTileLayer(leafletMap, mapboxAccessToken) {
    /*
    Add the tile layer for FlexMeasures using OpenStreetMap (no token required).
    Mapbox replacement - uses free OSM tiles with proper attribution.
    */
    var tileLayer = new L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
        maxZoom: 19,
    });
    tileLayer.addTo(leafletMap);
}
