diff --git a/src/cesiumViewer.js b/src/cesiumViewer.js index 45b84b0..c029105 100644 --- a/src/cesiumViewer.js +++ b/src/cesiumViewer.js @@ -27,6 +27,14 @@ export function createCesiumViewer(containerId) { return viewer } +/** +* Loads country borders from a GeoJSON file and adds them to the Cesium viewer. +* The data source is stored as viewer._countryBorders for visibility management. +* +* @param {Cesium.Viewer} viewer - The Cesium viewer instance +* @returns {Promise} The loaded GeoJSON data source +* @throws {Error} If the GeoJSON file cannot be loaded or parsed +*/ export async function loadCountryBorders(viewer) { const dataSource = await Cesium.GeoJsonDataSource.load( '/data/geo/world_simplified.geojson',