maplibre-gl-basemap-control 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ const DEFAULT_BASEMAP_PROVIDERS = [
6
6
  { id: "amazon", name: "Amazon Location", category: "General" },
7
7
  { id: "carto", name: "Carto", category: "General" },
8
8
  { id: "cyclosm", name: "CyclOSM", category: "Cycling" },
9
+ { id: "eox", name: "EOX", category: "Imagery" },
9
10
  { id: "esri", name: "ESRI", category: "Imagery" },
10
11
  { id: "google", name: "Google", category: "General" },
11
12
  { id: "here", name: "HERE", category: "Traffic" },
@@ -150,6 +151,8 @@ const OPENFREEMAP_ATTRIBUTION = "OpenFreeMap © OpenMapTiles Data from OpenS
150
151
  const TOMTOM_ATTRIBUTION = "© TomTom";
151
152
  const HERE_ATTRIBUTION = "© HERE";
152
153
  const GOOGLE_ATTRIBUTION = "© Google";
154
+ const EOX_S2CLOUDLESS_ATTRIBUTION = 'Sentinel-2 cloudless <a href="https://cloudless.eox.at" target="_blank" rel="noopener">EOxCloudless</a> by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2025)';
155
+ const EOX_TERRAIN_LIGHT_ATTRIBUTION = 'Terrain Light <a href="https://maps.eox.at" target="_blank" rel="noopener">EOX</a> (Data &copy; OpenStreetMap contributors and others, Rendering &copy; EOX)';
153
156
  const MAPBOX_TRAFFIC_CONGESTION_COLORS = [
154
157
  "match",
155
158
  ["get", "congestion"],
@@ -518,7 +521,9 @@ const DEFAULT_BASEMAPS = [
518
521
  category: "Labels",
519
522
  description: "Carto Positron labels layer.",
520
523
  attribution: CARTO_ATTRIBUTION,
521
- tiles: ["https://a.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}.png"],
524
+ tiles: [
525
+ "https://a.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}.png"
526
+ ],
522
527
  maxzoom: 20,
523
528
  tags: ["carto", "labels"]
524
529
  }),
@@ -583,7 +588,9 @@ const DEFAULT_BASEMAPS = [
583
588
  category: "Street",
584
589
  description: "Carto Voyager without labels.",
585
590
  attribution: CARTO_ATTRIBUTION,
586
- tiles: ["https://a.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png"],
591
+ tiles: [
592
+ "https://a.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png"
593
+ ],
587
594
  maxzoom: 20,
588
595
  tags: ["carto", "voyager", "no labels"]
589
596
  }),
@@ -594,7 +601,9 @@ const DEFAULT_BASEMAPS = [
594
601
  category: "Labels",
595
602
  description: "Carto Voyager labels layer.",
596
603
  attribution: CARTO_ATTRIBUTION,
597
- tiles: ["https://a.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}.png"],
604
+ tiles: [
605
+ "https://a.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}.png"
606
+ ],
598
607
  maxzoom: 20,
599
608
  tags: ["carto", "voyager", "labels"]
600
609
  }),
@@ -605,7 +614,9 @@ const DEFAULT_BASEMAPS = [
605
614
  category: "Street",
606
615
  description: "Carto Voyager labels-under variant.",
607
616
  attribution: CARTO_ATTRIBUTION,
608
- tiles: ["https://a.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png"],
617
+ tiles: [
618
+ "https://a.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png"
619
+ ],
609
620
  maxzoom: 20,
610
621
  tags: ["carto", "voyager", "labels"]
611
622
  }),
@@ -727,6 +738,39 @@ const DEFAULT_BASEMAPS = [
727
738
  ],
728
739
  tags: ["esri", "terrain"]
729
740
  }),
