Skip to content

Commit

Permalink
docs(#35): 📝 Add docs for function loadCountryBorders
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinc committed Oct 20, 2025
1 parent 3e928f4 commit db67e3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Cesium.GeoJsonDataSource>} 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',
Expand Down

0 comments on commit db67e3a

Please sign in to comment.