chore(web): bump @reearth/core to 0.0.7-alpha.72 for conditional Cesium Ion credit - #2290
Merged
Conversation
Compute hasCesiumIonAsset from the current viewer property and layers, then pass it to CoreVisualizer so the engine omits the Cesium credit when no Ion assets are loaded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the web Visualizer to hide the Cesium-ion attribution logo unless the current scene actually uses Cesium-ion-backed assets, by computing a hasCesiumIonAsset signal (from viewer property + migrated layers) and passing it to the core visualizer.
Changes:
- Add
computeHasCesiumIonAsset(viewerProperty, layers)to detect Cesium-ion usage via tiles, terrain, and specific layer types. - Export the new detection utility from
Visualizer/utils. - Compute
hasCesiumIonAssetinVisualizer/index.tsxand pass it into<CoreVisualizer>.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| web/src/app/features/Visualizer/utils/index.ts | Re-exports the new Cesium-ion detection helper. |
| web/src/app/features/Visualizer/utils/cesiumIonDetection.ts | Implements Cesium-ion usage detection across tiles/terrain/layers. |
| web/src/app/features/Visualizer/index.tsx | Computes hasCesiumIonAsset and forwards it to the core visualizer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Recurse into LayerGroup children so nested Ion layers are detected - Remove no-explicit-any by using LayerSimple type directly after type narrowing; fix googleMapApiKey access via serviceTokens - Add unit tests covering tiles, terrain, layers, and nested groups Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ZTongci
force-pushed
the
feat/conditional-cesium-ion-credit
branch
from
July 6, 2026 09:10
1318ab0 to
d371e19
Compare
Ion asset detection was moved into core's Map component, which already has access to both viewerProperty and layers. Visualizer no longer needs to compute or pass hasCesiumIonAsset — it is now an implementation detail of core. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🚀 Cloud Run Preview Deployed |
mkumbobeaty
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The Cesium-ion attribution logo was always displayed in the
DataAttributionwidget, even when the scene contained no Cesium-ion assets. This change removes Ion detection from the visualizer entirely — detection now happens inside the core'sMapcomponent, which already has direct access topropertyandlayers, keeping Ion-awareness consistent with how credits are surfaced viagetCredits.What I've done
cesiumIonDetection.tsand its unit tests from the visualizer.hasCesiumIonAssetprop from<CoreVisualizer>— no longer needed; core handles it internally.computeHasCesiumIonAssetfromutils/index.ts.What I haven't done
DataAttributionwidget itself — it already conditionally renders the logo based on whethercredits.engine.cesiumis present.How I tested
Manually verified: default scene (OSM tile + reearth terrain) → logo hidden; switching to a Cesium Ion tile → logo appears; switching back → logo disappears after the next 3-second credit poll.
How to test the conditional Cesium Ion credit
The Cesium Ion logo in the bottom-right corner should appear only when at least one Cesium Ion asset is actively used in the scene.
Logo should appear when:
cesium_ion(Scene settings → Tiles)cesiumorcesiumionassets.ion.cesium.comcesium-ionLogo should NOT appear when:
open_street_map,googleSatelliteor any non-Ion tileurlpointing to a non-Ion hostassets.ion.cesium.comQuick manual test flow:
Memo
Depends on the companion core PR: reearth/core#144
Checklist