Skip to content

Commit

Permalink
Use the schemed map urls
Browse files Browse the repository at this point in the history
  • Loading branch information
hlfan authored Dec 12, 2024
1 parent 040ff69 commit 27f0cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/assets/leaflet/leaflet.osm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ L.OSM.TileLayer = L.TileLayer.extend({
options = L.Util.setOptions(this, options);
url = isDarkMap ? options.darkUrl : options.lightUrl;
if (url) this.schemeClass = isDarkMap ? 'dark' : 'light';
L.TileLayer.prototype.initialize.call(this, options.url);
L.TileLayer.prototype.initialize.call(this, url || options.url);
this.on('add', function () {
if (this._container && this.schemeClass) this._container.classList.add(this.schemeClass);
if (this._container && this.options.filter) this._container.style.setProperty('--dark-mode-map-filter', this.options.filter);
Expand Down

0 comments on commit 27f0cd1

Please sign in to comment.