Skip to content

Commit a1b9224

Browse files
committed
refactor: remove carto_light
1 parent 1780fcb commit a1b9224

10 files changed

Lines changed: 15 additions & 26 deletions

File tree

server/pkg/builtin/manifest.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,6 @@ extensions:
341341
label: Japan GSI Standard Map
342342
- key: stamen_watercolor
343343
label: Stamen Watercolor
344-
- key: carto_light
345-
label: Carto Light
346344
- key: cesium_ion
347345
label: Cesium Ion
348346
- key: url

server/pkg/builtin/manifest_ja.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ extensions:
172172
open_street_map: OpenStreetMap
173173
japan_gsi_standard: 地理院地図 標準地図
174174
stamen_watercolor: Stamen Watercolor
175-
carto_light: Carto Light
176175
cesium_ion: Cesium Ion
177176
url: URL
178177
tile_url:

web/src/classic/components/molecules/Visualizer/Engine/Cesium/core/presets.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ export const tiles = {
8989
credit: "Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.",
9090
maximumLevel: 16,
9191
}),
92-
carto_light: () =>
93-
new UrlTemplateImageryProvider({
94-
url: "https://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
95-
credit:
96-
"© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attributions'>CARTO</a>",
97-
}),
9892
url: ({ url } = {}) => (url ? new UrlTemplateImageryProvider({ url }) : null),
9993
} as {
10094
[key: string]: (opts?: {

web/src/classic/components/molecules/Visualizer/compatibility/BACKWARD_COMPATIBILITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const overriddenSceneProperty = useMemo(
5858
| `default_label` | `cesium_ion` | 3 | Cesium World Imagery + Labels |
5959
| `default_road` | `cesium_ion` | 4 | Cesium World Imagery + Roads |
6060
| `black_marble` | `cesium_ion` | 3812 | NASA Black Marble |
61-
| `stamen_toner` | `carto_light` | - | Carto Light basemap |
61+
| `stamen_toner` | `open_street_map`| - | OpenStreetMap |
6262
| `esri_world_topo` | `open_street_map`| - | OpenStreetMap |
6363

6464
### Example
@@ -79,7 +79,7 @@ const overriddenSceneProperty = useMemo(
7979
{
8080
"tiles": [
8181
{ "id": "tile-1", "tile_type": "cesium_ion", "cesium_ion_asset_id": 2 },
82-
{ "id": "tile-2", "tile_type": "carto_light" },
82+
{ "id": "tile-2", "tile_type": "open_street_map" },
8383
{ "id": "tile-3", "tile_url": "https://..." }
8484
]
8585
}

web/src/classic/components/molecules/Visualizer/compatibility/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,14 @@ This directory contains a comprehensive system for handling backward compatibili
6969
### Backward Compatibility Rules
7070

7171
**Tiles:**
72-
- Missing or `"default"``cesium_ion` (asset_id: 2)
72+
- `"default"``cesium_ion` (asset_id: 2)
7373
- `"default_label"``cesium_ion` (asset_id: 3)
7474
- `"default_road"``cesium_ion` (asset_id: 4)
7575
- `"black_marble"``cesium_ion` (asset_id: 3812)
76-
- `"stamen_toner"``carto_light`
76+
- `"stamen_toner"``open_street_map`
7777
- `"esri_world_topo"``open_street_map`
7878

7979
**Terrain:**
80-
- Missing terrainType (terrain enabled) → `"cesium"`
8180
- `"arcgis"``"reearth_terrain"`
8281

8382
### Fallback Rules (Only When No Cesium Ion Token)

web/src/classic/components/molecules/Visualizer/compatibility/backwardCompatibility.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe("migrateTileType", () => {
6969
});
7070
});
7171

72-
it('should migrate "stamen_toner" to "carto_light"', () => {
72+
it('should migrate "stamen_toner" to "open_street_map"', () => {
7373
const tile = {
7474
id: "test-tile",
7575
tile_type: "stamen_toner",
@@ -79,7 +79,7 @@ describe("migrateTileType", () => {
7979

8080
expect(result).toEqual({
8181
id: "test-tile",
82-
tile_type: "carto_light",
82+
tile_type: "open_street_map",
8383
});
8484
});
8585

@@ -210,7 +210,7 @@ describe("applyBackwardCompatibility", () => {
210210

211211
expect(result?.tiles).toEqual([
212212
{ id: "tile-1", tile_type: "cesium_ion", cesium_ion_asset_id: 2 },
213-
{ id: "tile-2", tile_type: "carto_light" },
213+
{ id: "tile-2", tile_type: "open_street_map" },
214214
]);
215215
});
216216

web/src/classic/components/molecules/Visualizer/compatibility/backwardCompatibility.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function applyBackwardCompatibility(
3333
* - "default_label" → "cesium_ion" with cesiumIonAssetId: 3
3434
* - "default_road" → "cesium_ion" with cesiumIonAssetId: 4
3535
* - "black_marble" → "cesium_ion" with cesiumIonAssetId: 3812
36-
* - "stamen_toner" → "carto_light"
36+
* - "stamen_toner" → "open_street_map"
3737
* - "esri_world_topo" → "open_street_map"
3838
*/
3939
export function migrateTileType(
@@ -93,11 +93,11 @@ export function migrateTileType(
9393

9494
case "stamen_toner":
9595
console.warn(
96-
`[Re:Earth] Tile type migrated: "stamen_toner" → "carto_light" - Backward compatibility (tile ID: ${tile.id})`,
96+
`[Re:Earth] Tile type migrated: "stamen_toner" → "open_street_map" - Backward compatibility (tile ID: ${tile.id})`,
9797
);
9898
return {
9999
...tile,
100-
tile_type: "carto_light",
100+
tile_type: "open_street_map",
101101
};
102102

103103
case "esri_world_topo":

web/src/classic/components/molecules/Visualizer/compatibility/compatibility.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe("Backward Compatibility + Fallbacks Integration", () => {
2626
expect(afterBackwardCompat?.tiles).toEqual([
2727
{ id: "tile-1", tile_type: "cesium_ion", cesium_ion_asset_id: 2 },
2828
{ id: "tile-2", tile_type: "cesium_ion", cesium_ion_asset_id: 3812 },
29-
{ id: "tile-3", tile_type: "carto_light" },
29+
{ id: "tile-3", tile_type: "open_street_map" },
3030
]);
3131
expect(afterBackwardCompat?.terrain).toEqual({
3232
terrain: true,
@@ -39,7 +39,7 @@ describe("Backward Compatibility + Fallbacks Integration", () => {
3939
expect(final?.tiles).toEqual([
4040
{ id: "tile-1", tile_type: "google_satellite", cesium_ion_asset_id: 2 },
4141
{ id: "tile-2", tile_type: "nasa_black_marble", cesium_ion_asset_id: 3812 },
42-
{ id: "tile-3", tile_type: "carto_light" }, // No change (not cesium_ion)
42+
{ id: "tile-3", tile_type: "open_street_map" }, // No change (not cesium_ion)
4343
]);
4444
expect(final?.terrain).toEqual({
4545
terrain: true,

web/src/classic/components/molecules/Visualizer/compatibility/fallbacks.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ describe("applyFallbacks", () => {
283283
const sceneProperty: SceneProperty = {
284284
tiles: [
285285
{ id: "tile-1", tile_type: "open_street_map" },
286-
{ id: "tile-2", tile_type: "carto_light" },
286+
{ id: "tile-2", tile_type: "url" },
287287
],
288288
};
289289

web/src/classic/components/molecules/Visualizer/hooks.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,14 @@ export default ({
102102
//
103103
// Backward compatibility rules:
104104
// Tiles:
105-
// - missing tile_type or "default" → "cesium_ion" with cesiumIonAssetId: 2
105+
// - "default" → "cesium_ion" with cesiumIonAssetId: 2
106106
// - "default_label" → "cesium_ion" with cesiumIonAssetId: 3
107107
// - "default_road" → "cesium_ion" with cesiumIonAssetId: 4
108108
// - "black_marble" → "cesium_ion" with cesiumIonAssetId: 3812
109-
// - "stamen_toner" → "carto_light"
109+
// - "stamen_toner" → "open_street_map"
110110
// - "esri_world_topo" → "open_street_map"
111111
//
112112
// Terrain:
113-
// - If terrain enabled but no terrainType → set terrainType to "cesium"
114113
// - If terrainType is "arcgis" → change to "reearth_terrain"
115114
const backwardCompatibleSceneProperty = useMemo(
116115
() => applyBackwardCompatibility(overriddenScenePropertyRaw),

0 commit comments

Comments
 (0)