741
+ rasterBasemap({
742
+ id: "eox-s2cloudless-2025",
743
+ name: "EOX Sentinel-2 cloudless 2025",
744
+ provider: "eox",
745
+ category: "Imagery",
746
+ description: "Cloudless Sentinel-2 satellite mosaic for 2025 (non-commercial use).",
747
+ attribution: EOX_S2CLOUDLESS_ATTRIBUTION,
748
+ tiles: [
749
+ "https://tiles.maps.eox.at/wmts/1.0.0/s2cloudless-2025_3857/default/GoogleMapsCompatible/{z}/{y}/{x}.jpg"
750
+ ],
751
+ maxzoom: 16,
752
+ tags: [
753
+ "eox",
754
+ "sentinel",
755
+ "satellite",
756
+ "imagery",
757
+ "cloudless",
758
+ "copernicus"
759
+ ]
760
+ }),
761
+ rasterBasemap({
762
+ id: "eox-terrain-light",
763
+ name: "EOX Terrain Light",
764
+ provider: "eox",
765
+ category: "Terrain",
766
+ description: "Light terrain basemap from EOX Maps (non-commercial use).",
767
+ attribution: EOX_TERRAIN_LIGHT_ATTRIBUTION,
768
+ tiles: [
769
+ "https://tiles.maps.eox.at/wmts/1.0.0/terrain-light_3857/default/GoogleMapsCompatible/{z}/{y}/{x}.jpg"
770
+ ],
771
+ maxzoom: 14,
772
+ tags: ["eox", "terrain", "light", "hillshade"]
773
+ }),
730
774
  rasterBasemap({
731
775
  id: "nasa-gibs-blue-marble",
732
776
  name: "Blue Marble",
@@ -1112,7 +1156,9 @@ const DEFAULT_BASEMAPS = [
1112
1156
  provider: "tomtom",
1113
1157
  description: "TomTom traffic speeds relative to free-flow speed. Requires a TomTom API key.",
1114
1158
  attribution: TOMTOM_ATTRIBUTION,
1115
- tiles: ["https://api.tomtom.com/traffic/map/4/tile/flow/relative0/{z}/{x}/{y}.png?key={api-key}"],
1159
+ tiles: [
1160
+ "https://api.tomtom.com/traffic/map/4/tile/flow/relative0/{z}/{x}/{y}.png?key={api-key}"
1161
+ ],
1116
1162
  tags: ["tomtom", "flow", "relative"]
1117
1163
  }),
1118
1164
  rasterTrafficBasemap({
@@ -1121,7 +1167,9 @@ const DEFAULT_BASEMAPS = [
1121
1167
  provider: "tomtom",
1122
1168
  description: "TomTom traffic colored by absolute speed. Requires a TomTom API key.",
1123
1169
  attribution: TOMTOM_ATTRIBUTION,
1124
- tiles: ["https://api.tomtom.com/traffic/map/4/tile/flow/absolute/{z}/{x}/{y}.png?key={api-key}"],
1170
+ tiles: [
1171
+ "https://api.tomtom.com/traffic/map/4/tile/flow/absolute/{z}/{x}/{y}.png?key={api-key}"
1172
+ ],
1125
1173
  tags: ["tomtom", "flow", "absolute"]
1126
1174
  }),
1127
1175
  rasterTrafficBasemap({
@@ -1141,7 +1189,9 @@ const DEFAULT_BASEMAPS = [
1141
1189
  provider: "here",
1142
1190
  description: "HERE real-time traffic flow overlay. Requires a HERE API key.",
1143
1191
  attribution: HERE_ATTRIBUTION,
1144
- tiles: ["https://traffic.maps.hereapi.com/v3/flow/mc/{z}/{x}/{y}/png?apiKey={api-key}"],
1192
+ tiles: [
1193
+ "https://traffic.maps.hereapi.com/v3/flow/mc/{z}/{x}/{y}/png?apiKey={api-key}"
1194
+ ],
1145
1195
  tags: ["here", "flow"]
1146
1196
  }),
1147
1197
  {
@@ -1162,7 +1212,17 @@ const DEFAULT_BASEMAPS = [
1162
1212
  "line-cap": "round"
1163
1213
  },
1164
1214
  paint: {
1165
- "line-width": ["interpolate", ["linear"], ["zoom"], 6, 1.5, 14, 4, 18, 8],
1215
+ "line-width": [
1216
+ "interpolate",
1217
+ ["linear"],
1218
+ ["zoom"],
1219
+ 6,
1220
+ 1.5,
1221
+ 14,
1222
+ 4,
1223
+ 18,
1224
+ 8
1225
+ ],
1166
1226
  "line-color": MAPBOX_TRAFFIC_CONGESTION_COLORS
1167
1227
  }
1168
1228
  },
@@ -1178,7 +1238,9 @@ const DEFAULT_BASEMAPS = [
1178
1238
  attribution: GOOGLE_ATTRIBUTION,
1179
1239
  source: {
1180
1240
  type: "raster",
1181
- tiles: ["https://tile.googleapis.com/v1/2dtiles/{z}/{x}/{y}?session={session}&key={api-key}"],
1241
+ tiles: [
1242
+ "https://tile.googleapis.com/v1/2dtiles/{z}/{x}/{y}?session={session}&key={api-key}"
1243
+ ],
1182
1244
  tileSize: 256,
1183
1245
  maxzoom: 22,
1184
1246
  googleSession: {
@@ -1199,12 +1261,17 @@ function combineProviders(defaults, custom = []) {
1199
1261
  function resolveBasemapProviders(basemaps, customProviders = [], includeDefaultProviders = true) {
1200
1262
  const byId = /* @__PURE__ */ new Map();
1201
1263
  if (includeDefaultProviders) {
1202
- DEFAULT_BASEMAP_PROVIDERS.forEach((provider) => byId.set(provider.id, provider));
1264
+ DEFAULT_BASEMAP_PROVIDERS.forEach(
1265
+ (provider) => byId.set(provider.id, provider)
1266
+ );
1203
1267
  }
1204
1268
  customProviders.forEach((provider) => byId.set(provider.id, provider));
1205
1269
  basemaps.forEach((basemap) => {
1206
1270
  if (basemap.provider && !byId.has(basemap.provider)) {
1207
- byId.set(basemap.provider, { id: basemap.provider, name: basemap.provider });
1271
+ byId.set(basemap.provider, {
1272
+ id: basemap.provider,
1273
+ name: basemap.provider
1274
+ });
1208
1275
  }
1209
1276
  });
1210
1277
  return sortProviders([...byId.values()]);
@@ -1233,7 +1300,11 @@ function filterBasemaps(basemaps, filter) {
1233
1300
  });
1234
1301
  }
1235
1302
  function getBasemapCategories(basemaps) {
1236
- return [...new Set(basemaps.map((basemap) => basemap.category).filter(Boolean))].sort();
1303
+ return [
1304
+ ...new Set(
1305
+ basemaps.map((basemap) => basemap.category).filter(Boolean)
1306
+ )
1307
+ ].sort();
1237
1308
  }
1238
1309
  const DEFAULT_OPTIONS = {
1239
1310
  collapsed: true,
@@ -2820,4 +2891,4 @@ exports.createBasemapCatalog = createBasemapCatalog;
2820
2891
  exports.filterBasemaps = filterBasemaps;
2821
2892
  exports.getBasemapCategories = getBasemapCategories;
2822
2893
  exports.resolveBasemapProviders = resolveBasemapProviders;
2823
- //# sourceMappingURL=BasemapControl-Dl0aWr1N.cjs.map
2894
+ //# sourceMappingURL=BasemapControl-Cu8agB-D.cjs.map